> 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.

We can not change the type or anything. We have a aar file that contains a
classes.jar in it. And we need to make sure that it gets put onto the
classpath for compilation and whatever and then also participates in the
rest of the lifecycle ..e.g. the class files should probably go into
target/classes and will then subsequently be picked up by the android
maven plugin among other code that just got compiled and be processed
(dexed) and then put into the apk (android application package..).

The aar also contains a lot of other things we need to deal with but that
mostly works at this stage. We are just not sure how to add the contents
of the classes.jar to the classpath so that other plugins (like the
compiler plugin) know about it.

Would it maybe even be enough to extract them to target/classes ?

manfred

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to