Nothing to see here, turns out I was being a %#@&wit.  Using the method
documented in the maven-publish plugin works just fine if you push that
change to the right remote repository X-.

Just to spell it out, this is what I had to do to get the artifactId and
jar name to be what I wanted even from Bamboo jobs:

publishing {
    publications {
        mavenJava(MavenPublication) {
            from components.java

            // Override the default artifact ID
            artifactId = 'foobar'

            // ...
        }
    }
}

- Peter

On Wed, Mar 18, 2015 at 1:04 PM, Peter Giles <[email protected]> wrote:

> I'm dealing with a puzzling situation using the Gradle Artifactory plugin
> where the artifactId and the artifact name that are published changes when
> the build is run from our Bamboo server.  When I run the build with 'gradle
> artifactoryPublish' manually, I get a jar published in our repository to
> edu/uw/abc/foobar/0.1.0-53/foobar-0.1.0-53.jar, and from bamboo I get
> edu/uw/abc/FOO-JOB-1/0.1.0-53/FOO-JOB-1-0.1.0-53.jar.  The build key (as
> evidenced by the environment variable bamboo_buildKey) that Bamboo is
> exporting is FOO-JOB-1, and it seems that is somehow overriding the
> artifactId/name that I want to publish under.
>
> We're running Bamboo 5.7.1 build 5715, Gradle 2.2.1, Groovy 2.3.6, and
> Oracle Java 1.8.0_25 (needs to be updated, I know).  The Gradle Artifactory
> plugin version is 3.0.1, we're running Artifactory Pro Power Pack 3.5.0
> rev. 30150, and the Bamboo Artifactory plugin version is 1.7.6.
>
> I want to turn this behavior off so that the artifactId remains foobar
> when publishing from Bamboo, but I can't figure out how, nor can I find
> documentation that explains why this is happening.  I've tried many
> different things to address this behavior, here's a sampling:
>
> * I tried changing the Bamboo plan from using an Artifactory Gradle task
> to a regular old Command task, but it didn't help.
> * I tried reproducing the issue locally by setting my environment
> variables using what was being logged on the build server, but it did not
> have the same effect.
> * On a wild guess, I tried setting publishBuildInfo=false but that didn't
> make any difference with respect to the artifactId.
> * I tried overriding the artifactId inside the publication definition as
> shown in the maven-publish plugin documentation (
> https://www.gradle.org/docs/current/userguide/publishing_maven.html#N17541),
> but that still got superseded by the build key.
>
> I'm running out of ideas, so any help with this would be much appreciated!
>
> - Peter
>
>
>


-- 
Peter Giles  |  UW-IT IM Enterprise Information Services
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to