Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-731

Change Maven prerequisite from 2.0.9 to 2.2.1

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.2
    • 2.3
    • None
    • None

    Description

      Upgrading the plexus-utils might solve a couple of issues, but is now locked at 1.5.8.
      When upgrading this to a more recent version a lot of tests fail due to a CNFE:

      org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'org.apache.maven.project.MavenProjectBuilder', it could not be started
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:339)
      	at org.codehaus.plexus.PlexusTestCase.lookup(PlexusTestCase.java:216)
      	at org.apache.maven.shared.release.phase.AbstractReleaseTestCase.setUp(AbstractReleaseTestCase.java:99)
      	at org.apache.maven.shared.release.phase.ScmCommitPreparationPhaseTest.setUp(ScmCommitPreparationPhaseTest.java:72)
      	at junit.framework.TestCase.runBare(TestCase.java:128)
      	at junit.framework.TestResult$1.protect(TestResult.java:106)
      	at junit.framework.TestResult.runProtected(TestResult.java:124)
      	at junit.framework.TestResult.run(TestResult.java:109)
      	at junit.framework.TestCase.run(TestCase.java:120)
      	at junit.framework.TestSuite.runTest(TestSuite.java:230)
      	at junit.framework.TestSuite.run(TestSuite.java:225)
      	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
      	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      Caused by: org.codehaus.plexus.component.repository.exception.ComponentLifecycleException: Error starting component
      	at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:109)
      	at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:95)
      	at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
      	... 16 more
      Caused by: org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException: Error composing component
      	at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:33)
      	at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:101)
      	at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:105)
      	... 19 more
      Caused by: org.codehaus.plexus.component.composition.CompositionException: Composition failed of field profilesBuilder in object of type org.apache.maven.project.DefaultMavenProjectBuilder because the requirement ComponentRequirement{role='org.apache.maven.profiles.MavenProfilesBuilder', roleHint='null', fieldName='null'} was missing
      	at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:154)
      	at org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:73)
      	at org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:68)
      	at org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java:1486)
      	at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:29)
      	... 21 more
      Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'org.apache.maven.profiles.MavenProfilesBuilder', it could not be created
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
      	at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:129)
      	... 25 more
      Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException: Could not instanciate component: role: 'org.apache.maven.profiles.MavenProfilesBuilder', implementation: 'org.apache.maven.profiles.DefaultMavenProfilesBuilder'
      	at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.java:77)
      	at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:62)
      	at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)
      	at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)
      	at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
      	... 26 more
      Caused by: java.lang.NoClassDefFoundError: org/codehaus/plexus/util/interpolation/ValueSource
      	at java.lang.Class.getDeclaredConstructors0(Native Method)
      	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
      	at java.lang.Class.getConstructor0(Class.java:2699)
      	at java.lang.Class.newInstance0(Class.java:326)
      	at java.lang.Class.newInstance(Class.java:308)
      	at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
      	... 30 more
      Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.util.interpolation.ValueSource
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      	... 36 more
      

      The best option seems to be to upgrade the version of Maven and due to some broken versions of Maven this plugin should move to 2.2.1
      This will cause failures for GenerateReleasePomsPhaseTest, but it looks like these have to do with namespaces and schemas, and with keeping expressions as is.

      Attachments

        Activity

          People

            rfscholte Robert Scholte
            rfscholte Robert Scholte
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: