We're using Artifactory OSS to manage our Maven repository. It's great in
pretty much all ways except for one: deploying an artifacts bundle. Don't
get me wrong, the function itself works great as well. The problem is the
format for the artifacts bundle and how that gets created. This process is
really clunky, at least the way I'm doing it. I'm wondering if I'm missing
something or if there's a better way to do this.

So suppose you want to deploy an artifact with the groupId org.myorg, the
artifactId myartifact, and version 1.0. What I'm currently doing is running
the following command:

mvn clean install source:jar javadoc:jar

This generates everything I need. Now comes the problem. I go to my local
repository, so ~myname/.m2/repository. If that folder had been empty before
I started and my project had no dependencies, I could just zip up the org
folder, since the only things under it would be myorg/myartifact/1.0/...

But of course that's never how it works. In fact, I have many dependencies
that also get downloaded and cached in my local repository and there are
even other artifacts under org/myorg and there may even be other versions of
org.myorg:myartifact.

So to work around this, I create a full folder hierarchy in some working
folder somewhere:

mkdir /tmp/org/myorg/myartifact
cd  /tmp
cp -R ~myname/.m2/repository/org/myorg/myartifact/1.0 org/myorg/myartifact
zip -r bundle.zip org
rm -r org

Now I can deploy bundle.zip and everything will be properly handled.

That seems a little ridiculous. I've messed around with the
maven-assembly-plugin and the maven-repository-plugin, but these don't
really produce that mirror of the local repository that Artifactory wants.

So like I said, am I missing something here? Is there a relatively
straightforward way to get Maven to generate a Zip file in the format that
Artifactory wants? Perhaps a JFrog custom plugin? If there's not, there
REALLY oughta be.

Any help on this issue would be greatly appreciated.


--
View this message in context: 
http://forums.jfrog.org/Creating-an-artifacts-bundle-tp7181692p7181692.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to