We're moving from Maven to Gradle and are struggling with one thing. We have a multi-project Gradle-project based on the POMs from Maven. Most of it works fine, but we cannot find out a way to collect the WAR-files and ZIP-files which are the result from building the sub-projects. Each sub-project represents a micro service. We have found (also on Stackoverflow) ways to collect all of the jars and third party libs into a directory. However, we are looking for a way to collect the resources and libraries per micro service. In Maven we did something like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>Publish/</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>....</groupId>
<artifactId>...</artifactId>
<version>${project.version}</version>
<type>zip</type>
</artifactItem>
<artifactItem>
<groupId>....</groupId>
<artifactId>...</artifactId>
<version>${project.version}</version>
<type>war</type>
</artifactItem>
I would like to end up with a directory where I can find:
project1.war
project2.war
project3.zip
etc.