tags:

views:

35

answers:

1
+2  Q: 

Maven release JAR

How can i make a project jar release and maven repository strucuture(md5hash,distribution pom,etc) to put this in my own repository? Maven have a plugin to do it? Note, i need to generate this structure in my local machine, i don't have CI and others to do it!

Hopes!!!

+2  A: 

Check the deploy plugin, I think this is what you're looking for. Quoting the documentation:

As a repository contains more than the artifacts (POMs, the metadata, MD5 and SHA1 hash files...), deploying means not only copying the artifacts, but making sure all this information is correctly updated. It's the reponsibility of the deploy plugin.

You'll need to declare a <distributionManagement> element to use it, something like this:

  <distributionManagement>
    <repository>
      <id>internal.repo</id>
      <name>MyCo Internal Repository</name>
      <url>Host to Company Repository</url>
    </repository>
  </distributionManagement>

Where the url can be a "local" file://.

And if the question is about installing a (third party) jar in your local repository (the question is not totally clear), have look at the Maven Install Plugin, install:install and install:install-file both admit a createChecksum optional parameters.

Pascal Thivent
Nice anwser, i don't think about file://Solve my problem! Thanks Pascal!
Rafael Soto