Greetings,

[INFO] [enforcer:display-info {execution: default}]
[INFO] Maven Version: 2.2.0
[INFO] JDK Version: 1.5.0_16 normalized as: 1.5.0-16
[INFO] OS Info: Arch: i386 Family: unix Name: linux Version: 2.6.29.5

It seems ridiculous to me that I have to specifically list a
dependency version when it is bound to a particular plugin. Please see
the example:

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>com.mycom.super.resources</groupId>
            <artifactId>checkstyle</artifactId>
            <version>0.0.1-SNAPSHOT</version>
          </dependency>
        </dependencies>
        <executions>
          [...]
        </executions>
      </plugin>
    </plugins>

When I already have defined a managed version of that dependency as such:

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.mycom.super.resources</groupId>
        <artifactId>checkstyle</artifactId>
        <version>0.0.1-SNAPSHOT</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

When I don't code a version inside the <build> section, I receive the following:

[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:     com.mycom.super.resources
    o ArtifactID:  checkstyle
    o Version:     <<< MISSING >>>
    o Type:        jar

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.artifact.InvalidArtifactRTException: For artifact
{com.mycom.super.resources:checkstyle: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:70)
        at 
org.apache.maven.project.artifact.MavenMetadataSource.createArtifacts(MavenMetadataSource.java:439)
        at 
org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:377)
        at 
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:217)
        at 
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:177)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1539)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1744)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:446)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:176)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
        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] ------------------------------------------------------------------------

Ugggh! Why must I duplicate this information? Worst of all, the
m-release-p doesn't bump these versions as I would hope it would. So,
these things quickly become out of sync and are a royal PITA to
maintain.

Please help!
-jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to