Maven deploy: how to restrict deployment to only artifacts? (multi-module environment)

I have a project with two modules: client and server. In the parent pom.xml, I added information for the deployment step to deploy to a local directory:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.my</groupId>
  <artifactId>myTest</artifactId>
  <version>0.1</version>
  <packaging>pom</packaging>
  <name>myTest</name>
  <modules>
    <module>server</module>
    <module>client</module>
  </modules>

<!-- for: mvn deploy -->
<distributionManagement>
    <repository> 
        <id> myRepo </id>
        <url> file:myDeployDir </url>
    </repository>
</distributionManagement>

</project>

      

When I run mvn deploy

, not only server-0.1.jar and client-0.1.jar are copied to myDeploy

, but the sum of 33 (!) Files: * pom * sha1 * md5 * xml for pom, metadata and jar.

How can I set to copy only server-0.1.jar and client-0.1.jar?

Thank!

+3


source to share


1 answer


Use maven deploy-file



deploy: deploy-file is used to install a single artifact along with its software. In this case, the artifact information can be taken from an optionally specified pomFile, but can be terminated / canceled using the command line.

+1


source







All Articles