[GRADLE-937] The type attribute of the artifact tag in ivy.xml is not set appropriately for javadoc and sources Created: 10/May/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Michael Parmeley Assignee: Hans Dockter
Resolution: Fixed Votes: 0


 Description   

When adding sources and javadoc artifacts to the archives configuration the type attribute of the artifact tag is not set appropriately. Instead a non-existent classifer attribute is added (see GRADLE-936).

Here is what is produced now:

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

Here is the expected output:

 
<publications>
<artifact name="genesys-communicators" type="jar" ext="jar" conf="archives"/>
<artifact name="genesys-communicators" type="javadoc" ext="jar" conf="archives"/>
<artifact name="genesys-communicators" type="source" ext="jar" conf="archives"/>
</publications>


 Comments   
Comment by Michael Parmeley [ 08/Jun/10 ]

What is the fix version for this? This still occurs with 0.9 preview 3.

Comment by Michael Parmeley [ 24/Jun/10 ]

This is marked as fixed (although a fixed version isn't marked); however, in gradle 0.9 preview 3 this still doesn't work. Here is what is produced:

<publications>
  <artifact name="genesys-communicators" type="jar" ext="jar" conf="archives"/>
  <artifact name="genesys-communicators" type="jar" ext="jar" conf="archives" m:classifier="javadoc"/>
  <artifact name="genesys-communicators" type="jar" ext="jar" conf="archives" m:classifier="sources"/>
</publications>

This is the expected output:

<publications>
  <artifact name="genesys-communicators" type="jar" ext="jar" conf="archives"/>
  <artifact name="genesys-communicators" type="javadoc" ext="jar" conf="archives" m:classifier="javadoc"/>
  <artifact name="genesys-communicators" type="sources" ext="jar" conf="archives" m:classifier="sources"/>
</publications>
Comment by Hans Dockter [ 25/Jun/10 ]

You need to specify the type attribute of the artifacts your are publishing (which is not possible with preview-3, only with trunk):

artifacts {
   archives(sourceJar) {
      type = 'source'
   }
}
Generated at Wed Jun 30 11:42:44 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.