Quantcast

Publishing a maven artifact depending on an aar (or other non "jar") artifacts.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Publishing a maven artifact depending on an aar (or other non "jar") artifacts.

Xavier Ducrohet
I'm getting some user reports that Maven requires dependencies to include a type if the type is not jar.

For example, the POM should look like this:


  <dependencies>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>appcompat-v7</artifactId>
      <version>19.0.0</version>
      <scope>compile</scope>
      <type>aar</type>
</dependency> </dependencies>

However, when Gradle generates the POM, it omits the <type> node.

I'm not sure what the right behavior is since the POM of the dependency itself declares the type as aar in the first place anyway.

Does anyone know what the right behavior should be and whether Gradle is not doing the right thing?



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Publishing a maven artifact depending on an aar (or other non "jar") artifacts.

tprochazka
This is really very important problem, all projects which has some dependencies different that jar are invalid artifacts in maven central and it is not possible to use it by maven. I don't understand why Maven Central allow to deploy such invalid POM :-(

Any progress?

Some related error reports and discussion
https://code.google.com/p/android/issues/detail?id=72807
https://groups.google.com/forum/#!topic/adt-dev/PM50ZXFXN_k

Example of affected project
https://github.com/ManuelPeinado/FadingActionBar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Publishing a maven artifact depending on an aar (or other non "jar") artifacts.

Luke Daley-2
In reply to this post by Xavier Ducrohet


On 8 August 2014 at 5:14:23 am, Xavier Ducrohet ([hidden email]) wrote:

I'm getting some user reports that Maven requires dependencies to include a type if the type is not jar.

For example, the POM should look like this:

  <dependencies>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>appcompat-v7</artifactId>
      <version>19.0.0</version>
      <scope>compile</scope>
      <type>aar</type>
</dependency> </dependencies>

However, when Gradle generates the POM, it omits the <type> node.

I'm not sure what the right behavior is since the POM of the dependency itself declares the type as aar in the first place anyway.

Does anyone know what the right behavior should be and whether Gradle is not doing the right thing?

It seems logical that this would be required, but I don’t have anything authoritative on it. 

@Adam: wdyt?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Publishing a maven artifact depending on an aar (or other non "jar") artifacts.

Luke Daley-2
In reply to this post by tprochazka


On 6 September 2014 at 3:45:13 am, tprochazka ([hidden email]) wrote:

This is really very important problem, all projects which has some 
dependencies different that jar are invalid artifacts in maven central and 
it is not possible to use it by maven. I don't understand why Maven Central 
allow to deploy such invalid POM :-( 

Any progress? 

Some related error reports and discussion 
https://code.google.com/p/android/issues/detail?id=72807 
https://groups.google.com/forum/#!topic/adt-dev/PM50ZXFXN_k 

Example of affected project 
https://github.com/ManuelPeinado/FadingActionBar 

No progress to report. Looks like Xav’s original email went through the cracks. Have attempted a resurrection.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Publishing a maven artifact depending on an aar (or other non "jar") artifacts.

william.ferguson@xandar.com.au
Where is this at?

It's a really painful issue.

The Poms generated by Gradle that list AARs as dependencies don't actually specify the the type as AAR. Which means the deps actually resolve to JAR files and not AAR files.

This means that builds break.
Loading...