Manfred Moser wrote:
>> Benoit Billington wrote:
>>
>>> I'm facing this problem too.
>>>
>>> Android has created a new format for its libraries called Android
>>> Archive
>>> (.aar)
>>>
>>> This format described here:
>>> http://tools.android.com/tech-docs/new-build-system/aar-format contains
>>> a
>>> "/classes.jar"
>>>
>>> How would I be able to add that classes.jar into my classpath before the
>>> compile phase as theses classes will be needed by my own classes.
>>>
>>> Using Android-Maven-Plugin we extract the .aar into target/unpack/...
>>> So I was thinking to add the classes.jar as a system scoped dependency
>>>
>>> Note:
>>> my pom contains the following dependency:
>>> <dependency>
>>> <groupId>com.example</groupId>
>>> <artifactId>my-android-lib</artifactId>
>>> <version>1.0.0</version>
>>> <type>aar</type>
>>> </dependency>
>>>
>>> I cannot add a jar dependency of the same artifactid & groupid because
>>> the
>>> aar is not grouped with a jar but contains it. so you will always find
>>> .aar only in Maven Central.
>>> <dependency>
>>> <groupId>com.example</groupId>
>>> <artifactId>my-android-lib</artifactId>
>>> <version>1.0.0</version>
>>> <type>jar</type>
>>> </dependency>
>>
>> Use a classifier ... e.g. "classes".
>
> You are misunderstanding Joerg.
No. You have
=============== %< ===================
<dependency>
<groupId>com.example</groupId>
<artifactId>my-android-lib</artifactId>
<version>1.0.0</version>
<type>aar</type>
<scope>provided</scope> <!-- do you need it on classpath ?? -->
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>my-android-lib</artifactId>
<version>1.0.0</version>
<type>jar</type>
<scope>system</scope>
<classifier>classes</classifier>
<systemPath>${basedir}/target/extracted/classes.jar</systemPath>
</dependency>
=============== %< ===================
and configure the dependency plugin to extract the aar to target/extracted.
Have you tried that?
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]