Convert existing web application structure to maven file structure?

I have an existing web application that creates a .war file. I want to convert the directory structure to maven conventions. And I lost a little.

In particular, the current .war created using ant target does not copy anything to the .war in the subtree of the site / static directory; it is copied by another, different purpose ant.

But if I want to launch, for example, the pier from maven (and I do!), I need to copy the site / statics / ** /. somewhere in the maven directory target. I don't know how to do this, given the maven rules.

Thank.

Here's the existing directory structure as a (sorry) screenshot of an Eclipse form:

+3
1

maven , , maven.pom .

Maven war .

${basedir}/src/main/webapp - , jsp , war war. , pom. , .

script pom:

<plugins>
  ...
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
      <webResources>
        <resource>
          <directory>/absolute/path/to/external/static/</directory>
        </resource>
      </webResources>
    </configuration>
  </plugin>
  ...
</plugins>

pom ( ) ${xxx}

+6

Source: https://habr.com/ru/post/1776541/


All Articles