If you create a Java With Maven -> Web Application, the generated project
does not build.

it's some kind of maven issue.

Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war
(default-war) on project nbwartest: Execution default-war of goal
org.apache.maven.plugins:maven-war-plugin:2.3:war failed: Unable to load
the mojo 'war' in the plugin
'org.apache.maven.plugins:maven-war-plugin:2.3' due to an API
incompatibility:
org.codehaus.plexus.component.repository.exception.ComponentLookupException:
null

After some poking about, it seems that the 2.3 WAR plugin is not compatible
with JDK 16.

It works fine with JDK 11.

If you upgrade the maven war plugin in the pom to 3.3.2:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.3.2</version>
            </plugin>

Then it works in Netbeans.

This seems to be an issue with the combination of JDK 16 and that plugin.

So whomever is maintaining the maven prototype that NB is using should
either update their prototype, or push a new version and a change to NB to
use the new version.

Regards,

Will Hartung

Reply via email to