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 253337 - TemplateRegistration on mavenized modules raise NoSuchFileException (Failed to read generated-layer.xml)
Summary: TemplateRegistration on mavenized modules raise NoSuchFileException (Failed t...
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Templates (show other bugs)
Version: 8.1
Hardware: PC Other
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: JDK_9
Depends on:
Blocks:
 
Reported: 2015-07-07 13:52 UTC by skygo
Modified: 2015-12-02 13:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
zip of a simple mavenized module (8.47 KB, application/zip)
2015-07-07 13:52 UTC, skygo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description skygo 2015-07-07 13:52:22 UTC
Created attachment 154504 [details]
zip of a simple mavenized module

Hi,
 I was trying to build a mavenized project that is working nice on jdk8 and I try to look forward to jdk9. Some module compile well but some other doesn't. The non compiling module use annotation that construct layer.

I attach a sample containing jdk9 specific code (JDK9Code.java) to be sure I was using jdk9.

DummyTemplate contains the registration of a project template we currently use.
At compilation time it fails with the following error:

Failed to read generated-layer.xml: java.nio.file.NoSuchFileException: {path}\target\classes\META-INF\generated-layer.xml

I guess it's not limited to TemplateRegistration.
Comment 1 Martin Entlicher 2015-07-08 14:33:28 UTC
Thanks for the test project.
Fixed by changeset:   289482:732f2eafab93
http://hg.netbeans.org/core-main/rev/732f2eafab93
Comment 2 skygo 2015-07-16 15:52:34 UTC
thanks for the fix. I had to wait until core was propagated to main silver.
Comment 3 Quality Engineering 2015-07-17 01:17:55 UTC
Integrated into 'main-silver', will be available in build *201507170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/732f2eafab93
User: mentlicher@netbeans.org
Log: #253337: When the layer file does not exist, not only FileNotFoundException, but also NoSuchFileException can be thrown.
Comment 4 skygo 2015-12-02 13:28:19 UTC
issue #253529 has the same cause.