1

In my project I have many modules.

One of the modules requires a jar file to be deployed to the repository which it does fine.

The others involve every other kind of file: zip, kar etc.

I can see the zip get uploaded if I look for it via the terminal but if I browse Archiva it is not there.

The kar file, for example, does not need to be built but it's being worked on and is currently manually uploaded to the repository (Archiva). This is not desirable.

Each module has a POM and each POM uploads empty jar files to Archiva when it is built (with Jenkins). How can I avoid that? And can I copy files to Archiva without them having to be built into a jar file?

upsert
  • 9
  • 4
Ree
  • 863
  • 2
  • 18
  • 38

1 Answers1

0

You can also give a try to "maven-deploy-plugin" Invoke a maven target in jenkins with this plugin and provide the suitable parameters.

You would also need the repository to be added in you settings.xml if your repository requires login credentials and then use the ID, you mentioned in settings.xml, in the maven target.

org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file
-Durl=<artifact-repo URL>
-Dfile=<name of the file>
-DgroupId=<Group Id>
-DartifactId=<Artifact Id>
-Dversion=<VERSION>
-Dpackaging=<packaging Type>
-DrepositoryId=<ID as mentioned in settings.xml>

Hope this may be of some help.

San7988
  • 106
  • 1
  • 7