sktverma / maven-android-plugin

Automatically exported from code.google.com/p/maven-android-plugin
0 stars 0 forks source link

Incorrect regex in common/NativeHelper.java #440

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build APKLIB with native so made for target armeabi-v7a. The "a" at the end 
of the target architecture is important.
2. Include APKLIB inside other APK.
3. Packaged APK will not contain armeabi-v7a library.

What is the expected output?

APK should contain armeabi-v7a library.

What do you see instead?

The armeabi-v7a library inside APK.

What version of maven-android-plugin are you using?

Effects current github master and 3.7.0. Probably more.

What are the complete output lines of "mvn -version" on your machine?

Maven 3.0.5

Please provide any additional information below.

The error is specifically line 182 of NativeHelper.java.

https://github.com/jayway/maven-android-plugin/blob/master/src/main/java/com/jay
way/maven/plugins/android/common/NativeHelper.java#L182

The regex [^.jar] matches any file or directory that ends in the characters 
'j', 'a', or 'r'. However it should be written to only match files that end in 
the string 'jar'. Because of this mistake, that line will remove directories 
like 'armeabi-v7a' but not 'armeabi'. This is probably why the bug wasn't 
caught sooner.

Original issue reported on code.google.com by zmora...@gmail.com on 9 Jan 2014 at 4:44

GoogleCodeExporter commented 9 years ago
If this is the case, it could definitely explain what I files under 
https://code.google.com/p/maven-android-plugin/issues/detail?id=444

I will have a try and see whether renaming the 'armeabi-v7a' folder to just 
'armeabi' would fix my issue.

Original comment by j.bros...@gmail.com on 5 Feb 2014 at 10:48

GoogleCodeExporter commented 9 years ago
I took the example from #444 and added additional libs directories for 
armeabi-v7a, mips and x86. Using the pull request on that ticket, all of them 
were carried through the apklib and into the apk. 

lib
├── armeabi
│   └── foo.so
├── armeabi-v7a
│   └── foo.so
├── mips
│   └── foo.so
└── x86
    └── foo.so

Original comment by malac...@gmail.com on 22 Mar 2014 at 8:02

GoogleCodeExporter commented 9 years ago
We are no longer using the issue tracking system on Google Code. Please refile 
this issue on https://github.com/jayway/maven-android-plugin/issues if you 
still have this problem with the latest release of the Android Maven Plugin

Original comment by mosa...@gmail.com on 19 May 2014 at 4:20