You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by SKrepkovich <sk...@gmail.com> on 2008/05/28 18:32:46 UTC
Classifier for deployed JARs
I've been searching the forums for an answer to this, but haven't found
anything concrete...
I want to build & deploy a JAR (mvn deploy) and include a classifier
(preferably using -Dclassifier=something) such that the resulting filename
is something like: plugin.name-1.0.0-20080528-123456-01-SDK.jar (where the
20080528-123456-01 are maven's default build date-time-number, which I have
already).
I can set the <classifier> tag in the POM, but then the deploy phase creates
2 files, one with and one without the classifier, and I have to edit the POM
to change this - I'd rather do it from the command line since I have another
tag -DattachSource that will be used in conjunction with the 'SDK'.
Regards,
Steve
--
View this message in context: http://www.nabble.com/Classifier-for-deployed-JARs-tp17516786p17516786.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Classifier for deployed JARs
Posted by Wendy Smoak <ws...@gmail.com>.
On Wed, May 28, 2008 at 9:32 AM, SKrepkovich <sk...@gmail.com> wrote:
> I can set the <classifier> tag in the POM, but then the deploy phase creates
> 2 files, one with and one without the classifier, and I have to edit the POM
> to change this - I'd rather do it from the command line since I have another
> tag -DattachSource that will be used in conjunction with the 'SDK'.
Set the classifier in the pom, how? When I configure the jar plugin
with a classifier, I see this, indicating only one artifact:
[INFO] [install:install]
[INFO] No primary artifact to install, installing attached artifacts instead.
[INFO] Installing
/private/tmp/jar-with-classifier/target/jar-with-classifier-1.0-SNAPSHOT-SDK.jar
to /Users/wsmoak/.m2/repository/com/example/jar-with-classifier/1.0-SNAPSHOT/jar-with-classifier-1.0-SNAPSHOT-SDK.jar
Unfortunately, deployment then fails:
[INFO] [deploy:deploy]
altDeploymentRepository = null
[INFO] Retrieving previous build number from repo
[INFO] repository metadata for: 'snapshot
com.example:jar-with-classifier:1.0-SNAPSHOT' could not be found on
repository: repo, so will be created
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact:
/private/tmp/jar-with-classifier/target/classes (No such file or
directory)
To test, I added this to the quickstart project:
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classifier>SDK</classifier>
</configuration>
</plugin>
</plugins>
</build>
(And distributionManagement which was required to test deployment.)
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org