File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is there a way to publish maven artifacts to nexus repository using a Fusion Job?

 
sundaresan ganapathy
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Fusion job to build and deploy the Maven project, every time i have to manually publish the dependency jars to nexus remote repository before triggering the Fusion build.

Now i am looking for a way to tell the Fusion job to upload my project dependent jars to nexus repository automatically whenever i trigger a Fusion build, any pointers on this would be greatly helpful for me, please advice...

Thanks,
Sundar
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm confused. Why do the Maven build dependencies have to be uploaded to Nexus each time? If they are uploaded once, won't they always be there? Or are you saying that each time you do the Maven build, the dependencies in the pom.xml have changed?

Also what are the relationships/differences between these terms in your post: "Fusion job", "Fusion build", "Maven project"? (Perhaps the fact that I don't use Oracle fusion is one thing that is leading to my confusion. Andy ou did mean Oracle Fusion, right?)
 
sundaresan ganapathy
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fusion is otherwise known as Jenkins , Its nothing but a build tool...we create Fusion job to trigger a Build of our project...
My query is , is there a way to upload maven dependencies jar to maven Nexus repo using a Fusion Job? Intention is to avoid manually uploading jar to maven Nexus repo...so that whenever i trigger a build on parent project it will take care of uploading jars to Nexus repo...
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "maven dependencies jar"?

Do you mean that you have a POM file that lists several dependencies and what you want to do is automatically have something load those dependencies into Nexus before the build takes place? If so, the answer is no. There is not sufficient information in the POM to do this (dependencies are identified by coordinate, there is no property to locate the JAR file on disk)

I also question why you want to do this. Are the dependencies not in Maven Central or some other global repository? If they are, Nexus will automatically gather such dependencies. Well, given the default Nexus configuration, and assuming that Nexus has internet access.

If you have JARs that aren't in such global repositories, you can upload them into Nexus beforehand. This is what we do with third-party JARs (often proprietary) that aren't globally available. We usually define a simple POM for each one and use "mvn deploy:deploy-file" to load it.

As far as JARs from prior builds that you did, they should be in Nexus already, provided you used "mvn deploy" to build them.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic