Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2015

Bundle.properties not found in NB Module project using Maven infrastructure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Next
    • None
    • apisupport - Maven
    • None
    • Linux, release build 382 on JDK 11 (using JDK 8 for the build);
      also tested with NB 10 on JDK 9.

    Description

      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>

      Attachments

        Activity

          People

            Unassigned Unassigned
            epdv Peter Nabbefeld
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: