You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Arik Kfir (JIRA)" <ji...@codehaus.org> on 2005/11/12 11:00:06 UTC

[jira] Created: (MNG-1527) NPE in groupID-less POMs

NPE in groupID-less POMs
------------------------

         Key: MNG-1527
         URL: http://jira.codehaus.org/browse/MNG-1527
     Project: Maven 2
        Type: Bug
  Components: maven-artifact  
    Versions: 2.0    
 Environment: JDK 1.5.0_05, Kubunto Linux 5.1
    Reporter: Arik Kfir


I have a parent POM which defines a group ID and is parsed+deployed OK.

I also have a child POM which extends the parent POM. When running the following on the child POM, I get:

arik@corleon:~/projects/corleon-site/trunk$ mvn release:prepare -Dusername=arikkfir
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'release'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building Corleon
[INFO]    task-segment: [release:prepare] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [release:prepare]
[INFO] What tag name should be used?
RELEASE-1.0
[INFO] Verifying there are no local modifications ...
[INFO] Checking lineage for snapshots ...
[INFO] Checking dependencies for snapshots ...
[INFO] Checking plugins for snapshots ...
[INFO] What is the release version for 'org.corleon:corleon'? [1.0]

[INFO] Checking in modified POMs
[INFO] Tagging release with the label RELEASE-1.0.
[INFO] What is the new development version for 'org.corleon:corleon'? [1.1-SNAPSHOT]

[INFO] ----------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] groupId was null
[INFO] ----------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException: groupId was null
        at org.apache.maven.artifact.ArtifactUtils.versionlessKey(ArtifactUtils.java:47)
        at org.apache.maven.plugins.release.helpers.ProjectScmRewriter.restoreScmInfo(ProjectScmRewriter.java:51)
        at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:259)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:482)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:452)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:214)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        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:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 28 seconds
[INFO] Finished at: Sat Nov 12 02:33:49 IST 2005
[INFO] Final Memory: 3M/6M
[INFO] ----------------------------------------------------------------------------

When I add the groupId to the child POM it works ok.

Seems to me that the group ID should be inherited from the parent POM as well, no?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-1527) NPE in groupID-less POMs

Posted by "mike perham (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1527?page=comments#action_52534 ] 

mike perham commented on MNG-1527:
----------------------------------

We are seeing this issue also in reactor builds.  When building the project itself, the groupId is inherited correctly.  But when referencing that project from another, the groupId is not picked up out of the installed POM.  The installed POM does not have the groupId set in it so that project's transitive deps fail to resolve.

> NPE in groupID-less POMs
> ------------------------
>
>          Key: MNG-1527
>          URL: http://jira.codehaus.org/browse/MNG-1527
>      Project: Maven 2
>         Type: Bug
>   Components: Artifacts and Repositories
>     Versions: 2.0
>  Environment: JDK 1.5.0_05, Kubunto Linux 5.1
>     Reporter: Arik Kfir

>
>
> I have a parent POM which defines a group ID and is parsed+deployed OK.
> I also have a child POM which extends the parent POM. When running the following on the child POM, I get:
> arik@corleon:~/projects/corleon-site/trunk$ mvn release:prepare -Dusername=arikkfir
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'release'.
> [INFO] ----------------------------------------------------------------------------
> [INFO] Building Corleon
> [INFO]    task-segment: [release:prepare] (aggregator-style)
> [INFO] ----------------------------------------------------------------------------
> [INFO] [release:prepare]
> [INFO] What tag name should be used?
> RELEASE-1.0
> [INFO] Verifying there are no local modifications ...
> [INFO] Checking lineage for snapshots ...
> [INFO] Checking dependencies for snapshots ...
> [INFO] Checking plugins for snapshots ...
> [INFO] What is the release version for 'org.corleon:corleon'? [1.0]
> [INFO] Checking in modified POMs
> [INFO] Tagging release with the label RELEASE-1.0.
> [INFO] What is the new development version for 'org.corleon:corleon'? [1.1-SNAPSHOT]
> [INFO] ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] groupId was null
> [INFO] ----------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException: groupId was null
>         at org.apache.maven.artifact.ArtifactUtils.versionlessKey(ArtifactUtils.java:47)
>         at org.apache.maven.plugins.release.helpers.ProjectScmRewriter.restoreScmInfo(ProjectScmRewriter.java:51)
>         at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:259)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:482)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:452)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:214)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         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:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: 28 seconds
> [INFO] Finished at: Sat Nov 12 02:33:49 IST 2005
> [INFO] Final Memory: 3M/6M
> [INFO] ----------------------------------------------------------------------------
> When I add the groupId to the child POM it works ok.
> Seems to me that the group ID should be inherited from the parent POM as well, no?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org