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 212077 - jhelpset.hs in maven build not found using Java 1.7.0_03
Summary: jhelpset.hs in maven build not found using Java 1.7.0_03
Status: RESOLVED DUPLICATE of bug 196452
Alias: None
Product: apisupport
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 181355
  Show dependency tree
 
Reported: 2012-05-04 10:48 UTC by toben
Modified: 2012-05-07 21:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description toben 2012-05-04 10:48:35 UTC
Product Version = NetBeans IDE Dev (Build nbms-and-javadoc-9263-on-20120501)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_03
Runtime = Java HotSpot(TM) 64-Bit Server VM 22.1-b02


I have a documentation module containing all my javahelp - files. Using Java 1.6 there is no problem but switching to Java 1.7 the nbm-maven-plugin?? does not find my jhelpset.hs file anymore which is specified in a package-info.java using the following code:

@HelpSetRegistration(helpSet = "jhelpset.hs", position = 40)


This is the exception that is thrown:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project nas.docs: Compilation failure
\work\alkis\nasgui\nas.docs\src\main\java\com\gingko\nas\docs\package-info.java:[1,0] error: Could not parse com/gingko/nas/docs/jhelpset.hs: java.io.FileNotFoundException: com/gingko/nas/docs/jhelpset.hs
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project nas.docs: Compilation failure
\work\alkis\nasgui\nas.docs\src\main\java\com\gingko\nas\docs\package-info.java:[1,0] error: Could not parse com/gingko/nas/docs/jhelpset.hs: java.io.FileNotFoundException: com/gingko/nas/docs/jhelpset.hs

	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
\work\alkis\nasgui\nas.docs\src\main\java\com\gingko\nas\docs\package-info.java:[1,0] error: Could not parse com/gingko/nas/docs/jhelpset.hs: java.io.FileNotFoundException: com/gingko/nas/docs/jhelpset.hs

	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Comment 1 Jesse Glick 2012-05-04 14:56:24 UTC
Sounds like a JDK bug. Did you try with 7u4? And when reporting bugs like this please attach a complete, minimal test case to reproduce (i.e. an nbm-packaging project buildable in isolation which demonstrates the problem).
Comment 2 toben 2012-05-07 07:12:55 UTC
I was using some RELEASE701 modules as dependencies. Upgrading to RELEASE711 or RELEASE712 solved this issue. So this is already fixed. It is definitly not a 72 bug. This was my mistake to put it there.
Comment 3 Jesse Glick 2012-05-07 21:22:31 UTC
Indeed it works in RELEASE71 but not RELEASE701 in JDK 7; the refactoring in bug #196452 seems to have provided the fix. In particular, getResource(SOURCE_PATH, ...) throws FNFE even before openInputStream can be called, which the LayerBuilder.validateResource utility method handles, but which the old HelpSetRegistrationProcessor did not. When run under JDK 6 the old processor worked, because it was assuming a buggy behavior of Filer which was fixed in JDK 7. So the summary is that NB 7.1 added JDK 7 support for this annotation, somewhat by accident.

*** This bug has been marked as a duplicate of bug 196452 ***