Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7160

Extension And Classloaders: difference of result given extension types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.6.2, 3.8.1
    • 3.8.8, 3.9.0, 4.0.0-alpha-2, 4.0.0
    • None
    • None

    Description

      I have a project that we use for all of our internal Red Hat builds (although primarily through its CLI mode hence not noticing this until https://github.com/release-engineering/pom-manipulation-ext/issues/832 was submitted in the community). This project creates an extension (lib/ext style) but trying to use it as a ".mvn/extensions.xml" it seems to get a classloader problem as _I think _the Maven Model/Plugin objects are created within a different classloader which means when the Plugin configuration is retrieved and cast to a Xpp3Dom object it fails. Is there some configuration we are missing or is there a problem in how the classloading in Maven for core extensions is working when using Xpp3Dom ?

      An reproducer branch is https://github.com/rnc/pom-manipulation-ext/tree/ISSUE832
      (Simply build and install the project, then use it on any simple Maven project with an extensions.xml with the command e.g. "mvn -X -DversionSuffix=redhat-1" )

      An example log is below:

      Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
      Maven home: /home/rnc/Software/apache-maven-3.8.1
      Java version: 11.0.11, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.11.0.9-2.fc33.x86_64
      Default locale: en_GB, platform encoding: UTF-8
      OS name: "linux", version: "5.11.14-200.fc33.x86_64", arch: "amd64", family: "unix"
      [DEBUG] Reading global settings from /home/rnc/Software/apache-maven-3.8.1/conf/settings.xml
      [DEBUG] Reading user settings from /home/rnc/.m2/settings.xml
      [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/rnc/.m2/repository
      [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for repository.jboss.org (http://repository.jboss.org/maven2).
      [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for snapshots.jboss.org (http://snapshots.jboss.org/maven2).
      [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for oss.sonatype.org/jboss-snapshots (http://oss.sonatype.org/content/repositories/jboss-snapshots).
      [DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=644417, ConflictMarker.markTime=145101, ConflictMarker.nodeCount=11, ConflictIdSorter.graphTime=429885, ConflictIdSorter.topsortTime=359266, ConflictIdSorter.conflictIdCount=10, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2854763, ConflictResolver.conflictItemCount=11, DefaultDependencyCollector.collectTime=122702048, DefaultDependencyCollector.transformTime=6173804}
      [DEBUG] org.commonjava.maven.ext:pom-manipulation-ext:jar:4.4-SNAPSHOT
      [DEBUG]    javax.inject:javax.inject:jar:1:compile
      [DEBUG]    org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.4:compile
      [DEBUG]       javax.enterprise:cdi-api:jar:1.0:compile
      [DEBUG]          javax.annotation:jsr250-api:jar:1.0:compile
      [DEBUG]       org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.4:compile
      [DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
      [DEBUG]       org.codehaus.plexus:plexus-classworlds:jar:2.5.2:compile
      [DEBUG]       org.codehaus.plexus:plexus-utils:jar:3.1.0:compile (version managed from default)
      [DEBUG]    org.slf4j:slf4j-api:jar:1.7.30:compile
      [DEBUG] Populating class realm coreExtension>org.commonjava.maven.ext:pom-manipulation-ext:4.4-SNAPSHOT
      [DEBUG]   Included /home/rnc/.m2/repository/org/commonjava/maven/ext/pom-manipulation-ext/4.4-SNAPSHOT/pom-manipulation-ext-4.4-SNAPSHOT.jar
      [DEBUG]   Included /home/rnc/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
      [DEBUG]   Included /home/rnc/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.4/org.eclipse.sisu.inject-0.3.4.jar
      [DEBUG]   Included /home/rnc/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
      [DEBUG]   Included /home/rnc/.m2/repository/org/codehaus/plexus/plexus-utils/3.1.0/plexus-utils-3.1.0.jar
      [DEBUG] Populating class realm maven.ext
      [INFO] Running Maven Manipulation Extension (PME) 4.4-SNAPSHOT ( SHA: 305cdb0d )
      [DEBUG] Created new class realm maven.api
      [DEBUG] Importing foreign packages into class realm maven.api
      [DEBUG]   Imported: javax.annotation.* < maven.ext
      [DEBUG]   Imported: javax.annotation.security.* < maven.ext
      [DEBUG]   Imported: javax.enterprise.inject.* < maven.ext
      [DEBUG]   Imported: javax.enterprise.util.* < maven.ext
      [DEBUG]   Imported: javax.inject.* < maven.ext
      [DEBUG]   Imported: org.apache.maven.* < maven.ext
      [DEBUG]   Imported: org.apache.maven.artifact < maven.ext
      [DEBUG]   Imported: org.apache.maven.classrealm < maven.ext
      [DEBUG]   Imported: org.apache.maven.cli < maven.ext
      [DEBUG]   Imported: org.apache.maven.configuration < maven.ext
      [DEBUG]   Imported: org.apache.maven.exception < maven.ext
      [DEBUG]   Imported: org.apache.maven.execution < maven.ext
      [DEBUG]   Imported: org.apache.maven.execution.scope < maven.ext
      [DEBUG]   Imported: org.apache.maven.lifecycle < maven.ext
      [DEBUG]   Imported: org.apache.maven.model < maven.ext
      [DEBUG]   Imported: org.apache.maven.monitor < maven.ext
      [DEBUG]   Imported: org.apache.maven.plugin < maven.ext
      [DEBUG]   Imported: org.apache.maven.profiles < maven.ext
      [DEBUG]   Imported: org.apache.maven.project < maven.ext
      [DEBUG]   Imported: org.apache.maven.reporting < maven.ext
      [DEBUG]   Imported: org.apache.maven.repository < maven.ext
      [DEBUG]   Imported: org.apache.maven.rtinfo < maven.ext
      [DEBUG]   Imported: org.apache.maven.settings < maven.ext
      [DEBUG]   Imported: org.apache.maven.toolchain < maven.ext
      [DEBUG]   Imported: org.apache.maven.usability < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.* < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.authentication < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.authorization < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.events < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.observers < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.proxy < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.repository < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.resource < maven.ext
      [DEBUG]   Imported: org.codehaus.classworlds < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.* < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.classworlds < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.component < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.configuration < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.container < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.context < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.lifecycle < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.logging < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.personality < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.util.xml.* < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < maven.ext
      [DEBUG]   Imported: org.commonjava.maven.ext.* < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.* < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.artifact < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.collection < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.deployment < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.graph < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.impl < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.installation < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.internal.impl < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.metadata < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.repository < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.resolution < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.spi < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.transfer < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.version < maven.ext
      [DEBUG]   Imported: org.fusesource.jansi.* < maven.ext
      [DEBUG]   Imported: org.slf4j.* < maven.ext
      [DEBUG]   Imported: org.slf4j.event.* < maven.ext
      [DEBUG]   Imported: org.slf4j.helpers.* < maven.ext
      [DEBUG]   Imported: org.slf4j.spi.* < maven.ext
      [DEBUG] Populating class realm maven.api
      [INFO] Error stacktraces are turned on.
      [DEBUG] Message scheme: color
      [DEBUG] Message styles: debug info warning error success failure strong mojo project
      [DEBUG] Reading global settings from /home/rnc/Software/apache-maven-3.8.1/conf/settings.xml
      [DEBUG] Reading user settings from /home/rnc/.m2/settings.xml
      [DEBUG] Reading global toolchains from /home/rnc/Software/apache-maven-3.8.1/conf/toolchains.xml
      [DEBUG] Reading user toolchains from /home/rnc/.m2/toolchains.xml
      [DEBUG] Using local repository at /home/rnc/.m2/repository
      [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/rnc/.m2/repository
      [DEBUG] Initialising ManipulationManager with user properties {versionSuffix=redhat-1}
      [DEBUG] Examining for deprecated properties for versionSuffix
      [DEBUG] Configured to use Maven locations:
        SimpleLocation [uri=file:/home/rnc/.m2/repository/]
        SimpleLocation [uri=https://repo.maven.apache.org/maven2]
      [DEBUG] Initialising manipulator FinalGroovyManipulator
      [DEBUG] Initialising manipulator XMLManipulator
      [DEBUG] Initialising manipulator JSONManipulator
      [DEBUG] Initialising manipulator BOMBuilderManipulator
      [DEBUG] Initialising manipulator DistributionEnforcingManipulator
      [DEBUG] Initialising manipulator ProjectVersionEnforcingManipulator
      [DEBUG] Initialising manipulator RepositoryInjectionManipulator
      [DEBUG] Initialising manipulator PluginInjectingManipulator
      [DEBUG] Initialising manipulator ProfileRemovalManipulator
      [DEBUG] Initialising manipulator NexusStagingMavenPluginRemovalManipulator
      [DEBUG] Initialising manipulator PluginRemovalManipulator
      [DEBUG] Initialising manipulator DependencyRemovalManipulator
      [DEBUG] Initialising manipulator RepoAndReportingRemovalManipulator
      [DEBUG] Initialising manipulator DependencyManipulator
      [DEBUG] Initialising manipulator PluginManipulator
      [DEBUG] Initialising manipulator PropertyManipulator
      [DEBUG] Initialising manipulator ParentInjectionManipulator
      [DEBUG] Initialising manipulator ProjectVersioningManipulator
      [DEBUG] Initialising manipulator RESTCollector
      [DEBUG] Initialising manipulator RelocationManipulator
      [DEBUG] Initialising manipulator SuffixManipulator
      [DEBUG] Initialising manipulator ProfileInjectionManipulator
      [DEBUG] Initialising manipulator RESTBOMCollector
      [DEBUG] Initialising manipulator RangeResolver
      [DEBUG] Initialising manipulator InitialGroovyManipulator
      [DEBUG] PEEK: /home/rnc/Work/PME/pom-manipulation-ext/integration-test/target/it-ext/simple-numeric-with-maven-extensions/pom.xml
      [DEBUG] Setting top level parent to /home/rnc/Work/PME/pom-manipulation-ext/integration-test/target/it-ext/simple-numeric-with-maven-extensions/pom.xml :: org.commonjava.maven.ext.integration-test:simple-numeric-override:6.1.0.Final-redhat-01
      [DEBUG] Found a standalone pom /home/rnc/Work/PME/pom-manipulation-ext/integration-test/target/it-ext/simple-numeric-with-maven-extensions/pom.xml :: org.commonjava.maven.ext.integration-test:simple-numeric-override:6.1.0.Final-redhat-01
      [DEBUG] Setting execution root to org.commonjava.maven.ext.integration-test:simple-numeric-override:6.1.0.Final-redhat-01 [pom=/home/rnc/Work/PME/pom-manipulation-ext/integration-test/target/it-ext/simple-numeric-with-maven-extensions/pom.xml] with file /home/rnc/Work/PME/pom-manipulation-ext/integration-test/target/it-ext/simple-numeric-with-maven-extensions/pom.xml and is the inheritance root. 
      [DEBUG] Explicitly activating []
      [DEBUG] Will not scan all profiles and returning active profiles of [] 
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.InitialGroovyManipulator
      [DEBUG] InitialGroovyManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.RangeResolver
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.RESTBOMCollector
      [DEBUG] RESTBOMCollector: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.ProfileInjectionManipulator
      [DEBUG] ProfileInjectionManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.SuffixManipulator
      [DEBUG] SuffixManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.RelocationManipulator
      [DEBUG] RelocationManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.RESTCollector
      [DEBUG] RESTCollector: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.ProjectVersioningManipulator
      [INFO] Version Manipulator: Calculating the necessary versioning changes.
      [DEBUG] Got the following original version: 6.1.0.Final-redhat-01 for groupId:artifactId org.commonjava.maven.ext.integration-test:simple-numeric-override 
      [DEBUG] Got the following version suffixes:
        Static: redhat-1
        Incremental: null
      [DEBUG] Got the following version override: null
      [DEBUG] Applying suffix: redhat-1 to version 6.1.0.Final-redhat-01
      [DEBUG] Caching version against project org.commonjava.maven.ext.integration-test:simple-numeric-override:6.1.0.Final-redhat-01 with parent null and modified version 6.1.0.Final-redhat-1
      [DEBUG] Syncing projects within reactor...
      [DEBUG] Using pattern: '(\Q6.1.0\E([.\-_]0)*)?[.\-_]\QFinal-redhat\E[.\-_](\d+)' to find compatible versions from metadata.
      [DEBUG] Found highest matching build number 1 from set [6.1.0.Final-redhat-1] 
      [DEBUG] Returning padding of 1 
      [DEBUG] org.commonjava.maven.ext.integration-test:simple-numeric-override:6.1.0.Final-redhat-01 has updated version: 6.1.0.Final-redhat-1. Marking for rewrite.
      [DEBUG] Examining org.commonjava.maven.ext.integration-test:simple-numeric-override:6.1.0.Final-redhat-01 [pom=/home/rnc/Work/PME/pom-manipulation-ext/integration-test/target/it-ext/simple-numeric-with-maven-extensions/pom.xml] for applyVersioningChanges.
      [INFO] Looking for new version: org.commonjava.maven.ext.integration-test:simple-numeric-override:6.1.0.Final-redhat-01 (found: 6.1.0.Final-redhat-1)
      [INFO] Changed main version in org.commonjava.maven.ext.integration-test:simple-numeric-override:6.1.0.Final-redhat-1 [pom=/home/rnc/Work/PME/pom-manipulation-ext/integration-test/target/it-ext/simple-numeric-with-maven-extensions/pom.xml]
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.ParentInjectionManipulator
      [DEBUG] ParentInjectionManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.PropertyManipulator
      [DEBUG] PropertyManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.PluginManipulator
      [DEBUG] PluginManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.DependencyManipulator
      [DEBUG] DependencyManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.RepoAndReportingRemovalManipulator
      [DEBUG] RepoAndReportingRemovalManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.DependencyRemovalManipulator
      [DEBUG] DependencyRemovalManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.PluginRemovalManipulator
      [DEBUG] PluginRemovalManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.NexusStagingMavenPluginRemovalManipulator
      [DEBUG] Applying plugin changes to: org.commonjava.maven.ext.integration-test:simple-numeric-override
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.ProfileRemovalManipulator
      [DEBUG] ProfileRemovalManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.PluginInjectingManipulator
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.RepositoryInjectionManipulator
      [DEBUG] RepositoryInjectionManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.ProjectVersionEnforcingManipulator
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.DistributionEnforcingManipulator
      [DEBUG] Distribution skip-flag enforcement is disabled.
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.BOMBuilderManipulator
      [DEBUG] BOMBuilderManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.JSONManipulator
      [DEBUG] JSONManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.XMLManipulator
      [DEBUG] XMLManipulator: Nothing to do!
      [INFO] Running manipulator org.commonjava.maven.ext.core.impl.FinalGroovyManipulator
      [DEBUG] FinalGroovyManipulator: Nothing to do!
      [INFO] Maven-Manipulation-Extension: Rewrite changed: [org.commonjava.maven.ext.integration-test:simple-numeric-override:6.1.0.Final-redhat-1 [pom=/home/rnc/Work/PME/pom-manipulation-ext/integration-test/target/it-ext/simple-numeric-with-maven-extensions/pom.xml]]
      [DEBUG] org.commonjava.maven.ext.integration-test:simple-numeric-override:6.1.0.Final-redhat-1 [pom=/home/rnc/Work/PME/pom-manipulation-ext/integration-test/target/it-ext/simple-numeric-with-maven-extensions/pom.xml] modified! Rewriting.
      ### JDOMModelConverter::Plugin::Classloader : ClassRealm[plexus.core, parent: null] and class org.codehaus.plexus.util.xml.Xpp3Dom and 1517266286
      ### JDOMModelConverter::Plugin::Classloader : ClassRealm[coreExtension>org.commonjava.maven.ext:pom-manipulation-ext:4.4-SNAPSHOT, parent: ClassRealm[plexus.core, parent: null]] and class org.codehaus.plexus.util.xml.Xpp3Dom and 1947683363
      ### instanceof false and now local xpp3dom true
      [ERROR] Extension failure
      java.lang.ClassCastException: class org.codehaus.plexus.util.xml.Xpp3Dom cannot be cast to class org.codehaus.plexus.util.xml.Xpp3Dom (org.codehaus.plexus.util.xml.Xpp3Dom is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @f6f4d33; org.codehaus.plexus.util.xml.Xpp3Dom is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @5b69fd74)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.updatePlugin (JDOMModelConverter.java:1531)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.iteratePlugin (JDOMModelConverter.java:540)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.updatePluginManagement (JDOMModelConverter.java:1566)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.updateBuild (JDOMModelConverter.java:1035)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.updateModel (JDOMModelConverter.java:1394)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.update (JDOMModelConverter.java:1818)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.convertModelToJDOM (JDOMModelConverter.java:52)
          at org.commonjava.maven.ext.io.PomIO.write (PomIO.java:282)
          at org.commonjava.maven.ext.io.PomIO.rewritePOMs (PomIO.java:218)
          at org.commonjava.maven.ext.core.ManipulationManager.scanAndApply (ManipulationManager.java:211)
          at org.commonjava.maven.ext.manip.ManipulatingEventSpy.onEvent (ManipulatingEventSpy.java:117)
          at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent (EventSpyDispatcher.java:104)
          at org.apache.maven.eventspy.internal.EventSpyExecutionListener.projectDiscoveryStarted (EventSpyExecutionListener.java:47)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:57)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:42)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:217)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:566)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      [INFO] Scanning for projects...
      [DEBUG] Extension realms for project org.commonjava.maven.ext.integration-test:simple-numeric-override:jar:6.1.0.Final-redhat-01: (none)
      [DEBUG] Looking up lifecycle mappings for packaging jar from ClassRealm[maven.ext, parent: ClassRealm[plexus.core, parent: null]]
      [ERROR] POM Manipulation failed: Caught runtime exception: class org.codehaus.plexus.util.xml.Xpp3Dom cannot be cast to class org.codehaus.plexus.util.xml.Xpp3Dom (org.codehaus.plexus.util.xml.Xpp3Dom is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @f6f4d33; org.codehaus.plexus.util.xml.Xpp3Dom is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @5b69fd74) -> [Help 1]
      org.apache.maven.MavenExecutionException: POM Manipulation failed: Caught runtime exception
          at org.commonjava.maven.ext.manip.ManipulatingLifeCycleParticipant.afterProjectsRead (ManipulatingLifeCycleParticipant.java:48)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:264)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:566)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: org.commonjava.maven.ext.common.ManipulationException: Caught runtime exception
          at org.commonjava.maven.ext.manip.ManipulatingEventSpy.onEvent (ManipulatingEventSpy.java:143)
          at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent (EventSpyDispatcher.java:104)
          at org.apache.maven.eventspy.internal.EventSpyExecutionListener.projectDiscoveryStarted (EventSpyExecutionListener.java:47)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:57)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:42)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:217)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:566)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: java.lang.ClassCastException: class org.codehaus.plexus.util.xml.Xpp3Dom cannot be cast to class org.codehaus.plexus.util.xml.Xpp3Dom (org.codehaus.plexus.util.xml.Xpp3Dom is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @f6f4d33; org.codehaus.plexus.util.xml.Xpp3Dom is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @5b69fd74)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.updatePlugin (JDOMModelConverter.java:1531)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.iteratePlugin (JDOMModelConverter.java:540)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.updatePluginManagement (JDOMModelConverter.java:1566)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.updateBuild (JDOMModelConverter.java:1035)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.updateModel (JDOMModelConverter.java:1394)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.update (JDOMModelConverter.java:1818)
          at org.commonjava.maven.ext.common.jdom.JDOMModelConverter.convertModelToJDOM (JDOMModelConverter.java:52)
          at org.commonjava.maven.ext.io.PomIO.write (PomIO.java:282)
          at org.commonjava.maven.ext.io.PomIO.rewritePOMs (PomIO.java:218)
          at org.commonjava.maven.ext.core.ManipulationManager.scanAndApply (ManipulationManager.java:211)
          at org.commonjava.maven.ext.manip.ManipulatingEventSpy.onEvent (ManipulatingEventSpy.java:117)
          at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent (EventSpyDispatcher.java:104)
          at org.apache.maven.eventspy.internal.EventSpyExecutionListener.projectDiscoveryStarted (EventSpyExecutionListener.java:47)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:57)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:42)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:217)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:566)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      [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/MavenExecutionException
      
      

      Attachments

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              rnc Nick Cross
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: