maven-war-plugin does not change .war default directory

Andrew :

I try to change default .war directory by using maven-war-plugin

<plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-war-plugin</artifactId>
      <version>3.2.2</version>
      <configuration>
        <warSourceDirectory>${project.basedir}/src</warSourceDirectory>
      </configuration>
</plugin>

But it does not work. In the sense of my .war creates in the defaul (target) directory. I tried to use , but with the same result. What am I do wrong?

Timo :

You can use warSourceDirectory to configure additional directories to be packaged into the WAR file.


The outputDirectory property should do what you want to achieve:

The directory for the generated WAR.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=358171&siteId=1