lnln1111 / android-apktool

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

Wiki build instructions do not work #284

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. $ git clone git://github.com/brutall/brut.apktool.git apktool 
2. $ cd apktool
3. $ mvn package

What is the expected output? What do you see instead?
Expected a successful build but the following output is generated:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] apktool
[INFO] apktool library
[INFO] apktool cli
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building apktool 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building apktool library 1.4.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: 
https://oss.sonatype.org/content/repositories/releases/com/mycila/maven-license-
plugin/maven-license-plugin/maven-metadata.xml
[WARNING] Could not verify plugin's Maven prerequisite: Invalid version range 
[2.2.1.), single version must be surrounded by []
Downloading: 
http://android-apktool.googlecode.com/svn/m2-releases/brut/apktool/smali/smali-p
om/1.0-SNAPSHOT/maven-metadata.xml
Downloading: 
http://android-apktool.googlecode.com/svn/m2-releases/brut/apktool/smali/smali-p
om/1.0-SNAPSHOT/smali-pom-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] apktool ........................................... SUCCESS [0.596s]
[INFO] apktool library ................................... FAILURE [4.979s]
[INFO] apktool cli ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.308s
[INFO] Finished at: Tue Jan 03 11:17:57 MST 2012
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project apktool-lib: Could not resolve 
dependencies for project brut.apktool:apktool-lib:jar:1.4.4-SNAPSHOT: Failed to 
collect dependencies for [brut.j:dir:jar:1.0 (compile), brut.j:util:jar:1.0 
(compile), brut.j:common:jar:1.0 (compile), 
brut.apktool.smali:smali:jar:1.3.0-brut6 (compile), 
brut.apktool.smali:baksmali:jar:1.3.0-brut6 (compile), 
brut.apktool.smali:util:jar:1.3.0-brut6 (compile), org.yaml:snakeyaml:jar:1.7 
(compile), xpp3:xpp3:jar:1.1.4c (compile), junit:junit:jar:4.8.2 (compile), 
xmlunit:xmlunit:jar:1.3 (compile)]: Failed to read artifact descriptor for 
brut.apktool.smali:smali:jar:1.3.0-brut6: Could not find artifact 
brut.apktool.smali:smali-pom:pom:1.0-SNAPSHOT in android-apktool.googlecode.com 
(http://android-apktool.googlecode.com/svn/m2-releases) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :apktool-lib

What version of the product are you using? On what operating system?
Java version: 1.6.0_29, Apache Maven 3.0.3, OS X 10.6.8, aapt v0.2 

Please provide any additional information below.

Original issue reported on code.google.com by wfri...@gmail.com on 3 Jan 2012 at 6:32

GoogleCodeExporter commented 9 years ago

[INFO] Error building POM (may not be this project's POM).

Project ID: brut.apktool.smali:smali:jar:${aversion}

Reason: Cannot find parent: brut.apktool.smali:smali-pom for project: 
brut.apktool.smali:smali:jar:${aversion} for project 
brut.apktool.smali:smali:jar:${aversion}

Yeah same error.

Original comment by connor.tumbleson on 4 Jan 2012 at 4:26

GoogleCodeExporter commented 9 years ago
Hi,

I am also getting the same error.

[WARNING] For this reason, future Maven versions might no longer support buildin
g such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] apktool
[INFO] apktool library
[INFO] apktool cli
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building apktool 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building apktool library 1.4.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] Could not verify plugin's Maven prerequisite: Invalid version range [2
.2.1.), single version must be surrounded by []
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] apktool ........................................... SUCCESS [0.078s]
[INFO] apktool library ................................... FAILURE [0.140s]
[INFO] apktool cli ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.624s
[INFO] Finished at: Thu Jan 19 08:47:48 IST 2012
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project apktool-lib: Could not resolve depende
ncies for project brut.apktool:apktool-lib:jar:1.4.4-SNAPSHOT: Failed to collect
 dependencies for [brut.j:dir:jar:1.0 (compile), brut.j:util:jar:1.0 (compile),
brut.j:common:jar:1.0 (compile), brut.apktool.smali:smali:jar:1.3.0-brut6 (compi
le), brut.apktool.smali:baksmali:jar:1.3.0-brut6 (compile), brut.apktool.smali:u
til:jar:1.3.0-brut6 (compile), org.yaml:snakeyaml:jar:1.7 (compile), xpp3:xpp3:j
ar:1.1.4c (compile), junit:junit:jar:4.8.2 (compile), xmlunit:xmlunit:jar:1.3 (c
ompile)]: Failed to read artifact descriptor for brut.apktool.smali:smali:jar:1.
3.0-brut6: Failure to find brut.apktool.smali:smali-pom:pom:1.0-SNAPSHOT in http
://android-apktool.googlecode.com/svn/m2-releases was cached in the local reposi
tory, resolution will not be reattempted until the update interval of android-ap
ktool.googlecode.com has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <goals> -rf :apktool-lib

I also tried building the dependencies separately but that also is throwing 
error as below:

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for 
brut.j:common:jar:1.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for 
com.mycila.maven-license-plugin:maven-license-plugin is missing. @ line 28, 
column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten 
the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support 
building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Brut Java commons 1.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ common 
---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ common ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ 
common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
c:\Users\sumitkumar\brut.j.common\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ 
common ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ common ---
[INFO] No tests to run.
[INFO] Surefire report directory: 
c:\Users\sumitkumar\brut.j.common\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ common ---
[INFO] 
[INFO] --- maven-license-plugin:1.10.b1:check (default) @ common ---
[INFO] Checking licenses...
[WARNING] Unknown file extension: c:\Users\sumitkumar\brut.j.common\NOTICE
[WARNING] Unknown file extension: c:\Users\sumitkumar\brut.j.common\LICENSE
[WARNING] Unknown file extension: c:\Users\sumitkumar\brut.j.common\.gitignore
[INFO] Missing header in: c:\Users\sumitkumar\brut.j.common\x.txt
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.918s
[INFO] Finished at: Thu Jan 19 08:57:35 IST 2012
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
com.mycila.maven-license-plugin:maven-license-plugin:1.10.b1:check (default) on 
project common: Some files do not have the expected license header -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Thanks

Original comment by sumit....@gmail.com on 19 Jan 2012 at 3:28

GoogleCodeExporter commented 9 years ago
The reason for this bug are problems in the provided pre-build maven packages.
They are downloaded automatically but they contain the wron version identifier 
and a wrong parent-pom reference.

How to fix this:

1. Open the subdirectory "repository\brut\apktool" in your local maven 
repository. It is usually located in you user home directory in a directory 
named ".m2".
2. Edit the following files:

smali\baksmali\1.3.0-brut6\baksmali-1.3.0-brut6.pom
smali\dexlib\1.3.0-brut6\dexlib-1.3.0-brut6.pom
smali\smali\1.3.0-brut6\smali-1.3.0-brut6.pom
smali\util\1.3.0-brut6\util-1.3.0-brut6.pom

in each of this files replace 

"<version>${aversion}</version>" or "<version>${version}</version>" with 
"<version>1.3.0-brut6</version>"

and 4 lines below in the <parent> element replace

"<version>1.0-SNAPSHOT</version>" with "<version>1.0-brut1</version>"

Afterwards the "mvn package" command will succeed.

Original comment by jan.stot...@googlemail.com on 10 Feb 2012 at 9:27

GoogleCodeExporter commented 9 years ago
I'm experiencing the same issue with mvn and mvn2 on OS X 10.7, even installing 
dependencies by hand.

Please merge the patch provided by Jan.

Original comment by and.dam...@gmail.com on 2 May 2012 at 3:07

GoogleCodeExporter commented 9 years ago
Is this seriously almost 6 months old and STILL hasn't been resolved? How hard 
could it possibly be?

Original comment by Justin.B...@gmail.com on 29 May 2012 at 5:51

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
(edited)
If you check changes in mercurial repository [1] you can see that there has 
been no activity in these past six months, probably someone interested enough 
needs to fork it (here on googlecode or on github) and merge in the patch

[1] http://code.google.com/p/android-apktool/source/list changes

Original comment by and.dam...@gmail.com on 29 May 2012 at 6:16

GoogleCodeExporter commented 9 years ago
Except that the build does not succeed, I get the same output. Seems like some 
other file is responsible for the faulty version tag but I don't know which 
one. Anybody?

Original comment by stylogic...@gmail.com on 12 Jun 2012 at 4:40

GoogleCodeExporter commented 9 years ago
Also this instruction:

and 4 lines below in the <parent> element replace

"<version>1.0-SNAPSHOT</version>" with "<version>1.0-brut1</version>"

doesn't make sense. Each of those files has the text 
"<version>1.0-brut1</version>" already. Is this the wrong tag?

Original comment by stylogic...@gmail.com on 12 Jun 2012 at 4:41

GoogleCodeExporter commented 9 years ago
Output, after performing work around:

Downloading: 
http://android-apktool.googlecode.com/svn/m2-releases/brut/apktool/smali/smali-p
om/1.0-SNAPSHOT/smali-pom-1.0-SNAPSHOT.pom
[INFO] Unable to find resource 'brut.apktool.smali:smali-pom:pom:1.0-SNAPSHOT' 
in repository android-apktool.googlecode.com 
(http://android-apktool.googlecode.com/svn/m2-releases)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Project ID: brut.apktool.smali:smali:jar:${aversion}

Reason: Cannot find parent: brut.apktool.smali:smali-pom for project: 
brut.apktool.smali:smali:jar:${aversion} for project 
brut.apktool.smali:smali:jar:${aversion}

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Mon Jun 11 21:20:37 PDT 2012
[INFO] Final Memory: 16M/39M
[INFO] ------------------------------------------------------------------------

Original comment by stylogic...@gmail.com on 12 Jun 2012 at 4:42

GoogleCodeExporter commented 9 years ago
Works for me. First time around I guess I missed the dexlib directory. Second 
time around I made the change to the dexlib & the build worked. I was careful 
to modify both <version>${aversion}</version>" AND 
"<version>${version}</version> in each file where I found them, plus the 
<version>1.0-SNAPSHOT</version>. I did not modify any other tags.

Original comment by esqoconn...@gmail.com on 10 Sep 2012 at 12:21

GoogleCodeExporter commented 9 years ago

Original comment by connor.tumbleson on 15 Nov 2012 at 3:14