Domanda

I use maven-dependency-plugin to copy built package to remote server. I do this so:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
<outputDirectory>/home/xxx/</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

Now I need to copy it to one more place (shared package for client and server - interfaces). How can I do it? I tried to add second outputDirectory,new block artifactItems and new block artifactItem but no result.

È stato utile?

Soluzione

You have to add another <execution> tag for this. This may share the same phase but has to have a unique id.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top