maven assembly include the current project jar in the final zip/tar

In <dependencySet> you can exclude the current project jar by saying <useProjectArtifact>false</useProjectArtifact>, but it’s true by default, so it should work.

From the warning, it seems that you need to do mvn package first, but due to some internal maven issue, it does not work if you do mvn package and mvn assembly:single in separate commands.

It works if you do mvn package assembly:single in one command.

Alternatively, add maven-assembly-plugin in your pom and bind it to the ‘package’ phase so it will trigger automatically on mvn package:

   <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>tar-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>etc/assembly.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)