maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@codehaus.org>
Subject [jira] Updated: (MNG-3695) Allow dependencies' scopes to be managed without explicit versions
Date Mon, 04 Aug 2008 15:04:26 GMT

     [ http://jira.codehaus.org/browse/MNG-3695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benjamin Bentmann updated MNG-3695:
-----------------------------------

    Issue Type: New Feature  (was: Bug)

> Allow dependencies' scopes to be managed without explicit versions
> ------------------------------------------------------------------
>
>                 Key: MNG-3695
>                 URL: http://jira.codehaus.org/browse/MNG-3695
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: Dependencies
>    Affects Versions: 2.0.9
>            Reporter: Mark Hobson
>
> Currently, a dependency's version or a dependency's version and scope can be managed
in dependency management, but a dependency's scope alone cannot be managed.  For example,
we cannot express the following:
> {noformat}<dependencies>
>   <dependency>
>     <groupId>javax.mail</groupId>
>     <artifactId>mail</artifactId>
>     <scope>provided</scope>
>   </dependency>
> </dependencies>{noformat}
> Of course it does work if we also specify a version, but there are times when we want
to merely control the scope and not change the resolved version.  When we try the above example
we get:
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] An invalid artifact was detected.
> This artifact might be in your project's POM, or it might have been included transitively
during the resolution process.
>  Here is the information we do have for this artifact:
>     o GroupID:     javax.mail
>     o ArtifactID:  mail
>     o Version:     <<< MISSING >>>
>     o Type:        jar
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.artifact.InvalidArtifactRTException: For artifact {javax.mail:mail:null:jar}:
The version cannot be empty.
>         at org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:147)
>         at org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:122)
>         at org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:158)
>         at org.apache.maven.artifact.factory.DefaultArtifactFactory.createDependencyArtifact(DefaultArtifactFactory.java:58)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.createManagedVersionMap(DefaultMavenProjectBuilder.java:452)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:912)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
>         at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
>         at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
>         at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>         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.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){noformat}

-- 
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

        

Mime
View raw message