jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Assembly Plugin
  • MASSEMBLY-214

java.lang.NullPointerException: version was null for junit:junit

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Cannot Reproduce
  • Affects Version/s: 2.2-beta-1
  • Fix Version/s: 2.2-beta-2
  • Labels:
    None

Description

Released version completely does not work for me anymore.

[INFO] ------------------------------------------------------------------------
[INFO] version was null for junit:junit
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException: version was null for junit:junit
at org.apache.maven.artifact.DefaultArtifact.getBaseVersion(DefaultArtifact.java:364)
at org.apache.maven.artifact.DefaultArtifact.getId(DefaultArtifact.java:225)
at org.apache.maven.shared.artifact.filter.ScopeArtifactFilter.include(ScopeArtifactFilter.java:142)
at org.apache.maven.project.artifact.MavenMetadataSource.createArtifacts(MavenMetadataSource.java:345)
at org.apache.maven.plugin.assembly.artifact.DefaultDependencyResolver.resolveDependencies(DefaultDependencyResolver.java:82)
at org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.resolveDependencyArtifacts(AddDependencySetsTask.java:155)
at org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.addDependencySet(AddDependencySetsTask.java:100)
at org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.execute(AddDependencySetsTask.java:90)
at org.apache.maven.plugin.assembly.archive.phase.DependencySetAssemblyPhase.execute(DependencySetAssemblyPhase.java:54)
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:98)
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:278)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:224)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
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)

Issue Links

relates to

Bug - A problem which impairs or prevents the functions of the product. MASSEMBLY-248 version was null for junit:junit

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
John Casey added a comment - 13/Jul/07 2:36 PM

In the future, please provide more information. A stack trace by itself gives us no means of reproducing the error, and therefore little hope of fixing it.

Show
John Casey added a comment - 13/Jul/07 2:36 PM In the future, please provide more information. A stack trace by itself gives us no means of reproducing the error, and therefore little hope of fixing it.
Hide
Permalink
Markus Nolte added a comment - 13/Jun/08 7:58 AM

the exception occurs if you define a version range in the parents dependency management:
e.g.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>[3.8,4.0)</version>
<type>jar</type>
<scope>test</scope>
</dependency>

workaround: set a fixed version in the assembly project, skipping tests does not work

Show
Markus Nolte added a comment - 13/Jun/08 7:58 AM the exception occurs if you define a version range in the parents dependency management: e.g. <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>[3.8,4.0)</version> <type>jar</type> <scope>test</scope> </dependency> workaround: set a fixed version in the assembly project, skipping tests does not work
Hide
Permalink
Dale Wyttenbach added a comment - 08/Jan/10 1:41 PM

I agree with Markus, but the good news is that this appears to be fixed in 2.2-beta-5

Show
Dale Wyttenbach added a comment - 08/Jan/10 1:41 PM I agree with Markus, but the good news is that this appears to be fixed in 2.2-beta-5

People

  • Assignee:
    John Casey
    Reporter:
    Christian Schulte
Vote (0)
Watch (1)

Dates

  • Created:
    23/May/07 2:43 PM
    Updated:
    08/Jan/10 1:41 PM
    Resolved:
    13/Jul/07 2:36 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.