0

I have an existing project that publishes its jars to a local ivy repo as part of the build process. I am trying to figure out how to keep track of the ivy revision number for naming our pom files and jars and then send them to nexus with ant.

I have tried a few different tutorials with no luck, but have managed to get a pom file to generate. Just need to get the revision number back and find an ant task that can push them to maven.

code123456
  • 98
  • 8

1 Answers1

2

The following answer mentions the buildnumber task and how it can be combined with the deliver and makepom tasks to create a resolved POM file for upload into Nexus.

The following answers give more examples of how to push artecfacts into a Maven repository using ivy

Hope this helps.

Community
  • 1
  • 1
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • This is helpful -- Couple questions: Looking at the last link, I can follow that but need to publish more than one artifact, is it as simple as enumerating all the artifacts needed in publications? Also, in this step ` ` I am getting an error saying I am missing an artifact even though it is there. Finally, the POM that is generated has all the other files that are resolved from ivy as dependencies in the POM file, how do I avoid that? – code123456 Sep 21 '15 at 02:15
  • I've added an artifact pattern ` ` and the last problem is that it cannot find the pom file. I'm guessing the pattern is off for the pom file. – code123456 Sep 21 '15 at 13:01
  • @deano The artifacts to be published are listed in the ivy file, a single publish task in the build file is all that is required. As for the ivy dependencies appearing in the POM I think you need to provide an example. – Mark O'Connor Sep 21 '15 at 20:49
  • thanks for the help with this. I've gotten to the point where I have a prepare target that enumerates all expected POM files to generate with `makepom`. My last problem is that it in nexus all dependencies get published to the same directory named after one module that is given in the ivy.xml file after `organisation`. – code123456 Sep 23 '15 at 18:57
  • @deano Don't fully understand. Perhaps a new question with an example will help. – Mark O'Connor Sep 24 '15 at 01:18
  • Thanks for the help -- I ended up using a url resolver and could define exactly where the jars should go based on context. – code123456 Sep 24 '15 at 12:47