Building Share 6.2.1 fails

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Building Share 6.2.1 fails

Jump to solution

I try to build the latest version 6.2.1 of Share (released on 2020-05-11) from this tag: https://github.com/Alfresco/share/tree/alfresco-share-parent-6.2.1

  • Java version: 11.0.6, vendor: AdoptOpenJDK
  • Maven version: Apache Maven 3.6.1

`mvn package` fails with this error:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Alfresco Share Parent 6.2.1:
[INFO]
[INFO] Alfresco Share Parent .............................. SUCCESS [  2.888 s]
[INFO] Alfresco Share Services AMP ........................ SUCCESS [ 16.464 s]
[INFO] Alfresco Web Framework common libraries ............ SUCCESS [ 14.736 s]
[INFO] Alfresco Share Encryption .......................... SUCCESS [  1.114 s]
[INFO] Alfresco Share WAR ................................. FAILURE [ 23.364 s]
[INFO] Alfresco Web Editor Plugin ......................... SKIPPED
[INFO] Alfresco Web Editor ................................ SKIPPED
[INFO] Alfresco Web Editor Samples ........................ SKIPPED
[INFO] Alfresco WCMQS Parent .............................. SKIPPED
[INFO] Alfresco WCMQS Client API .......................... SKIPPED
[INFO] Alfresco WCMQS AMP ................................. SKIPPED
[INFO] Alfresco WCMQS Share AMP ........................... SKIPPED
[INFO] Alfresco WCMQS Web ................................. SKIPPED
[INFO] Packaging Alfresco Share ........................... SKIPPED
[INFO] Distribution of Alfresco Share ..................... SKIPPED
[INFO] Alfresco WebEditor Distribution Zip ................ SKIPPED
[INFO] Alfresco WCMQS Distribution Zip .................... SKIPPED
[INFO] Alfresco Share Docker image builder ................ SKIPPED
[INFO] Alfresco Share Docker AWS image builder ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:00 min
[INFO] Finished at: 2020-06-15T13:32:22+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:war (default-war) on project share: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.6:war failed: Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
[ERROR] ---- Debugging information ----
[ERROR] message             : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
[ERROR] cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
[ERROR] cause-message       : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
[ERROR] class               : org.apache.maven.plugin.war.util.WebappStructure
[ERROR] required-type       : org.apache.maven.plugin.war.util.WebappStructure
[ERROR] converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
[ERROR] path                : /webapp-structure
[ERROR] version             : null
[ERROR] -------------------------------

What is the correct way to build Share?

2 Solutions

Accepted Solutions
Highlighted
Moderator
Moderator

Re: Building Share 6.2.1 fails

Jump to solution

Not able to replicate your issue. I did not see any issues when i tried building the same tag. I doubt this error has somethig to do with the share tag https://github.com/Alfresco/share/blob/alfresco-share-parent-6.2.1 itself.

I have littile bit difference in the java version and maven version though.

Java version:

java version "11.0.4" 2019-07-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)

Maven version:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)

Here is the result for (mvn clean package):


[INFO] Skipping packaging of the test-jar [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Alfresco Share Parent 6.2.1: [INFO] [INFO] Alfresco Share Parent .............................. SUCCESS [ 4.198 s] [INFO] Alfresco Share Services AMP ........................ SUCCESS [02:10 min] [INFO] Alfresco Web Framework common libraries ............ SUCCESS [ 38.314 s] [INFO] Alfresco Share Encryption .......................... SUCCESS [ 1.978 s] [INFO] Alfresco Share WAR ................................. SUCCESS [03:10 min] [INFO] Alfresco Web Editor Plugin ......................... SUCCESS [ 4.767 s] [INFO] Alfresco Web Editor ................................ SUCCESS [ 39.968 s] [INFO] Alfresco Web Editor Samples ........................ SUCCESS [ 3.804 s] [INFO] Alfresco WCMQS Parent .............................. SUCCESS [ 0.258 s] [INFO] Alfresco WCMQS Client API .......................... SUCCESS [ 17.216 s] [INFO] Alfresco WCMQS AMP ................................. SUCCESS [ 39.754 s] [INFO] Alfresco WCMQS Share AMP ........................... SUCCESS [ 1.915 s] [INFO] Alfresco WCMQS Web ................................. SUCCESS [ 36.601 s] [INFO] Packaging Alfresco Share ........................... SUCCESS [ 0.262 s] [INFO] Distribution of Alfresco Share ..................... SUCCESS [ 7.481 s] [INFO] Alfresco WebEditor Distribution Zip ................ SUCCESS [ 2.273 s] [INFO] Alfresco WCMQS Distribution Zip .................... SUCCESS [ 2.893 s] [INFO] Alfresco Share Docker image builder ................ SUCCESS [01:00 min] [INFO] Alfresco Share Docker AWS image builder ............ SUCCESS [ 0.287 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 09:46 min [INFO] Finished at: 2020-06-24T13:09:23-04:00 [INFO] ------------------------------------------------------------------------

Couple of things you can try:

1- Instead of just mvn package, try mvn clean package or mvn clean install

2- This error: "default-war of goal org.apache.maven.plugins:maven-war-plugin:2.6:war failed: Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor"  seems to be due to incompitable plugin version on the Java Version you have. 

Try using updating the maven-war-plugin version to latest version. 

https://github.com/Alfresco/share/blob/alfresco-share-parent-6.2.1/pom.xml#L477

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)

View solution in original post

Highlighted
Member II

Re: Building Share 6.2.1 fails

Jump to solution

I had the same problem !

Before :
mvn -version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.8, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-42-generic", arch: "amd64", family: "unix"

After :
mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/apache-maven-3.6.3
Java version: 11.0.4, vendor: Oracle Corporation, runtime: /usr/lib/jvm/openjdk-11.0.4+11
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-42-generic", arch: "amd64", family: "unix"

With :
<artifactId>maven-war-plugin</artifactId>
     <version>2.6</version>

It's OK !

 Thank you !

View solution in original post

4 Replies
Highlighted
Established Member II

Re: Building Share 6.2.1 fails

Jump to solution

Have you found a solution?

Highlighted
Moderator
Moderator

Re: Building Share 6.2.1 fails

Jump to solution

Not able to replicate your issue. I did not see any issues when i tried building the same tag. I doubt this error has somethig to do with the share tag https://github.com/Alfresco/share/blob/alfresco-share-parent-6.2.1 itself.

I have littile bit difference in the java version and maven version though.

Java version:

java version "11.0.4" 2019-07-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)

Maven version:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)

Here is the result for (mvn clean package):


[INFO] Skipping packaging of the test-jar [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Alfresco Share Parent 6.2.1: [INFO] [INFO] Alfresco Share Parent .............................. SUCCESS [ 4.198 s] [INFO] Alfresco Share Services AMP ........................ SUCCESS [02:10 min] [INFO] Alfresco Web Framework common libraries ............ SUCCESS [ 38.314 s] [INFO] Alfresco Share Encryption .......................... SUCCESS [ 1.978 s] [INFO] Alfresco Share WAR ................................. SUCCESS [03:10 min] [INFO] Alfresco Web Editor Plugin ......................... SUCCESS [ 4.767 s] [INFO] Alfresco Web Editor ................................ SUCCESS [ 39.968 s] [INFO] Alfresco Web Editor Samples ........................ SUCCESS [ 3.804 s] [INFO] Alfresco WCMQS Parent .............................. SUCCESS [ 0.258 s] [INFO] Alfresco WCMQS Client API .......................... SUCCESS [ 17.216 s] [INFO] Alfresco WCMQS AMP ................................. SUCCESS [ 39.754 s] [INFO] Alfresco WCMQS Share AMP ........................... SUCCESS [ 1.915 s] [INFO] Alfresco WCMQS Web ................................. SUCCESS [ 36.601 s] [INFO] Packaging Alfresco Share ........................... SUCCESS [ 0.262 s] [INFO] Distribution of Alfresco Share ..................... SUCCESS [ 7.481 s] [INFO] Alfresco WebEditor Distribution Zip ................ SUCCESS [ 2.273 s] [INFO] Alfresco WCMQS Distribution Zip .................... SUCCESS [ 2.893 s] [INFO] Alfresco Share Docker image builder ................ SUCCESS [01:00 min] [INFO] Alfresco Share Docker AWS image builder ............ SUCCESS [ 0.287 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 09:46 min [INFO] Finished at: 2020-06-24T13:09:23-04:00 [INFO] ------------------------------------------------------------------------

Couple of things you can try:

1- Instead of just mvn package, try mvn clean package or mvn clean install

2- This error: "default-war of goal org.apache.maven.plugins:maven-war-plugin:2.6:war failed: Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor"  seems to be due to incompitable plugin version on the Java Version you have. 

Try using updating the maven-war-plugin version to latest version. 

https://github.com/Alfresco/share/blob/alfresco-share-parent-6.2.1/pom.xml#L477

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)

View solution in original post

Highlighted
Member II

Re: Building Share 6.2.1 fails

Jump to solution

I had the same problem !

Before :
mvn -version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.8, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-42-generic", arch: "amd64", family: "unix"

After :
mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/apache-maven-3.6.3
Java version: 11.0.4, vendor: Oracle Corporation, runtime: /usr/lib/jvm/openjdk-11.0.4+11
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-42-generic", arch: "amd64", family: "unix"

With :
<artifactId>maven-war-plugin</artifactId>
     <version>2.6</version>

It's OK !

 Thank you !

View solution in original post

Highlighted
Moderator
Moderator

Re: Building Share 6.2.1 fails

Jump to solution

Glad it worked

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)