File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Ant, Maven and Other Build Tools
Maven Question on distribution management
Joined: Feb 10, 2001
Apr 25, 2011 08:13:27
and have simplest structure as below.
now when i run mvn deploy -Psnapshots, i want the artifact to be deployed under snapshots on archiva and not under internal so i created profile in
<profile> <id>snapshots</id> <repositories> <repository> <id>archiva.snapshots</id> <url>http://my.build.server:8080/archiva/repository/snapshots/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile>
And pom.xml as distribution management as follows
<distributionManagement> <repository> <id>archiva.internal</id> <name>Internal Release Repository</name> <url>http://my.build.server:8080/archiva/repository/internal/</url> </repository> <snapshotRepository> <id>archiva.snapshots</id> <name>Internal Snapshot Repository</name> <url>http://my.build.server:8080/archiva/repository/snapshots</url> </snapshotRepository> </distributionManagement>
and i exeucte maven as
mvn deploy -Psnapshots
still it always tries to deploy to internal.
maven version maven-2.0.7
All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Joined: Oct 01, 2001
Apr 25, 2011 16:25:39
You can run:
mvn -Psnapshots help:active-profiles
just to be sure that the profile you want is actually getting activated. I think though that you may be confusing what you mean by snapshot and what it means to the distributionManagement plugin.
Joined: Feb 10, 2001
Apr 26, 2011 01:12:43
Thanks much for your reply Greg, the output of help:active-profiles is
The following profiles are active:
- snapshots (source: settings.xml)
and now i found that i was using vesion as
, all works fine now.
I agree. Here's the link:
subject: Maven Question on distribution management
[Maven] Could not find artifact javax.transaction:jta:jar:1.0.1B in central http://repo1.maven.org/
Maven: Trouble loading a dependency from a local repository
Why is Eclipse/Maven project not picking up the values from settings.xml?
Build project from the Local Repository instead of Remote Repository
problem with mvn deploy
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015