Hello,
I'm experiencing differences between "mvn" and "mvn-rpmbuild". With "mvn" the project builds fine; while I have the following error when using "mvn-rpmbuild":
DEBUG: [INFO] ------------------------------------------------------------------------ DEBUG: [INFO] Building guacamole-common-js 0.7.3 DEBUG: [INFO] ------------------------------------------------------------------------ DEBUG: [INFO] DEBUG: [INFO] --- maven-assembly-plugin:2.4:attached (make-zip) @ guacamole-common-js --- DEBUG: [INFO] Reading assembly descriptor: static.xml DEBUG: [INFO]
DEBUG: [INFO] ------------------------------------------------------------------------ DEBUG: [INFO] Skipping guacamole-client DEBUG: [INFO] This project has been banned from the build due to previous failures. DEBUG: [INFO] ------------------------------------------------------------------------ DEBUG: [INFO] ------------------------------------------------------------------------ DEBUG: [INFO] Reactor Summary: DEBUG: [INFO] DEBUG: [INFO] guacamole-common .................................. SUCCESS [6.322s] DEBUG: [INFO] guacamole-ext ..................................... SUCCESS [0.992s] DEBUG: [INFO] guacamole-common-js ............................... FAILURE [1.208s] DEBUG: [INFO] guacamole ......................................... SKIPPED DEBUG: [INFO] guacamole-client .................................. SKIPPED DEBUG: [INFO] ------------------------------------------------------------------------ DEBUG: [INFO] BUILD FAILURE DEBUG: [INFO] ------------------------------------------------------------------------ DEBUG: [INFO] Total time: 12.590s DEBUG: [INFO] Finished at: Wed Jul 17 21:19:17 CEST 2013 DEBUG: [INFO] Final Memory: 25M/224M DEBUG: [INFO] ------------------------------------------------------------------------ DEBUG: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:attached (make-zip) on project guacamole-common-js: Assembly is incorrectly configured: null: Assembly is incorrectly configured: null: DEBUG: [ERROR] Assembly: null is not configured correctly: Assembly ID must be present and non-empty.
The project submodule contains the correct Assembly ID:
<build>
<plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptors> <descriptor>static.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>make-zip</id> <phase>package</phase> <goals> <goal>attached</goal> </goals> </execution> </executions> </plugin> </plugins>
</build>
The only way I've found so far to build the project is to patch away the guacamole-common-js module from the build. Can someone explain me what should I do?
Thanks, --Simone
Well, I think I've found the culprit.
On 17 July 2013 21:21, Simone Caronni negativo17@gmail.com wrote:
DEBUG: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:attached (make-zip) on project guacamole-common-js: Assembly is incorrectly configured: null: Assembly is incorrectly configured: null: DEBUG: [ERROR] Assembly: null is not configured correctly: Assembly ID must be present and non-empty.
If I use "mvn" instead of "mvn-rpmbuild" the project downloads version 2.2-beta5 instead of 2.4 of the maven-assembly-plugin:
DEBUG: [INFO] --- maven-assembly-plugin:2.2-beta-5:attached (make-zip) @ guacamole-common-js ---
Should a "null" error ever be returned? Should I change anything for 2.4?
Regards, --Simone
On 07/17/2013 09:21 PM, Simone Caronni wrote:
Hello,
I'm experiencing differences between "mvn" and "mvn-rpmbuild". With "mvn" the project builds fine; while I have the following error when using "mvn-rpmbuild":
[...] DEBUG: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:attached (make-zip) on project guacamole-common-js: Assembly is incorrectly configured: null: Assembly is incorrectly configured: null: DEBUG: [ERROR] Assembly: null is not configured correctly: Assembly ID must be present and non-empty.
This is answered in Maven Assembly Plugin FAQ: http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-clas...
In short, assembly ID is missing. You need to add it to Assembly Descriptor.
The project submodule contains the correct Assembly ID:
<build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptors> <descriptor>static.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>make-zip</id> <phase>package</phase> <goals> <goal>attached</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
This looks like fragment of POM. Assembly ID is part of Assembly Descriptor, not Project Object Model.
The only way I've found so far to build the project is to patch away the guacamole-common-js module from the build. Can someone explain me what should I do?
Patching assembly descriptor should help:
sed -i '/<assembly>/a\ <id>foo</id>' src/main/assembly/static.xml
Alternatively add <appendAssemblyId>false</appendAssemblyId> to plugin configuration (recommended in the FAQ, but not by me).
Many thanks!
On 18 July 2013 05:14, Mikolaj Izdebski mizdebsk@redhat.com wrote:
Patching assembly descriptor should help:
sed -i '/<assembly>/a\ <id>foo</id>' src/main/assembly/static.xml
Alternatively add <appendAssemblyId>false</appendAssemblyId> to plugin configuration (recommended in the FAQ, but not by me).
This patch directly from the developer fixes it:
From ac8222430c54245f78cffa5bd9b031811380481c Mon Sep 17 00:00:00 2001
From: Michael Jumper mike.jumper@guac-dev.org Date: Wed, 17 Jul 2013 15:10:53 -0700 Subject: [PATCH] Use assembly plugin 2.4, add missing ID.
--- guacamole-common-js/pom.xml | 2 ++ guacamole-common-js/static.xml | 1 + 2 files changed, 3 insertions(+)
diff --git a/guacamole-common-js/pom.xml b/guacamole-common-js/pom.xml index 2913103..5d3dd1d 100644 --- a/guacamole-common-js/pom.xml +++ b/guacamole-common-js/pom.xml @@ -18,7 +18,9 @@ <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> + <version>2.4</version> <configuration> + <appendAssemblyId>false</appendAssemblyId> <descriptors> <descriptor>static.xml</descriptor> </descriptors> diff --git a/guacamole-common-js/static.xml b/guacamole-common-js/static.xml index f9b6bdf..d3903dc 100644 --- a/guacamole-common-js/static.xml +++ b/guacamole-common-js/static.xml @@ -1,5 +1,6 @@ <assembly> <baseDirectory>guacamole-common-js</baseDirectory> + <id>guacamole-common-js</id> <formats> <format>zip</format> </formats>
On 07/18/2013 08:37 AM, Simone Caronni wrote:
Many thanks!
On 18 July 2013 05:14, Mikolaj Izdebski mizdebsk@redhat.com wrote:
Patching assembly descriptor should help:
sed -i '/<assembly>/a\ <id>foo</id>' src/main/assembly/static.xml
Alternatively add <appendAssemblyId>false</appendAssemblyId> to plugin configuration (recommended in the FAQ, but not by me).
This patch directly from the developer fixes it: [...]
Right. I made a very similar fix in one of my projects 2 months ago, but I forgot that appendAssemblyId is really needed indeed.
https://github.com/mizdebsk/xmvn/commit/96ea6d3
commit 96ea6d3b879e7738fa8c5c496e09e875233e313b Author: Mikolaj Izdebski mizdebsk@redhat.com Date: Fri May 17 10:35:56 2013 +0200
Add mandatory assembly ID
Version of assembly plugin was recently bumped. In currently used version assembly ID is mandatory, see MASSEMBLY-464.
diff --git a/pom.xml b/pom.xml index 50c1773..decb149 100644 --- a/pom.xml +++ b/pom.xml @@ -89,6 +89,7 @@ <goal>single</goal> </goals> <configuration> + <appendAssemblyId>false</appendAssemblyId> <descriptors> <descriptor>src/main/assembly/bin.xml</descriptor> </descriptors> diff --git a/src/main/assembly/bin.xml b/src/main/assembly/bin.xml index 992c9ed..db104d0 100644 --- a/src/main/assembly/bin.xml +++ b/src/main/assembly/bin.xml @@ -15,6 +15,7 @@ ! limitations under the License. `--> <assembly> + <id>bin</id> <formats> <format>tar.bz2</format> </formats>
java-devel@lists.fedoraproject.org