0

After I have build my project as jar and zip files in target, I would like to copy them to other folder, lets say distribution. I use following plugin configuration in my pom:

<plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
                <execution>
                    <id>copy-resources</id>
                    <!-- here the phase you need -->
                    <phase>package</phase>
                    <goals>
                        <goal>copy-resources</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>/distribution</outputDirectory>
                        <resources>
                            <resource>
                                <directory>${project.build.directory}</directory>
                                <filtering>true</filtering>
                                <include>*.jar</include>
                                <include>*.zip</include>
                            </resource>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>

enter image description here

After building project no files are moved to distribution folder. Any idea whay?

Community
  • 1
  • 1
user1167753
  • 705
  • 3
  • 7
  • 15

1 Answers1

0

This fixed the issue:

<outputDirectory>${project.basedir}/distribution</outputDirectory>
user1167753
  • 705
  • 3
  • 7
  • 15