This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 118373 [details] Project archive. NBP Maven Application + One module with the processing dependency I have issues building a Netbeans Platform application with Maven with a particular library. It works fine until I include this library as a dependency of a module. This library is processing 1.5.1 (http://processing.org), which is unfortunately not available in central. The library doesn't have any dependency and I installed it locally. The library's JARs seems totally fine ans is widely used. Way to reproduce: 1) Create a new NBP Maven application 2) Create a new module and add it as a dependency to the application 3) Build with dependencies the app to verify it works fine. 4) Now add org.processing as a dependency to the module. 5) Build with dependencies the application. The surefire test fails with the following error: ------------------------------------------------------------------------------- Test set: test.netbeans.bugmaven.ApplicationTest ------------------------------------------------------------------------------- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.903 sec <<< FAILURE! org.netbeans.junit.NbModuleSuite$S@288051(org.netbeans.junit.NbModuleSuite$S) Time elapsed: 0 sec <<< ERROR! java.io.IOException: read wrong amount at org.netbeans.junit.NbModuleSuite$S.rewrite(NbModuleSuite.java:1146) at org.netbeans.junit.NbModuleSuite$S.turnClassPathModules(NbModuleSuite.java:1080) at org.netbeans.junit.NbModuleSuite$S.runInRuntimeContainer(NbModuleSuite.java:855) at org.netbeans.junit.NbModuleSuite$S.access$100(NbModuleSuite.java:660) at org.netbeans.junit.NbModuleSuite$S$1.protect(NbModuleSuite.java:679) at junit.framework.TestResult.runProtected(TestResult.java:128) at org.netbeans.junit.NbModuleSuite$S.run(NbModuleSuite.java:677) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) I'm adding a projet test archive and the dependency JAR (core-1.5.1.jar).
Created attachment 118374 [details] processing JAR Library JAR for the org.processing dependency: <dependency> <groupId>org.processing</groupId> <artifactId>core</artifactId> <version>1.5.1</version> </dependency>
*** This bug has been marked as a duplicate of bug 207646 ***
I tested on the latest nightly build and the problem remains the same.
What version of the IDE you are using is irrelevant. It only matters what version of nbjunit you are using in the project's dependencies - RELEASE711 according to your attachment. You can add the NB snapshot repo [1] and try switching the version of org.netbeans.api:org-netbeans-modules-nbjunit to SNAPSHOT in application/pom.xml. [1] http://bits.netbeans.org/netbeans/trunk/maven-snapshot/
Thanks Jesse. That makes sense. I tried what you suggest using the SNAPSHOT version of the nbjunit module but the test is freezing and I have to kill it. The surefire report doesn't contain anything after that. That happens on a newly created project without any external dependencies as well. Can someone reproduce that? Thanks.
I could reproduce the freezing of the SNAPSHOT-version. Working with the nightly build 201205020400 produces also the same IOException with my project. What me helped was to change the copy-mechanism in the NbModuleSuite.java beginning from line 1144 to a slow bitwise copy. Ok, it´s less than optimal, but the error is blown away.