For future reference, this was caused by a bug in the ubuntu maven package.
The fix is:

cd /usr/share/maven/libsudo ln -s ../../java/commons-lang.jar .

Phil

On Sun, Jul 5, 2015 at 11:44 AM, Phil Lello <p...@dunlop-lello.uk> wrote:

> Hi,
>
> I'm struggling to get the SCM Publish plugin to run as part of the
> post-site phase; running mvn -X site-deploy includes the following error:
>
> Caused by: org.apache.maven.plugin.PluginContainerException: A required
> class was missing while executing
> org.apache.maven.plugins:maven-site-plugin:3.4:stage:
> org/apache/commons/lang/StringUtils
> -----------------------------------------------------
> realm =    plugin>org.apache.maven.plugins:maven-site-plugin:3.4
> strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
> urls[0] =
> file:/home/phil/.m2/repository/org/apache/maven/plugins/maven-site-plugin/3.4/maven-site-plugin-3.4.jar
> urls[1] =
> file:/home/phil/.m2/repository/org/apache/maven/reporting/maven-reporting-exec/1.2/maven-reporting-exec-1.2.jar
> urls[2] =
> file:/home/phil/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
> urls[3] =
> file:/home/phil/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.3/maven-shared-utils-0.3.jar
> urls[4] =
> file:/home/phil/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
> urls[5] =
> file:/home/phil/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
> urls[6] =
> file:/home/phil/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
> urls[7] =
> file:/home/phil/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
> urls[8] =
> file:/home/phil/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
> urls[9] =
> file:/home/phil/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
> urls[10] =
> file:/home/phil/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
> urls[11] =
> file:/home/phil/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
> urls[12] =
> file:/home/phil/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
> urls[13] =
> file:/home/phil/.m2/repository/org/apache/maven/maven-archiver/2.4.2/maven-archiver-2.4.2.jar
> urls[14] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.6/doxia-sink-api-1.6.jar
> urls[15] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.6/doxia-logging-api-1.6.jar
> urls[16] = file:/home/phil/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
> urls[17] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-core/1.6/doxia-core-1.6.jar
> urls[18] =
> file:/home/phil/.m2/repository/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar
> urls[19] =
> file:/home/phil/.m2/repository/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar
> urls[20] =
> file:/home/phil/.m2/repository/org/apache/httpcomponents/httpclient/4.0.2/httpclient-4.0.2.jar
> urls[21] =
> file:/home/phil/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
> urls[22] =
> file:/home/phil/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar
> urls[23] =
> file:/home/phil/.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar
> urls[24] =
> file:/home/phil/.m2/repository/xmlunit/xmlunit/1.5/xmlunit-1.5.jar
> urls[25] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-module-xhtml/1.6/doxia-module-xhtml-1.6.jar
> urls[26] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-module-apt/1.6/doxia-module-apt-1.6.jar
> urls[27] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-module-xdoc/1.6/doxia-module-xdoc-1.6.jar
> urls[28] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-module-fml/1.6/doxia-module-fml-1.6.jar
> urls[29] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-module-markdown/1.6/doxia-module-markdown-1.6.jar
> urls[30] =
> file:/home/phil/.m2/repository/org/pegdown/pegdown/1.2.1/pegdown-1.2.1.jar
> urls[31] =
> file:/home/phil/.m2/repository/org/parboiled/parboiled-java/1.1.4/parboiled-java-1.1.4.jar
> urls[32] =
> file:/home/phil/.m2/repository/org/parboiled/parboiled-core/1.1.4/parboiled-core-1.1.4.jar
> urls[33] = file:/home/phil/.m2/repository/org/ow2/asm/asm/4.1/asm-4.1.jar
> urls[34] =
> file:/home/phil/.m2/repository/org/ow2/asm/asm-tree/4.1/asm-tree-4.1.jar
> urls[35] =
> file:/home/phil/.m2/repository/org/ow2/asm/asm-analysis/4.1/asm-analysis-4.1.jar
> urls[36] =
> file:/home/phil/.m2/repository/org/ow2/asm/asm-util/4.1/asm-util-4.1.jar
> urls[37] =
> file:/home/phil/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar
> urls[38] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.6/doxia-decoration-model-1.6.jar
> urls[39] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-site-renderer/1.6/doxia-site-renderer-1.6.jar
> urls[40] =
> file:/home/phil/.m2/repository/org/apache/velocity/velocity-tools/2.0/velocity-tools-2.0.jar
> urls[41] =
> file:/home/phil/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
> urls[42] =
> file:/home/phil/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar
> urls[43] =
> file:/home/phil/.m2/repository/commons-chain/commons-chain/1.1/commons-chain-1.1.jar
> urls[44] =
> file:/home/phil/.m2/repository/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.jar
> urls[45] = file:/home/phil/.m2/repository/dom4j/dom4j/1.1/dom4j-1.1.jar
> urls[46] =
> file:/home/phil/.m2/repository/sslext/sslext/1.2-0/sslext-1.2-0.jar
> urls[47] =
> file:/home/phil/.m2/repository/org/apache/struts/struts-core/1.3.8/struts-core-1.3.8.jar
> urls[48] = file:/home/phil/.m2/repository/antlr/antlr/2.7.2/antlr-2.7.2.jar
> urls[49] =
> file:/home/phil/.m2/repository/org/apache/struts/struts-taglib/1.3.8/struts-taglib-1.3.8.jar
> urls[50] =
> file:/home/phil/.m2/repository/org/apache/struts/struts-tiles/1.3.8/struts-tiles-1.3.8.jar
> urls[51] =
> file:/home/phil/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
> urls[52] =
> file:/home/phil/.m2/repository/org/apache/maven/doxia/doxia-integration-tools/1.6/doxia-integration-tools-1.6.jar
> urls[53] =
> file:/home/phil/.m2/repository/org/codehaus/plexus/plexus-archiver/2.4.3/plexus-archiver-2.4.3.jar
> urls[54] =
> file:/home/phil/.m2/repository/org/codehaus/plexus/plexus-io/2.0.8/plexus-io-2.0.8.jar
> urls[55] =
> file:/home/phil/.m2/repository/org/apache/commons/commons-compress/1.5/commons-compress-1.5.jar
> urls[56] = file:/home/phil/.m2/repository/org/tukaani/xz/1.2/xz-1.2.jar
> urls[57] =
> file:/home/phil/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
> urls[58] =
> file:/home/phil/.m2/repository/org/apache/velocity/velocity/1.5/velocity-1.5.jar
> urls[59] = file:/home/phil/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
> urls[60] =
> file:/home/phil/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.8/plexus-velocity-1.1.8.jar
> urls[61] =
> file:/home/phil/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.jar
> urls[62] =
> file:/home/phil/.m2/repository/org/mortbay/jetty/jetty/6.1.25/jetty-6.1.25.jar
> urls[63] =
> file:/home/phil/.m2/repository/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar
> urls[64] =
> file:/home/phil/.m2/repository/org/mortbay/jetty/jetty-util/6.1.25/jetty-util-6.1.25.jar
> urls[65] =
> file:/home/phil/.m2/repository/commons-lang/commons-lang/2.5/commons-lang-2.5.jar
> urls[66] =
> file:/home/phil/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
> Number of foreign imports: 1
> import: Entry[import  from realm
> ClassRealm[project>com.pcl-solutions.maven.wagons:rsync-maven-wagon:1.1-SNAPSHOT,
> parent: ClassRealm[maven.api, parent: null]]]
>
> -----------------------------------------------------
>
>     at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:125)
>     ... 20 more
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/commons/lang/StringUtils
>     at
> org.apache.maven.wagon.providers.file.FileWagon.resolveDestinationPath(FileWagon.java:206)
>     at
> org.apache.maven.wagon.providers.file.FileWagon.putDirectory(FileWagon.java:157)
>     at
> org.apache.maven.plugins.site.deploy.AbstractDeployMojo.push(AbstractDeployMojo.java:441)
>     at
> org.apache.maven.plugins.site.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo.java:323)
>     at
> org.apache.maven.plugins.site.deploy.AbstractDeployMojo.deployTo(AbstractDeployMojo.java:284)
>     at
> org.apache.maven.plugins.site.deploy.AbstractDeployMojo.execute(AbstractDeployMojo.java:166)
>     at
> org.apache.maven.plugins.site.deploy.SiteStageMojo.execute(SiteStageMojo.java:78)
>     at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>     ... 20 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.commons.lang.StringUtils
>     at
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
>     at
> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
>     at
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
>     at
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
>     ... 28 more
> [ERROR]
> [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/PluginContainerException
>
> However, I have no issues running on the command line via mvn
> scm-publish:publish-scm
>
> Can someone point me in the right direction here? I've added the plugin as
> described at
> http://maven.apache.org/plugins/maven-scm-publish-plugin/usage.html
> (Using the Site Lifecycle), and as a dependency per
> http://maven.apache.org/plugins/maven-scm-publish-plugin/dependency-info.html
> .
>
> Thanks,
>
> Phil
>

Reply via email to