I am trying to get a JavaDoc and sources jar to upload to our Ivy repository.
I found another thread that had a great example of this so I attempted as
described (http://old.nabble.com/Source-releases...-td26065269.html).

I have this:

task packageJavadoc(type: Jar, dependsOn: 'javadoc') {
    fileSet(dir: javadoc.destinationDir)
    classifier = 'javadoc'
}

task packageSources(type: Jar) {
    from sourceSets.main.allSource
    classifier = 'sources'
}

artifacts {
    archives packageJavadoc
    archives packageSources
}

The javadoc and sources jars are produced and the main jar is uploaded but
the JavaDoc and the Sources aren't uploaded. Strangely the sources and
javadoc jars ARE put in the ivy.xml file:

<publications>
<artifact name="redacted" type="jar" ext="jar" conf="archives"/>
<artifact name="redacted" type="jar" ext="jar" conf="archives"
classifier="javadoc"/>
<artifact name="redacted" type="jar" ext="jar" conf="archives"
classifier="sources"/>
</publications>

Any insight why the javadoc and sources jar would not be uploaded? I get no
errors from the build. That thread I link to above does mention this doesn't
work for Maven repositories in 0.8; however, I am going to an Ivy repository
with a ivy.xml file. The bug listed in the thread seems to be related to
pom.xml so I don't believe it applies to my situation.

Also, I see that the classifier is set to javadoc and sources in the ivy.xml
file, shouldn't the type attribute also be set to javadoc and source as
appropriate? The Ivy artifact documenation doesn't list "classifier" as an
attribute for the artifacts tag:

http://ant.apache.org/ivy/history/latest-milestone/ivyfile/artifact.html

Output of my build:

mjparme:~/java_projects/redacted:332> gradle uploadA
:compileJava
:processResources
:classes
:jar
:javadoc
:packageJavadoc
:packageSources
:uploadArchives

BUILD SUCCESSFUL

Total time: 11.029 secs

-- 
View this message in context: 
http://old.nabble.com/JavaDoc-not-uploading-to-Ivy-repository-tp28488187p28488187.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


Reply via email to