How to generate ear when the war file is in nexus repo?

Hi all, I have the following problem. Our team has a nexus repo where all the jars and wars are stored. I want to make ear plugin getting it project dependencies from this nexus repo, but not from the local machine. Is it possible? I couldn’t find any related documentation to this subject.

Best Regards, Gospodin Bodurov

This should be possible. First, you define your Nexus repository:

repositories {
    [your repo]
}

To depend on JARs you can use the “earlib” configuration. To depend on the WAR, use the “deploy” configuration. Here’s an example:

dependencies {
    deploy group: 'your.company', name: 'module', version: '1.0', ext: 'war'
    earlib group: 'log4j', name: 'log4j', version: '1.2.15', ext: 'jar'
}

For more information, also check the Ear plugin documentation and the sample code in the Gradle distribution.