You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Edelson, Justin" <Ju...@mtvstaff.com> on 2008/10/27 19:37:23 UTC

trouble relocating a plugin

I asked a few months ago on the user list about relocating a plugin and
finally got around to doing it. Well, it didn't go as planned.
 
I had a plugin with groupId com.mtvi.plateng.maven and artifactId
maven-hudson-plugin (yes, I know this should probably be
hudson-maven-plugin and if I can get relocation to work with the
groupId, maybe I'll try to tackle the artifactId next). I want to change
the groupId to be org.jvnet.hudson.tools. The previous version was
2.0-alpha-1 and I just released 2.0-alpha-2 under the new groupId.
 
I edited /com/mtvi/plateng/maven/maven-hudson-plugin/maven-metadata.xml
to be:
<metadata>
  <groupId>com.mtvi.plateng.maven</groupId>
  <artifactId>maven-hudson-plugin</artifactId>
  <version>2.0-alpha-2</version>
  <versioning>
    <latest>2.0-alpha-2</latest>
    <release>2.0-alpha-2</release>
    <versions>
      <version>2.0-alpha-1</version>
      <version>2.0-alpha-2</version>
    </versions>
    <lastUpdated>20081027131100</lastUpdated>
  </versioning>
</metadata>
(and regenerated the hashes)

Then I created
/com/mtvi/plateng/maven/maven-hudson-plugin/2.0-alpha-2/maven-hudson-plu
gin-2.0-alpha-2.pom with this content:
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mtvi.plateng.maven</groupId>
  <artifactId>maven-hudson-plugin</artifactId>
  <version>2.0-alpha-2</version>
  <distributionManagement>
    <relocation>
      <groupId>org.jvnet.hudson.tools</groupId>
    </relocation>
  </distributionManagement>
</project>
(and generated hashes for this)

When running against a clean local repository and a settings file that
contains ONLY com.mtvi.plateng.maven as a pluginGroup, I can see that
the relocation is respected (in that I download
/org/jvnet/hudson/tools/maven-hudson-plugin/2.0-alpha-2/maven-hudson-plu
gin-2.0-alpha-2.pom), but I get an error that the JAR file is missing
because Maven is attempting to download the JAR from the pre-reloation
location:
Downloading:
http://download.java.net/maven/2/com/mtvi/plateng/maven/maven-hudson-plu
gin/2.0-alpha-2/maven-hudson-plugin-2.0-alpha-2.jar

Instead of the relocated location.

Any ideas?

All of these (pre-relocation, relocation, and relocated) artifacts can
be found on the java.net repository.

Thanks,
 
Justin Edelson
VP, Platform Engineering
MTV Networks Digital

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