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.

Bug 214911 - Maven Functional tests, possible native or package name issue
Summary: Maven Functional tests, possible native or package name issue
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1.2
Hardware: All All
: P2 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
: 216738 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-28 12:16 UTC by eclesia
Modified: 2012-11-06 11:17 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test case project (151.91 KB, application/zip)
2012-06-28 12:16 UTC, eclesia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eclesia 2012-06-28 12:16:19 UTC
Created attachment 121495 [details]
Test case project

It's related to GeertJan blog here on maven functional tests :
http://netbeans.dzone.com/nb-mvn-functional-tests

And Jesse test sample :
http://netbeans.org/bugzilla/show_bug.cgi?id=207646


I modified Jesse test projet (see attachment) to add a dependency toward another module, but strangely,adding this dependency breaks the tests with the following error :
java.io.IOException: no match for javax.media:jai_core:1.1.4-20100806.135220-1 found in
/ ...etc... :
	at org.netbeans.junit.NbModuleSuite$S.rewrite(NbModuleSuite.java:1115)
	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)

The "supposed problematic" module contain native libs and use javax.* classes. not sure if any of those unusual elements might be the source of the exception.

Source code of the JAI module can be find here :
http://sourceforge.net/scm/?type=hg&group_id=325711

Test case project attached.
Comment 1 Jaroslav Tulach 2012-08-21 15:56:21 UTC
The problem may be in using underscore in name of the OSGi bundle...
Comment 2 Jaroslav Tulach 2012-08-21 16:07:42 UTC
This is the actual classpath entry (NbModuleSuite.rewrite:1118):
"/home/jarda/.m2/repository/javax/media/jai_core/1.1.4-SNAPSHOT/jai_core-1.1.4-SNAPSHOT.jar"
but this is suffix we are trying to find:
"/javax/media/jai_core/1.1.4-20100806.135220-1/jai_core-1.1.4-20100806.135220-1.jar"

The entry ends with SNAPSHOT, but the suffix has real date. I don't know that much about Maven to understand why. Miloši, do you have an idea?
Comment 3 Milos Kleint 2012-08-27 14:18:22 UTC
(In reply to comment #2)
> This is the actual classpath entry (NbModuleSuite.rewrite:1118):
> "/home/jarda/.m2/repository/javax/media/jai_core/1.1.4-SNAPSHOT/jai_core-1.1.4-SNAPSHOT.jar"
> but this is suffix we are trying to find:
> "/javax/media/jai_core/1.1.4-20100806.135220-1/jai_core-1.1.4-20100806.135220-1.jar"
> 
> The entry ends with SNAPSHOT, but the suffix has real date. I don't know that
> much about Maven to understand why. Miloši, do you have an idea?

1.1.4-20100806.135220-1 is basically 1.1.4-SNAPSHOT but timestamped. snapshots are typically stored in 1.1.4-SNAPSHOT version folder, which then contains both the latest snapshot with the name xxx-SNAPSHOT and the various timestamped snapshots..

/javax/media/jai_core/1.1.4-SNAPSHOT/jai_core-1.1.4-20100806.135220-1.jar could work.

/javax/media/jai_core/1.1.4-SNAPSHOT/jai_core-1.1.4-SNAPSHOT.jar would be better in most situations (unless someone explicitly depends on a version that is timestamped..

from the code it's not clear where the you get the the maven coordinates from, but I suppose you can go on with the information provided. reassigning back.
Comment 4 Jaroslav Tulach 2012-10-31 15:40:27 UTC
The snapshot version comes from 
.m2/repository/org/puzzlegis/pz-jai/1.1.4.0/pz-jai-1.1.4.0.jar
JAR via its Maven-Class-Path attribute. If the Maven-Class-Path attribute would point to javax.media:jai_core:1.1.4-1.1.4-SNAPSHOT.jar the NbModuleSuite would run properly.

I am not sure why the Maven-Class-Path attribute is generate the way it is generated.
Comment 5 Milos Kleint 2012-10-31 16:06:18 UTC
I suppose a duplicate of http://jira.codehaus.org/browse/MNBMODULE-171, fixed in nbm-maven-plugin 3.8 (preferably update to 3.8.1)

marking as fixed, cannot mark as duplicate of xternal issue
Comment 6 Jaroslav Tulach 2012-11-06 11:17:28 UTC
*** Bug 216738 has been marked as a duplicate of this bug. ***