[ 
https://issues.apache.org/jira/browse/NETBEANS-2015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16755247#comment-16755247
 ] 

Peter Nabbefeld commented on NETBEANS-2015:
-------------------------------------------

IMO, it's an issue with paths:

When editing, the Bundle.properties file is obviously found, otherwise parsing 
would show error bulbs. So I'd state "Source path includes resources".

When compiling the first time, resources are not available during compilation, 
so resources are obviously not part of the compile class path. On second 
compile, the Bundle.properties already have been copied to target/classes, so 
they're found there. So I'd state "Compile class path includes target/classes, 
but not src/main/resources".

So the problem here is missing resources in compilation phase.

> Bundle.properties not found in NB Module project using Maven infrastructure
> ---------------------------------------------------------------------------
>
>                 Key: NETBEANS-2015
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2015
>             Project: NetBeans
>          Issue Type: Bug
>          Components: apisupport - Maven
>    Affects Versions: Next
>         Environment: Linux, release build 382 on JDK 11 (using JDK 8 for the 
> build);
> also tested with NB 10 on JDK 9.
>            Reporter: Peter Nabbefeld
>            Priority: Major
>
> Ig ot problems using the following annotation (though it seems to be a 
> general annotation processing problem):
>  
> @TopComponent.OpenActionRegistration( 
>         displayName = "#CTL_CfgEdAction", 
>         preferredID = "CfgEdTopComponent" 
> ) 
> I removed the @NbBundle.Messages in the same source file as it seemed (not 
> further investigated that) to conflict with another one in another component, 
> adding the message to the Bundle.properties file in the same package (but of 
> course in src/main/resources folder).
> While it does not cause problems in the editor, for some unknown reason it 
> causes problems with Maven build structure. Even worse, annotation processing 
> stops after an exception is thrown (Bundle.properties not found), so also no 
> generated-layer.xml file is created.
> When I build my module again, the Build.properties file is found, but still 
> no layer file is generated.
> I've tried to work around the problem using this snippet in my POM, but it 
> failed to work for me: 
>              <plugin> 
> <groupId>org.apache.maven.plugins</groupId> 
> <artifactId>maven-resources-plugin</artifactId> 
>                 <version>3.1.0</version> 
>                 <executions> 
>                     <execution> 
>                         <id>pre-merge-properties</id> 
>                         <phase>initialize</phase> 
>                         <goals> 
>                             <goal>copy-resources</goal> 
>                         </goals> 
>                         <configuration> 
> <outputDirectory>target/classes</outputDirectory> 
>                             <resources> 
>                                 <resource> 
> <directory>src/main/resources</directory> 
>                                     <includes> 
> <include>*.properties</include> 
>                                     </includes> 
>                                 </resource> 
>                             </resources> 
>                         </configuration> 
>                     </execution> 
>                 </executions> 
>             </plugin>



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to