Uploaded image for project: 'PUBLIC - Liferay Maven'
  1. PUBLIC - Liferay Maven
  2. MAVEN-124

Don't force other maven plugins to use the same configuration for commons-logging

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.2.0 GA1, Master
    • Fix Version/s: Master
    • Component/s: Plugins
    • Labels:
      None

      Description

      Liferay Maven Plugin sets global configuration about commons-loggin that could be not supported by others Maven Plugins

      Steps to reproduce with Maven Wagon:

      1. Download the attached file, unzip and configure properly for your environment
      2. Run mvn deploy

      Result: Error, see logs:

       ⤷  mvn deploy
      [INFO] Scanning for projects...
      [INFO] 
      [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building 1.0-SNAPSHOT 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- liferay-maven-plugin:6.2.0-ga1:build-css (default) @ liferay-plugin-deploy-failure ---
      Loading jar:file:/home/jcampoy/projects/ee-6.2.10-ga1/servers/maven/mvn-projects/liferay-plugin-deploy-failure/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/system.properties
      jun 18, 2014 10:30:58 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
      Información: _______________________________________________________________________________________ [Sanitized]
      jun 18, 2014 10:30:58 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
      Información: ______________________________________________________________________________________________ [Sanitized]
      jun 18, 2014 10:30:58 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
      Información: ______________________________________________________________________________________________________________________________________________________________________ [Sanitized]
      jun 18, 2014 10:30:58 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
      Información: ____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ [Sanitized]
      Loading jar:file:/home/jcampoy/projects/ee-6.2.10-ga1/servers/maven/mvn-projects/liferay-plugin-deploy-failure/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/portal.properties
      Loading file:/home/jcampoy/portal-ext.properties
      Loading jar:file:/home/jcampoy/projects/ee-6.2.10-ga1/servers/maven/mvn-projects/liferay-plugin-deploy-failure/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ liferay-plugin-deploy-failure ---
      [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
      [INFO] skip non existing resourceDirectory /home/jcampoy/projects/ee-6.2.10-ga1/servers/maven/mvn-projects/liferay-plugin-deploy-failure/src/main/resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ liferay-plugin-deploy-failure ---
      [INFO] No sources to compile
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ liferay-plugin-deploy-failure ---
      [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
      [INFO] skip non existing resourceDirectory /home/jcampoy/projects/ee-6.2.10-ga1/servers/maven/mvn-projects/liferay-plugin-deploy-failure/src/test/resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ liferay-plugin-deploy-failure ---
      [INFO] No sources to compile
      [INFO] 
      [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ liferay-plugin-deploy-failure ---
      [INFO] No tests to run.
      [INFO] 
      [INFO] --- maven-war-plugin:2.2:war (default-war) @ liferay-plugin-deploy-failure ---
      [INFO] Packaging webapp
      [INFO] Assembling webapp [liferay-plugin-deploy-failure] in [/home/jcampoy/projects/ee-6.2.10-ga1/servers/maven/mvn-projects/liferay-plugin-deploy-failure/target/liferay-plugin-deploy-failure]
      [INFO] Processing war project
      [INFO] Copying webapp resources [/home/jcampoy/projects/ee-6.2.10-ga1/servers/maven/mvn-projects/liferay-plugin-deploy-failure/src/main/webapp]
      [INFO] Webapp assembled in [21 msecs]
      [INFO] Building war: /home/jcampoy/projects/ee-6.2.10-ga1/servers/maven/mvn-projects/liferay-plugin-deploy-failure/target/liferay-plugin-deploy-failure.war
      [INFO] WEB-INF/web.xml already added, skipping
      [INFO] 
      [INFO] --- maven-install-plugin:2.4:install (default-install) @ liferay-plugin-deploy-failure ---
      [INFO] Installing /home/jcampoy/projects/ee-6.2.10-ga1/servers/maven/mvn-projects/liferay-plugin-deploy-failure/target/liferay-plugin-deploy-failure.war to /home/jcampoy/.m2/repository/tst/liferay-plugin-deploy-failure/liferay-plugin-deploy-failure/1.0-SNAPSHOT/liferay-plugin-deploy-failure-1.0-SNAPSHOT.war
      [INFO] Installing /home/jcampoy/projects/ee-6.2.10-ga1/servers/maven/mvn-projects/liferay-plugin-deploy-failure/pom.xml to /home/jcampoy/.m2/repository/tst/liferay-plugin-deploy-failure/liferay-plugin-deploy-failure/1.0-SNAPSHOT/liferay-plugin-deploy-failure-1.0-SNAPSHOT.pom
      [INFO] 
      [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ liferay-plugin-deploy-failure ---
      WAGON_VERSION: 1.0-beta-2
      Downloading: dav:http://test.domain.dom/archiva/repository/snapshots/tst/liferay-plugin-deploy-failure/liferay-plugin-deploy-failure/1.0-SNAPSHOT/maven-metadata.xml
      Exception in thread "pool-1-thread-1" java.lang.ExceptionInInitializerError
              at org.apache.webdav.lib.WebdavSession.getSessionInstance(WebdavSession.java:145)
              at org.apache.webdav.lib.WebdavSession.getSessionInstance(WebdavSession.java:127)
              at org.apache.webdav.lib.WebdavResource.setClient(WebdavResource.java:1273)
              at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1298)
              at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1320)
              at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1408)
              at org.apache.webdav.lib.WebdavResource.<init>(WebdavResource.java:290)
              at org.apache.maven.wagon.providers.webdav.CorrectedWebdavResource.<init>(CorrectedWebdavResource.java:54)
              at org.apache.maven.wagon.providers.webdav.WebDavWagon.openConnection(WebDavWagon.java:143)
              at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:217)
              at org.eclipse.aether.connector.wagon.WagonRepositoryConnector.connectWagon(WagonRepositoryConnector.java:400)
              at org.eclipse.aether.connector.wagon.WagonRepositoryConnector.pollWagon(WagonRepositoryConnector.java:440)
              at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:630)
              at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:724)
      Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: org/apache/log4j/Category (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: org/apache/log4j/Category (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category))
              at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
              at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
              at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
              at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
              at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:69)
              ... 17 more
      Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: org/apache/log4j/Category (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category)
              at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
              at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
              ... 21 more
      Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:190)
              at org.apache.commons.logging.impl.LogFactoryImpl$1.run(LogFactoryImpl.java:447)
              at java.security.AccessController.doPrivileged(Native Method)
              at org.apache.commons.logging.impl.LogFactoryImpl.loadClass(LogFactoryImpl.java:435)
              at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:376)
              ... 22 more
      Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Category
              at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
              at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
              at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
              at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
              ... 28 more
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 7.208 s
      [INFO] Finished at: 2014-06-18T10:31:00+01:00
      [INFO] Final Memory: 29M/338M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project liferay-plugin-deploy-failure: Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy: java.lang.ExceptionInInitializerError: null
      [ERROR] -----------------------------------------------------
      [ERROR] realm =    plugin>org.apache.maven.plugins:maven-deploy-plugin:2.7
      [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      [ERROR] urls[0] = file:/home/jcampoy/.m2/repository/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.jar
      [ERROR] urls[1] = file:/home/jcampoy/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
      [ERROR] urls[2] = file:/home/jcampoy/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar
      [ERROR] Number of foreign imports: 1
      [ERROR] import: Entry[import  from realm ClassRealm[project>tst.liferay-plugin-deploy-failure:liferay-plugin-deploy-failure:1.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
      [ERROR] 
      [ERROR] -----------------------------------------------------: org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: org/apache/log4j/Category (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: org/apache/log4j/Category (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category)): org.apache.log4j.Category
      [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/PluginContainerException
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 25 weeks, 6 days ago

                Packages

                Version Package
                Master