File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Is there a way to publish maven artifacts to nexus repository using a Fusion Job? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Is there a way to publish maven artifacts to nexus repository using a Fusion Job?" Watch "Is there a way to publish maven artifacts to nexus repository using a Fusion Job?" New topic
Author

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

sundaresan ganapathy
Greenhorn

Joined: Oct 08, 2008
Posts: 23
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

Joined: May 14, 2008
Posts: 5845
    
    7

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?)


JBoss In Action
sundaresan ganapathy
Greenhorn

Joined: Oct 08, 2008
Posts: 23
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

Joined: May 14, 2008
Posts: 5845
    
    7

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
 
subject: Is there a way to publish maven artifacts to nexus repository using a Fusion Job?