Tried to build alfresco-community-share source with java 11 and maven 3.6.0 but mvn command(mvn clean install $AMPS -DskipTests=true -DskipTests -Dmaven.javadoc.skip=true -Pall-tas-tests -Pbuild-docker-images -Dimage.tag=latest -Drepo.image.tag=latest) failed with below error
[INFO] yui-common.js (3064636b)
[INFO] nb warnings: 0, nb errors: 0
[INFO]
[INFO] --- maven-war-plugin:2.6:war (default-war) @ share ---
[INFO] Packaging webapp
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Alfresco Share Parent 14.16:
[INFO]
[INFO] Alfresco Share Parent .............................. SUCCESS [ 2.233 s]
[INFO] Alfresco Web Framework common libraries ............ SUCCESS [ 17.219 s]
[INFO] Alfresco Share Encryption .......................... SUCCESS [ 1.124 s]
[INFO] Alfresco Share WAR ................................. FAILURE [ 29.031 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-tests ............................... SKIPPED
[INFO] AMPs ............................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52.042 s
[INFO] Finished at: 2021-11-29T07:03:56Z
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "local" could not be activated because it does not exist.
[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] path : /webapp-structure
[ERROR] -------------------------------
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :share
root@98e8b75a4f48:~/alfresco-community-share#
Environment
root@06fd41ebdb04:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@06fd41ebdb04:~# java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.18.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.18.04, mixed mode, sharing)
root@06fd41ebdb04:~# mvn --version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "4.15.0-161-generic", arch: "amd64", family: "unix"
root@06fd41ebdb04:~#
Steps followed:
git clone https://github.com/Alfresco/alfresco-community-share.git
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
cd alfresco-community-share/
mvn clean install $AMPS -DskipTests=true -DskipTests -Dmaven.javadoc.skip=true -Pall-tas-tests -Pbuild-docker-images -Dimage.tag=latest -Drepo.image.tag=latest
Tried changing versions for war plugin, mvn and java but failure still observed.
Anyone has observed such build issue before ? Am I missing something ? Please suggest