Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

mvn install fail #465

Closed
soswow opened this issue May 26, 2013 · 7 comments
Closed

mvn install fail #465

soswow opened this issue May 26, 2013 · 7 comments

Comments

@soswow
Copy link

soswow commented May 26, 2013

library soswow$ mvn install -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HoloEverywhere Library 1.6.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ library ---
[INFO]
[INFO] --- resbuilder:2.1.0:build (default) @ library ---
[INFO] Process file: /Users/soswow/Work/HoloEverywhere/library/resbuilder/strings.json
[INFO] Handle all file by key 'strings' (force)
[INFO]  # Handle key 'strings' to processer 'Strings'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.633s
[INFO] Finished at: Sun May 26 14:18:33 EEST 2013
[INFO] Final Memory: 8M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.holoeverywhere:resbuilder:2.1.0:build (default) on project library: Error in FileProcesser: java.lang.NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.holoeverywhere:resbuilder:2.1.0:build (default) on project library: Error in FileProcesser
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: Error in FileProcesser
    at org.holoeverywhere.resbuilder.BuildMojo.execute(BuildMojo.java:102)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: org.holoeverywhere.resbuilder.type.FileProcesser$FileProcesserException: java.lang.NullPointerException
    at org.holoeverywhere.resbuilder.type.FileProcesser.process(FileProcesser.java:238)
    at org.holoeverywhere.resbuilder.type.FileProcesser.process(FileProcesser.java:254)
    at org.holoeverywhere.resbuilder.type.FileProcesser.process(FileProcesser.java:197)
    at org.holoeverywhere.resbuilder.type.FileProcesser.process(FileProcesser.java:165)
    at org.holoeverywhere.resbuilder.BuildMojo.execute(BuildMojo.java:100)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.holoeverywhere.resbuilder.type.strings.Grabber.fillFileMap(Grabber.java:34)
    at org.holoeverywhere.resbuilder.type.strings.Grabber.<init>(Grabber.java:30)
    at org.holoeverywhere.resbuilder.type.strings.Grabber.grabber(Grabber.java:19)
    at org.holoeverywhere.resbuilder.type.strings.TypeStrings.process(TypeStrings.java:89)
    at org.holoeverywhere.resbuilder.type.strings.TypeStrings.process(TypeStrings.java:21)
    at org.holoeverywhere.resbuilder.type.FileProcesser.process(FileProcesser.java:271)
    at org.holoeverywhere.resbuilder.type.FileProcesser.process(FileProcesser.java:218)
    ... 25 more
[ERROR]
[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/MojoFailureException
@Prototik
Copy link
Owner

Make sure that env variable ANDROID_HOME correctly setted and androidSdkPath/platforms/android-16/data/res folder exists.

@soswow
Copy link
Author

soswow commented May 26, 2013

How could I know I need android-16?
Anyway, I have ANDROID_HOME, I have android-16 now, and I do have aapt in PATH (but it is 17.0.0 version)

mvn install -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HoloEverywhere Library 1.6.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ library ---
[INFO]
[INFO] --- resbuilder:2.1.0:build (default) @ library ---
[INFO] Process file: /Users/soswow/Work/HoloEverywhere/library/resbuilder/strings.json
[INFO] Handle all file by key 'strings' (force)
[INFO]  # Handle key 'strings' to processer 'Strings'
[INFO] Process file: /Users/soswow/Work/HoloEverywhere/library/resbuilder/styles.json
[INFO] Handle all file by key 'styles' (force)
[INFO]  # Handle key 'styles' to processer 'Styles'
[INFO] Process file: /Users/soswow/Work/HoloEverywhere/library/resbuilder/themes-core.json
[INFO] Handle all file by key 'styles' (force)
[INFO]  # Handle key 'styles' to processer 'Styles'
[INFO] Process file: /Users/soswow/Work/HoloEverywhere/library/resbuilder/themes-v7.json
[INFO] Handle all file by key 'styles' (force)
[INFO]  # Handle key 'styles' to processer 'Styles'
[INFO] Process file: /Users/soswow/Work/HoloEverywhere/library/resbuilder/themes-v11.json
[INFO] Handle all file by key 'styles' (force)
[INFO]  # Handle key 'styles' to processer 'Styles'
[INFO] Process file: /Users/soswow/Work/HoloEverywhere/library/resbuilder/themes-large.json
[INFO] Handle all file by key 'styles' (force)
[INFO]  # Handle key 'styles' to processer 'Styles'
[INFO] Process file: /Users/soswow/Work/HoloEverywhere/library/resbuilder/dialogs.json
[INFO] Handle all file by key 'styles' (force)
[INFO]  # Handle key 'styles' to processer 'Styles'
[INFO] Process file: /Users/soswow/Work/HoloEverywhere/library/resbuilder/text.json
[INFO] Handle all file by key 'styles' (force)
[INFO]  # Handle key 'styles' to processer 'Styles'
[INFO] Process file: /Users/soswow/Work/HoloEverywhere/library/resbuilder/attrs.json
[INFO] Handle all file by key 'attrs' (force)
[INFO]  # Handle key 'attrs' to processer 'Attrs'
[INFO]
[INFO] --- android-maven-plugin:3.5.3:generate-sources (default-generate-sources) @ library ---
[DEBUG] Expanding: /Users/soswow/.m2/repository/com/actionbarsherlock/actionbarsherlock/4.3.1/actionbarsherlock-4.3.1.apklib into /Users/soswow/Work/HoloEverywhere/library/target/unpack/apklibs/com.actionbarsherlock_actionbarsherlock_apklib_4.3.1
[DEBUG] expand complete
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] Manifest merging disabled. Using project manifest only
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.777s
[INFO] Finished at: Sun May 26 14:40:16 EEST 2013
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:generate-sources (default-generate-sources) on project library: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:generate-sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:generate-sources (default-generate-sources) on project library: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:generate-sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:generate-sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME.
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: com.jayway.maven.plugins.android.InvalidSdkException: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME.
    at com.jayway.maven.plugins.android.AndroidSdk.getPathForTool(AndroidSdk.java:196)
    at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:471)
    at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.execute(GenerateSourcesMojo.java:193)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    ... 20 more
[ERROR]
[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/PluginExecutionException

@Prototik
Copy link
Owner

Just android-maven-plugin 3.5.3 yet not compatible with /pure/ android sdk r22.
Fallback solution:

ln -s ${ANDROID_HOME}/build-tools/17.0.0/aapt ${ANDROID_HOME}/platform-tools
ln -s ${ANDROID_HOME}/build-tools/17.0.0/lib/dx.jar ${ANDROID_HOME}/tools/lib

@soswow
Copy link
Author

soswow commented May 26, 2013

Should I take also ${ANDROID_HOME}/build-tools/17.0.0/ from PATH?

@Prototik
Copy link
Owner

No, android-maven-plugin search aapt and dx.jar only by ${ANDROID_HOME}/tools path.
Just once run this commands from terminal.

@Prototik
Copy link
Owner

Or... stop. Was released 3.6.0 version of plugin, one moment...

@soswow
Copy link
Author

soswow commented May 26, 2013

It helped anyway. I have .apklib and .jar now.
Now what? I include jar and library's /res/ folder to my project and good to go?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants