Uploaded image for project: 'Maven Resources Plugin'
  1. Maven Resources Plugin
  2. MRESOURCES-176

CNFE for MavenFilterException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.4.1, 2.6
    • None
    • filtering
    • None
    • Maven 3.0.3, Maven 3.1.1

    Description

      While executing goal install with default profile maven resource plugin version(2.4.1) throws below exception

      [INFO] ------------------------------------------------------------------------
      [INFO] Building ---Services 1.0-A-SNAPSHOTS
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ ---ServicesWeb ---
      Nov 29, 2013 3:06:44 PM org.sonatype.guice.bean.reflect.LoadedClass
      WARNING: Error injecting: org.apache.maven.plugin.resources.ResourcesMojo
      java.lang.NoClassDefFoundError: org/apache/maven/shared/filtering/MavenFilteringException
      	at java.lang.Class.getDeclaredConstructors0(Native Method)
      	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2437)
      	at java.lang.Class.getDeclaredConstructors(Class.java:1863)
      	at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
      	at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
      	at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769)
      	at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254)
      	at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
      	at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843)
      	at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957)
      	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990)
      	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951)
      	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1003)
      	at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014)
      	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:59)
      	at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79)
      	at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:235)
      	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: java.lang.ClassNotFoundException: org.apache.maven.shared.filtering.MavenFilteringException
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      	... 47 more
      

      M2E plugin in Eclipse shows below error

      Multiple annotations found at this line:
      	- Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.4.1:resources failed: A required class was missing while executing 
      	 org.apache.maven.plugins:maven-resources-plugin:2.4.1:resources: org/apache/maven/shared/filtering/MavenFilteringException 
      	 ----------------------------------------------------- realm = plugin>org.apache.maven.plugins:maven-resources-plugin:2.4.1 strategy = 
      	 org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy urls[0] = file:/Users/monish/mvnrepo/org/apache/maven/plugins/maven-resources-plugin/2.4.1/maven-
      	 resources-plugin-2.4.1.jar urls[1] = file:/Users/monish/mvnrepo/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar Number of foreign imports: 1 import: 
      	 Entry[import from realm ClassRealm[maven.api, parent: null]] ----------------------------------------------------- (org.apache.maven.plugins:maven-
      	 resources-plugin:2.4.1:resources:default-resources:process-resources)
      	- Execution default-testResources of goal org.apache.maven.plugins:maven-resources-plugin:2.4.1:testResources failed: A required class was missing while 
      	 executing org.apache.maven.plugins:maven-resources-plugin:2.4.1:testResources: org/apache/maven/shared/filtering/MavenFilteringException 
      	 ----------------------------------------------------- realm = plugin>org.apache.maven.plugins:maven-resources-plugin:2.4.1 strategy = 
      	 org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy urls[0] = file:/Users/monish/mvnrepo/org/apache/maven/plugins/maven-resources-plugin/2.4.1/maven-
      	 resources-plugin-2.4.1.jar urls[1] = file:/Users/monish/mvnrepo/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar Number of foreign imports: 1 import: 
      	 Entry[import from realm ClassRealm[maven.api, parent: null]] ----------------------------------------------------- (org.apache.maven.plugins:maven-
      	 resources-plugin:2.4.1:testResources:default-testResources:process-test-resources)
      
      

      Issue is not faced with version 2.5 and 2.6

      Attachments

        Activity

          People

            khmarbaise Karl Heinz Marbaise
            mastermind3043 Monish Sen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: