karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gert Vanthienen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (KARAF-440) features-maven-plugin throws NullPointerException maven 3.0.2
Date Wed, 09 Feb 2011 15:06:57 GMT

    [ https://issues.apache.org/jira/browse/KARAF-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992515#comment-12992515
] 

Gert Vanthienen commented on KARAF-440:
---------------------------------------

It's been inadvertently removed in a previous commit -- I'll add it again in a moment.

> features-maven-plugin throws NullPointerException maven 3.0.2
> -------------------------------------------------------------
>
>                 Key: KARAF-440
>                 URL: https://issues.apache.org/jira/browse/KARAF-440
>             Project: Karaf
>          Issue Type: Bug
>          Components: tooling
>    Affects Versions: 2.1.3
>         Environment: reproducible with features-maven-plugin 2.1.0 and 2.1.3
> Christian-Muellers-MacBook-Pro:platforms cmueller$ mvn -v
> Apache Maven 3.0.2 (r1056850; 2011-01-09 01:58:10+0100)
> Java version: 1.6.0_22, vendor: Apple Inc.
> Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x", version: "10.6.6", arch: "x86_64", family: "mac"
>            Reporter: Christian Müller
>
> Install Maven 3.0.2
> Checkout Apache Camel from trunk:
> git clone git://git.apache.org/camel.git
> Go into the platforms sub directory:
> cd camel/platforms
> Run validate from the features-maven-plugin (we have a profile in Camel for this):
> mvn -Pvalidate clean install
> Throws:
> {code}
> christian-muellers-macbook-pro:platforms cmueller$ mvn -Pvalidate clean install -e
> [INFO] Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Build Order:
> [INFO]
> [INFO] Camel :: Platforms
> [INFO] Camel :: Platforms :: Apache Karaf
> [INFO] Camel :: Platforms :: Apache Karaf :: Features
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Camel :: Platforms 2.7-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ platforms ---
> [INFO] Deleting /Users/cmueller/workspaceApacheGitSVN/camel/platforms/target
> [INFO]
> [INFO] --- maven-antrun-plugin:1.2:run (create-prop) @ platforms ---
> [INFO] Executing tasks
>     [echo] Maven version: 2.7-SNAPSHOT
>     [echo] OSGi version: 2.7.0.SNAPSHOT
>    [mkdir] Created dir: /Users/cmueller/workspaceApacheGitSVN/camel/platforms/target
> [INFO] Executed tasks
> [INFO]
> [INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (default) @ platforms
---
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.1:process (default) @ platforms ---
> [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> [INFO] Setting property: velocimacro.messages.on => 'false'.
> [INFO] Setting property: resource.loader => 'classpath'.
> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> [INFO]
> [INFO] --- ianal-maven-plugin:1.0-alpha-1:verify-legal-files (default) @ platforms ---
> [INFO]
> [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ platforms ---
> [INFO] Installing /Users/cmueller/workspaceApacheGitSVN/camel/platforms/pom.xml to /Users/cmueller/.m2/repository/org/apache/camel/platforms/2.7-SNAPSHOT/platforms-2.7-SNAPSHOT.pom
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Camel :: Platforms :: Apache Karaf 2.7-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ karaf ---
> [INFO] Deleting /Users/cmueller/workspaceApacheGitSVN/camel/platforms/karaf/target
> [INFO]
> [INFO] --- maven-antrun-plugin:1.2:run (create-prop) @ karaf ---
> [INFO] Executing tasks
>     [echo] Maven version: 2.7-SNAPSHOT
>     [echo] OSGi version: 2.7.0.SNAPSHOT
>    [mkdir] Created dir: /Users/cmueller/workspaceApacheGitSVN/camel/platforms/karaf/target
> [INFO] Executed tasks
> [INFO]
> [INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (default) @ karaf
---
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.1:process (default) @ karaf ---
> [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> [INFO] Setting property: velocimacro.messages.on => 'false'.
> [INFO] Setting property: resource.loader => 'classpath'.
> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> [INFO]
> [INFO] --- ianal-maven-plugin:1.0-alpha-1:verify-legal-files (default) @ karaf ---
> [INFO]
> [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ karaf ---
> [INFO] Installing /Users/cmueller/workspaceApacheGitSVN/camel/platforms/karaf/pom.xml
to /Users/cmueller/.m2/repository/org/apache/camel/karaf/2.7-SNAPSHOT/karaf-2.7-SNAPSHOT.pom
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Camel :: Platforms :: Apache Karaf :: Features 2.7-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ apache-camel ---
> [INFO] Deleting /Users/cmueller/workspaceApacheGitSVN/camel/platforms/karaf/features/target
> [INFO]
> [INFO] --- maven-antrun-plugin:1.2:run (create-prop) @ apache-camel ---
> [INFO] Executing tasks
>     [echo] Maven version: 2.7-SNAPSHOT
>     [echo] OSGi version: 2.7.0.SNAPSHOT
>    [mkdir] Created dir: /Users/cmueller/workspaceApacheGitSVN/camel/platforms/karaf/features/target
> [INFO] Executed tasks
> [INFO]
> [INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (default) @ apache-camel
---
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.1:process (default) @ apache-camel ---
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (filter) @ apache-camel ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 4 resources
> [INFO] Copying 3 resources
> [INFO]
> [INFO] >>> features-maven-plugin:2.1.3:validate (validate) @ apache-camel >>>
> [INFO]
> [INFO] --- maven-antrun-plugin:1.2:run (create-prop) @ apache-camel ---
> [INFO] Executing tasks
>     [echo] Maven version: 2.7-SNAPSHOT
>     [echo] OSGi version: 2.7.0.SNAPSHOT
> [INFO] Executed tasks
> [INFO]
> [INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (default) @ apache-camel
---
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.1:process (default) @ apache-camel ---
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (filter) @ apache-camel ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 4 resources
> [INFO] Copying 3 resources
> [INFO] Copying 3 resources
> [INFO]
> [INFO] <<< features-maven-plugin:2.1.3:validate (validate) @ apache-camel <<<
> [INFO]
> [INFO] --- features-maven-plugin:2.1.3:validate (validate) @ apache-camel ---
> [INFO] == Preparing for validation ==
> [INFO]  - getting list of system bundle exports
> [INFO]  - getting list of provided bundle exports
> java.lang.NullPointerException
>        at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.injectSession(DefaultLegacyArtifactCollector.java:77)
>        at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.collect(DefaultLegacyArtifactCollector.java:99)
>        at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.collect(DefaultLegacyArtifactCollector.java:782)
>        at org.apache.maven.shared.dependency.tree.DefaultDependencyTreeBuilder.buildDependencyTree(DefaultDependencyTreeBuilder.java:97)
>        at org.apache.karaf.tooling.features.ValidateFeaturesMojo.readProvidedBundles(ValidateFeaturesMojo.java:217)
>        at org.apache.karaf.tooling.features.ValidateFeaturesMojo.prepare(ValidateFeaturesMojo.java:162)
>        at org.apache.karaf.tooling.features.ValidateFeaturesMojo.execute(ValidateFeaturesMojo.java:142)
>        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
>        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:534)
>        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)
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Camel :: Platforms ................................ SUCCESS [1.236s]
> [INFO] Camel :: Platforms :: Apache Karaf ................ SUCCESS [1.080s]
> [INFO] Camel :: Platforms :: Apache Karaf :: Features .... FAILURE [0.991s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4.143s
> [INFO] Finished at: Sun Jan 30 22:04:19 CET 2011
> [INFO] Final Memory: 21M/81M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.karaf.tooling:features-maven-plugin:2.1.3:validate
(validate) on project apache-camel: Unable to validate /Users/cmueller/workspaceApacheGitSVN/camel/platforms/karaf/features/target/classes/features.xml:
null: NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:features-maven-plugin:2.1.3:validate
(validate) on project apache-camel: Unable to validate /Users/cmueller/workspaceApacheGitSVN/camel/platforms/karaf/features/target/classes/features.xml:
null
>        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
>        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:534)
>        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: org.apache.maven.plugin.MojoExecutionException: Unable to validate /Users/cmueller/workspaceApacheGitSVN/camel/platforms/karaf/features/target/classes/features.xml:
null
>        at org.apache.karaf.tooling.features.ValidateFeaturesMojo.execute(ValidateFeaturesMojo.java:148)
>        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
>        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>        ... 19 more
> Caused by: java.lang.NullPointerException
>        at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.injectSession(DefaultLegacyArtifactCollector.java:77)
>        at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.collect(DefaultLegacyArtifactCollector.java:99)
>        at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.collect(DefaultLegacyArtifactCollector.java:782)
>        at org.apache.maven.shared.dependency.tree.DefaultDependencyTreeBuilder.buildDependencyTree(DefaultDependencyTreeBuilder.java:97)
>        at org.apache.karaf.tooling.features.ValidateFeaturesMojo.readProvidedBundles(ValidateFeaturesMojo.java:217)
>        at org.apache.karaf.tooling.features.ValidateFeaturesMojo.prepare(ValidateFeaturesMojo.java:162)
>        at org.apache.karaf.tooling.features.ValidateFeaturesMojo.execute(ValidateFeaturesMojo.java:142)
>        ... 21 more
> [ERROR]
> [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/MojoExecutionException
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the command
> [ERROR]   mvn <goals> -rf :apache-camel
> {code}
> we use the following configuration:
> {code}
>                 <plugin>
>                    <groupId>org.apache.karaf.tooling</groupId>
>                    <artifactId>features-maven-plugin</artifactId>
>                    <version>2.1.3</version>
>                    <configuration>
>                      <file>${project.build.directory}/classes/${features.file}</file>
>                      <karafConfig>${project.build.directory}/classes/config.properties</karafConfig>

>                    </configuration>
>                    <executions>
>                      <execution>
>                        <id>validate</id>
>                        <phase>process-resources</phase>
>                        <goals>
>                          <goal>validate</goal>
>                        </goals>
>                      </execution>
>                    </executions>
>                    <dependencies>
>                     <dependency> 
>                      <groupId>org.slf4j</groupId>
>                      <artifactId>slf4j-simple</artifactId>
>                      <version>1.4.3</version>
> 	            </dependency>
>                  </dependencies>
>                </plugin> 
> {code}
> Thanks in advance,
> Christian

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message