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

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

Copying Bundle.properties to target/generated-sources/annotations before 
compiling (using maven-resources-plugin) solved the problem. Obviously the 
annotions processors have problems with Maven's folder structure, so this needs 
to be fixed.

Another problem which should be fixed is aborting the whole generation process, 
if one generation fails. Either, every step should do its own error handling 
(so the process can continue), or there should be an explicit message like 
"Generating sources has been abandoned because of this exception" (usually it 
will follow an exception thrown from a generation step).

> 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: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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

Reply via email to