Hello,

 

I am trying to upload an artifact to an Archiva repository via the CLI.

 

The reason I am using the CLI is because I am working on a .NET projects hence 
using NAnt build scripts. Using NAnt means that I do not have access to the 
convenient Ant ivy tasks such as <ivy:publish /> and must rely on executing the 
ivy.jar via NAnt's <exec /> task.

 

Every sample I have stumbled upon publishes artifacts via the <ivy:publish /> 
task. I need to achieve the same thing but via the CLI.

 

Looking and the -help output of ivy.jar I notice the following publishing 
options:

==== publish options

 -publish <resolvername>      use given resolver to publish to

 -publishpattern <artpattern> use given pattern to find artifacts to publish

 -revision <revision>         use given revision to publish the module

 -status <status>             use given status to publish the module

 -overwrite                   overwrite files in the repository if they exist

 

 

I have started experimenting with the following command line:

 

-jar tools\ivy\ivy.jar -publishpattern C:\Dev\UtilityClasses/build/Artifact.dll 
-revision 1.1.1

 

This throws an error saying that the ivy file is not found. I'm not sure why it 
needs the ivy file when publishing an artifact. Can someone shed some light 
into this?

Adding the -ivy option and pointing to the project's ivy file results in a 
success but not upload occurred. It only created a ivy-1.1.1.xml file ( a copy 
of ivy.xml) in my project's root folder.

 

Also, when I manually upload an artifact to Archiva I need to input the 
following information: Group Id, Artifact Id, Version And Packaging (dll, in my 
case). I also tell Archiva to generate a Maven 2 POM file. How would I set all 
of these values via an ivy CLI publish? Other than revision for the version 
number, I don't seem to see options I can set which would relate to the 
information Archiva would expect upon an upload.

 

Thanks and regards,

 

-          Georges

Reply via email to