S-K'
S-K'

Reputation: 3209

How to stop the Maven assembly plugin from deploying the artifact it creates

I am using the maven assembly plugin to combine two jars together using the following configuration:

<execution>
    <id>Package jar with dependencies</id>
    <phase>compile</phase>
    <goals>
        <goal>single</goal>
    </goals>
    <configuration>
        <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <appendAssemblyId>false</appendAssemblyId>
    </configuration>
</execution>

I DO NOT want the JAR that I create with the assembly plugin to be deployed, how can I stop it from being deployed?

Upvotes: 3

Views: 3944

Answers (1)

Andrew Logvinov
Andrew Logvinov

Reputation: 21831

You should specify the following configuration option for assembly plugin:

<configuration>
  ...
  <attach>false</attach>
  ...
</configuration>

Upvotes: 15

Related Questions