Issue
Hi I have a problem with only one project, while release it fails wiht Return code is: 400, ReasonPhrase: Bad Request. In log I see that it wanted to deploy same artifact second time. it was working before Ive updated maven to 3.3.3 maven-source-plugin - 2.4 Here is my pom
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>maven-depmgt-pom</artifactId>
<groupId>my.parent</groupId>
<version>4.0.0-beta-11-SNAPSHOT</version>
</parent>
<groupId>my.groupId</groupId>
<artifactId>my.artid</artifactId>
<version>4.0.0-beta-11-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Che Terminal</name>
<scm>
<connection>scm:git:[email protected]:myorg/myproj.git</connection>
<developerConnection>scm:git:[email protected]:myorg/myproj.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/myorg/myproj</url>
</scm>
<properties>
<project.go.build.dir>${project.build.directory}/go</project.go.build.dir>
<project.zip.dir>${project.build.directory}/dir/terminal</project.zip.dir>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<updateOnly>false</updateOnly>
<descriptor>${project.basedir}/src/assembly/assembly.xml</descriptor>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy file="index.html" todir="${project.zip.dir}" />
<copy file="term.js" todir="${project.zip.dir}" />
<copy file="server.go" todir="${project.go.build.dir}" />
</target>
</configuration>
</execution>
<execution>
<id>copy-terminal-bin</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy file="${project.go.build.dir}/terminal" todir="${project.zip.dir}" />
<chmod file="${project.zip.dir}/terminal" perm="+x" />
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>compile-websocket</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>go</executable>
<workingDirectory>${project.go.build.dir}</workingDirectory>
<arguments>
<argument>get</argument>
<argument>github.com/myorg/myprj</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>compile-pty</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>go</executable>
<workingDirectory>${project.go.build.dir}</workingDirectory>
<arguments>
<argument>get</argument>
<argument>github.com/myorg/pty</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>compile-server</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>go</executable>
<workingDirectory>${project.go.build.dir}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-o</argument>
<argument>terminal</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Solution
Your problem could be in incorrect maven-assembly-plugin configuration. Effective pom shows
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.3</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<updateOnly>false</updateOnly>
<descriptor>/Users/sj/dev/src/codenvy/che-websocket-terminal/src/assembly/assembly.xml</descriptor>
<tarLongFileMode>gnu</tarLongFileMode>
<useJvmChmod>true</useJvmChmod>
<recompressZippedFiles>false</recompressZippedFiles>
</configuration>
</execution>
</executions>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<updateOnly>false</updateOnly>
<descriptor>/Users/sj/dev/src/codenvy/che-websocket-terminal/src/assembly/assembly.xml</descriptor>
<tarLongFileMode>gnu</tarLongFileMode>
<useJvmChmod>true</useJvmChmod>
<recompressZippedFiles>false</recompressZippedFiles>
</configuration>
</plugin>
I assume it means artifact generated two times.
Correct configuration should be:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<updateOnly>false</updateOnly>
<descriptor>${project.basedir}/src/assembly/assembly.xml</descriptor>
</configuration>
</execution>
</executions>
</plugin>
Answered By - Sergii Kabashniuk