I wrote something concerning that subject some time ago:
http://gradle.1045684.n5.nabble.com/uploading-sources-and-javadocs-eclipse-plugin-is-very-strict-td4677989.html

Maybe it will help you.

Cheers,
Ruediger.

Am 16.02.2012 18:03, schrieb Glyn Walters:
Hi

Having some problems attaching a source jar. I have a project that creates a
source jar like this:

task sourcesJar(type: Jar, dependsOn:classes) {
        classifier = 'sources'
        from sourceSets.main.allSource
     manifest {
         attributes 'Implementation-Title': 'Messaging Common Sources',
'Implementation-Version': version
     }
}

jar {
        dependsOn sourcesJar
     manifest {
         attributes 'Implementation-Title': 'Messaging Common',
'Implementation-Version': version
     }
}

The artifacts get created correctly on TeamCity (Team City as well as
building, also acts as an ivy repo):

MessagingCommon-91933-sources.jar
MessagingCommon-91933.jar

In the project that has the dependency I have:

dependencies {
        compile group: "org", name: "bt544", version: '91933'
}

Then if I run "gradle eclipse" I can see in my new build path I have the
following jars on the build path:

{gradleCacheDir}\MessagingCommon-91933-91933.jar and
{gradleCacheDir}\MessagingCommon-91933-sources-91933.jar

But the jar is not acting as a souce jar if I refresh in eclipse. Is this
anything to do with the extra "-91933" that was appended to the "-sources"?
I'm not sure if "-91933-sources" becoming "-91933-sources-91933" is
something gradle is doing or if its something the TeamCity Ivy is appending.
Because if I go and get the artifacts directly it ends with "-sources".

Any advice would be appreciated.

Thanks
Glyn


--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Attaching-source-jar-with-eclipse-plugin-tp5490090p5490090.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

     http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to