My favorites | Sign in
Project Home Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 273: dex fails with deploy (not android:deploy) goal
1 person starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  mosa...@gmail.com
Closed:  May 19


Sign in to add a comment
 
Reported by auth.ga...@gmail.com, Apr 30, 2012
What steps will reproduce the problem?

1. Create a new project from archetype:

$ mvn archetype:generate -DarchetypeArtifactId=android-quickstart -DarchetypeGroupId=de.akquinet.android.archetypes -DarchetypeVersion=1.0.8 -DgroupId=hu.javaforum.android.deploy.issue -DartifactId=deploy-issue-project

2. Set repository in settings.xml and run the clean-install-deploy goal, it fails:

$ mvn clean -U install deploy

What is the expected output?

Normal build with maven deploy into the repository.

What do you see instead?

The dex phase runs twice (it is normally with deploy goal), but the artifact jar added into the second phase, it causes build error.

First dex run:
[DEBUG] Checking for existence of: /home/work/Android/Projects/deploy-issue-project/target/proguard-obfuscated.jar
[DEBUG] Using non-obfuscated input
[DEBUG] Adding jvm argument -Xmx1024M
[DEBUG] Adding dex input: /home/work/Android/Projects/deploy-issue-project/target/classes
[INFO] /usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/bin/java [-Xmx1024M, -jar, /home/work/android-sdk-linux/platform-tools/lib/dx.jar, --dex, --output=/home/work/Android/Projects/deploy-issue-project/target/classes.dex, /home/work/Android/Projects/deploy-issue-project/target/classes]

Second dex run:
[DEBUG] Checking for existence of: /home/work/Android/Projects/deploy-issue-project/target/proguard-obfuscated.jar
[DEBUG] Using non-obfuscated input
[DEBUG] Adding jvm argument -Xmx1024M
[DEBUG] Adding dex input: /home/work/Android/Projects/deploy-issue-project/target/deploy-issue-project-1.0-SNAPSHOT.jar
[DEBUG] Adding dex input: /home/work/Android/Projects/deploy-issue-project/target/classes
[INFO] /usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/bin/java [-Xmx1024M, -jar, /home/work/android-sdk-linux/platform-tools/lib/dx.jar, --dex, --output=/home/work/Android/Projects/deploy-issue-project/target/classes.dex, /home/work/Android/Projects/deploy-issue-project/target/deploy-issue-project-1.0-SNAPSHOT.jar, /home/work/Android/Projects/deploy-issue-project/target/classes]

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

3.1.1, 3.2.0, 3.2.1

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

Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /opt/apache-maven-3.0.4
Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
Java home: /usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre
Default locale: hu_HU, platform encoding: UTF-8
OS name: "linux", version: "3.3.0-1-desktop", arch: "amd64", family: "unix"

Please provide any additional information below.

I've attached the full debug log, and the entire maven project.

I've seen the android-maven-plugin source, the source of the issue is the  AbstractAndroidMojo.filterOutIrrelevantArtifacts method, it isn't filters out the project artifact itself (IMHO).
deploy-issue-project.tgz
13.3 KB   Download
maven.log
332 KB   View   Download
Apr 30, 2012
#1 auth.ga...@gmail.com
I've created a possible patch (added following lines to the filterOutIrrelevantArtifacts):
if (artifact.getGroupId().equals(project.getArtifact().getGroupId())
    && artifact.getArtifactId().equals(project.getArtifact().getArtifactId())
    && artifact.getVersion().equals(project.getArtifact().getVersion())) {
  continue;
}

It isn't a nice solution, but the not artifact.equals nor artifact.compareTo works for me... :(
May 19, 2014
Project Member #2 mosa...@gmail.com
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
Status: WontFix
Owner: mosa...@gmail.com
Sign in to add a comment

Powered by Google Project Hosting