I am trying to build tar file using maven assembly plugin and below is the code snippet for the same. When I am doing build from CMD prompt using mvn install command then tar is generating whereas it is not working from eclipse and getting the below logs. Note:- Maven and JDK is common for both the execution.
pom.xml
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
Eclipse console
[INFO] --- maven-assembly-plugin:2.2.1:attached (default) @ test ---
[INFO] Assemblies have been skipped per configuration of the skipAssembly parameter.
[INFO]
[INFO] --- test-assembly-verifier:1.4:verify (default) @ test ---
[INFO] Skipping assembly verification.
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ test ---
[INFO] Skipping artifact installation
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
CMD console
[INFO] --- maven-assembly-plugin:2.2.1:attached (default) @ test ---
[INFO] Reading assembly descriptor: assembly.xml
Looks maven-assembly-plugin goal [assembly:single] can only be run from command line.
http://maven.apache.org/plugins-archives/maven-assembly-plugin-2.5.5/attached-mojo.html
If any solution will be available, please advise.