Hi there,

I incorporated the first JFrame into the application that I am trying to
build. The project has three containers: xmatrix-application (app),
xmatrix-resource-api (api), xmatrix-resource-impl (impl). App and impl are
dependent on api. There is a test for impl only (ResourceTest). 

First issue: Sometimes the test runs ok, sometimes it doesn't (AWT blocker
activation interrupted). See at the end for both outputs. The init method
instantiates the JFrame, the execute method sets it to visible as proposed
by Niclas.

Second issue: I build the jars using maven all:jar:install (reactor for
jar:install). I understand that reactor just sorts out the dependencies and
calls the individual jar:install goals for each project (as I defined it in
the goal for all:jar:install) giving the new basedir. However, the basedir
seems not to change: Running all:jar:install from the app directory executes
the app during test, running it from the impl directory doesn't. 


Daniel

==== TEST OK ===========================================

test:test:
    [junit] dir attribute ignored if running in the same VM
    [junit] Running ch.xmatrix.resource.ResourceTest
[INFO   ] (kernel): building application model
[INFO   ] (kernel): install phase
[INFO   ] (kernel): installing: file:/${user.dir}/target/classes/
[INFO   ] (application.main-entry): context
[INFO   ] (application.main-entry): service received: configuration from
within block
[INFO   ] (application.main-entry): configure
[INFO   ] (application.main-entry): init
[INFO   ] (application.main-entry): executing
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 2.965 sec

==== TEST NOT OK =======================================

test:test:
    [junit] dir attribute ignored if running in the same VM
    [junit] Running ch.xmatrix.resource.ResourceTest
[INFO   ] (kernel): building application model
[INFO   ] (kernel): install phase
[INFO   ] (kernel): installing: file:/${user.dir}/target/classes/
[INFO   ] (application.main-entry): context
[INFO   ] (application.main-entry): service received: configuration from
within block
[INFO   ] (application.main-entry): configure
[INFO   ] (application.main-entry): init
AWT blocker activation interrupted:
java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:429)
        at
sun.awt.AWTAutoShutdown.activateBlockerThread(AWTAutoShutdown.java:309)
        at sun.awt.AWTAutoShutdown.setToolkitBusy(AWTAutoShutdown.java:226)
        at
sun.awt.AWTAutoShutdown.notifyToolkitThreadBusy(AWTAutoShutdown.java:118)
        at sun.awt.windows.WToolkit.<init>(WToolkit.java:217)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:308)
        at java.lang.Class.newInstance(Class.java:261)
        at java.awt.Toolkit$2.run(Toolkit.java:760)
---- exception report
----------------------------------------------------------
Exception: org.apache.avalon.merlin.KernelException
Message: Kernel startup failure.
---- cause
---------------------------------------------------------------------

Exception: org.apache.avalon.merlin.KernelException
Message: Cannot deploy application.
---- cause
---------------------------------------------------------------------

Exception: org.apache.avalon.composition.model.FatalCommissioningException
Message: target: [[/application/main-entry]] did not respond within the
timeout
period: [1000] and failed to respond to an interrupt.
---- stack trace
---------------------------------------------------------------

org.apache.avalon.composition.model.FatalCommissioningException: target:
[[/application/main-entry]] did not respond within the timeout period:
[1000] and failed to respond to an interrupt.
org.apache.avalon.composition.model.impl.CommissionRequest.waitForCompletion
(CommissionRequest.java:117)
org.apache.avalon.composition.model.impl.Commissioner.commission(Commissione
r.java:140)
org.apache.avalon.composition.model.impl.DefaultContainmentModel.commission(
DefaultContainmentModel.java:241)
org.apache.avalon.composition.model.impl.Commissioner.run(Commissioner.java:
195)
java.lang.Thread.run(Thread.java:534)
----------------------------------------------------------------------------
----

        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:739)
        at java.awt.Window.getToolkit(Window.java:688)
        at java.awt.Window.init(Window.java:246)
        at java.awt.Window.<init>(Window.java:275)
        at java.awt.Frame.<init>(Frame.java:401)
        at javax.swing.JFrame.<init>(JFrame.java:198)
        at com.jgoodies.swing.AbstractFrame.<init>(AbstractFrame.java:53)
        at
com.jgoodies.swing.application.AbstractMainFrame.<init>(AbstractMainFrame.ja
va:35)
        at ch.xmatrix.gui.application.MainFrame.<init>(MainFrame.java:35)
        at
ch.xmatrix.gui.application.Application.execute(Application.java:73)
        at
org.apache.avalon.framework.container.ContainerUtil.execute(ContainerUtil.ja
va:315)
        at
org.apache.avalon.activation.impl.DefaultComponentFactory.incarnation(Defaul
tComponentFactory.java:427)
        at
org.apache.avalon.activation.impl.DefaultComponentFactory.incarnate(DefaultC
omponentFactory.java:136)
        at
org.apache.avalon.activation.impl.TransientLifestyleManager.handleResolve(Tr
ansientLifestyleManager.java:102)
        at
org.apache.avalon.activation.impl.TransientLifestyleManager.commission(Trans
ientLifestyleManager.java:70)
        at
org.apache.avalon.activation.impl.DefaultAppliance.commission(DefaultApplian
ce.java:96)
        at
org.apache.avalon.activation.impl.DefaultRuntime.commission(DefaultRuntime.j
ava:100)
        at
org.apache.avalon.composition.model.impl.DefaultSystemContext.commission(Def
aultSystemContext.java:356)
        at
org.apache.avalon.composition.model.impl.DefaultDeploymentModel.commission(D
efaultDeploymentModel.java:124)
        at
org.apache.avalon.composition.model.impl.Commissioner.run(Commissioner.java:
195)
        at java.lang.Thread.run(Thread.java:534)
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 4.386 sec
    [junit] [ERROR] TEST ch.xmatrix.resource.ResourceTest FAILED

BUILD FAILED


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to