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

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

I accidently deleted my sources when I tried to create a repository on Github 
and push them - rebased my local repository instead of merging.  :-/

So, here are the steps to reproduce:
 # Create a NB Module project with Maven infrastructure
 # Create a Window component.
 # Create a Bundle.properties file with CTL_CfgEdAction=Some text
 # Remove the NbBundle.Messages annotation.
 # Try to build.

First time, it will show error messages about the Bundle.properties file. 
Second build it will not show any errors, but also it won't generate a layer 
file.

> 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