[TAV149] AVOIDING CYCLIC LOOPS IN TEST TARGETS IN MAVEN

[TAV149] AVOIDING CYCLIC LOOPS IN TEST TARGETS IN MAVEN






[#TAV-149] Avoiding cyclic loops in test targets in Maven

[TAV-149] Avoiding cyclic loops in test targets in Maven Created: 2006-09-06  Updated: 2006-11-09  Resolved: 2006-11-08

Status:

Closed

Project:

myGrid

Component/s:

None

Affects Version/s:

1.5

Fix Version/s:

None


Type:

Bug

Priority:

Minor

Reporter:

Stian Soiland-Reyes

Assignee:

David Withers (Inactive)

Resolution:

Not A Bug

Votes:

0

Labels:

None

Remaining Estimate:

Not Specified

Time Spent:

Not Specified

Original Estimate:

Not Specified



 Description 

 

[INFO] ----------------------------------------------------------------------------
[INFO] Building Scufl Model
[INFO] task-segment: [clean, test]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /local/stain/workspace/taverna1.x/scufl/scufl-model/target
[INFO] Deleting directory /local/stain/workspace/taverna1.x/scufl/scufl-model/target/classes
[INFO] Deleting directory /local/stain/workspace/taverna1.x/scufl/scufl-model/target/test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 63 source files to /local/stain/workspace/taverna1.x/scufl/scufl-model/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
Compiling 3 source files to /local/stain/workspace/taverna1.x/scufl/scufl-model/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: /local/stain/workspace/taverna1.x/scufl/scufl-model/target/surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.embl.ebi.escience.scufl.view.XScuflViewTest
log4j:WARN No appenders could be found for logger (org.embl.ebi.escience.scufl.NotifyThread).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "Thread-2" java.lang.ExceptionInInitializerError
at org.embl.ebi.escience.scufl.parser.ProcessorLoaderThread.run(XScuflParser.java:477)
Caused by: java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:138)
at org.embl.ebi.escience.scuflworkers.ProcessorHelper.populateMaps(ProcessorHelper.java:81)
at org.embl.ebi.escience.scuflworkers.ProcessorHelper.<clinit>(ProcessorHelper.java:66)
... 1 more
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.398 sec <<< FAILURE!
Running org.embl.ebi.escience.scufl.ScuflModelTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec
Running org.embl.ebi.escience.scufl.PortTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 sec

Results :
Tests run: 16, Failures: 0, Errors: 1, Skipped: 0

This is "fixed" by doing

<dependency>
<groupId>uk.org.mygrid.taverna.processors</groupId>
<artifactId>taverna-java-processor</artifactId>
<scope>test</scope>
</dependency>

However, after a clean, this gives:
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] The projects in the reactor contain a cyclic reference: Edge between 'Vertex

{label='uk.org.mygrid.taverna.processors:taverna-java-processor'}

' and 'Vertex

{label='uk.org.mygrid.taverna.scufl:scufl-ui'}

' introduces to cycle in the graph uk.org.mygrid.taverna.scufl:scufl-ui --> uk.org.mygrid.taverna.scufl:scufl-model --> uk.org.mygrid.taverna.processors:taverna-java-processor --> uk.org.mygrid.taverna.scufl:scufl-ui

So how do I solve this? The test in question needs some kind of processor because I'm loading a workflow from XML. Do we have to move the test? David?



 Comments 

 

Comment by Stuart Owen [ 2006-09-14 ]

This isn't a bug but is normal. Maven can't build taverna-java-processor until its built scufl-model, and can't build scufl-model until its built taverna-java-processor - its stuck and hence the complaint about cyclic references.

Tests like this that rely on more than the module being tested are not really appropriate as a unit test, and would be better be placed within an integrated testing phase. Maven includes this phase, but the exact mechanism for building this into the build is unclear to me.

Comment by David Withers (Inactive) [ 2006-11-08 ]

I agree with Stuart that this is the expected behaviour and not a bug.

Generated at Fri Nov 05 13:57:10 GMT 2021 using JIRA 6.1.2#6157-sha1:98c729218aad6de1537eb8e98889ee5562c90d96.





Tags: avoiding cyclic, [tav149], avoiding, targets, maven, cyclic, loops