maven build android project: specify the location of aidl file -
my android project has aidl file, project structure below:
myproject/ src/ main/ com.my.aidl/ imyservice.aidl pom.xml
i building android project maven. pom uses dexguard-maven-plugin extension of android-maven-plugin.
in plugin configuration, explicitly specified directory of source aidl file & directory of generated java file.
<build> <plugins> <plugin> <groupid>com.saikoa.dexguard.maven</groupid> <artifactid>dexguard-maven-plugin</artifactid> <configuration> <aidlsourcedirectory> ${project.basedir}/src/main/com/my/aidl </aidlsourcedirectory> <gendirectoryaidl> ${project.build.directory}/generated-sources/aidl/main/com/my/aidl </gendirectoryaidl> </configuration> <extensions>true</extensions> </plugin> </plugins> </build>
but after run mvn clean install -e
got following error trace:
[error] failed execute goal com.saikoa.dexguard.maven:dexguard-maven-plugin:6.1.18:generate-sources (default-generate-sources) on project myproject: execution default-generate-sources of goal com.saikoa.dexguard.maven:dexguard-maven-plugin:6.1.18:generate-sources failed. nullpointerexception -> [help 1] org.apache.maven.lifecycle.lifecycleexecutionexception: failed execute goal com.saikoa.dexguard.maven:dexguard-maven-plugin:6.1.18:generate-sources (default-generate-sources) on project myproject: execution default-generate-sources of goal com.saikoa.dexguard.maven:dexguard-maven-plugin:6.1.18:generate-sources failed. @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:224) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:153) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:145) @ org.apache.maven.lifecycle.internal.lifecyclemodulebuilder.buildproject(lifecyclemodulebuilder.java:84) @ org.apache.maven.lifecycle.internal.lifecyclemodulebuilder.buildproject(lifecyclemodulebuilder.java:59) @ org.apache.maven.lifecycle.internal.lifecyclestarter.singlethreadedbuild(lifecyclestarter.java:183) @ org.apache.maven.lifecycle.internal.lifecyclestarter.execute(lifecyclestarter.java:161) @ org.apache.maven.defaultmaven.doexecute(defaultmaven.java:317) @ org.apache.maven.defaultmaven.execute(defaultmaven.java:152) @ org.apache.maven.cli.mavencli.execute(mavencli.java:555) @ org.apache.maven.cli.mavencli.domain(mavencli.java:214) @ org.apache.maven.cli.mavencli.main(mavencli.java:158) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.codehaus.plexus.classworlds.launcher.launcher.launchenhanced(launcher.java:289) @ org.codehaus.plexus.classworlds.launcher.launcher.launch(launcher.java:229) @ org.codehaus.plexus.classworlds.launcher.launcher.mainwithexitcode(launcher.java:415) @ org.codehaus.plexus.classworlds.launcher.launcher.main(launcher.java:356) caused by: org.apache.maven.plugin.pluginexecutionexception: execution default-generate-sources of goal com.saikoa.dexguard.maven:dexguard-maven-plugin:6.1.18:generate-sources failed. @ org.apache.maven.plugin.defaultbuildpluginmanager.executemojo(defaultbuildpluginmanager.java:115) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:208) ... 19 more caused by: java.lang.nullpointerexception @ java.io.file.<init>(file.java:334) @ com.jayway.maven.plugins.android.phase01generatesources.generatesourcesmojo.generateaidlfiles(generatesourcesmojo.java:1266) @ com.jayway.maven.plugins.android.phase01generatesources.generatesourcesmojo.execute(generatesourcesmojo.java:343) @ org.apache.maven.plugin.defaultbuildpluginmanager.executemojo(defaultbuildpluginmanager.java:106) ... 20 more [error] [error] re-run maven using -x switch enable full debug logging. [error]
what wrong?
had similar issue few months ago placing call related aidl
files incorrect location (i migrated form eclipse ant studio gradle).the link below helped in case:
how can add aidl file android studio (from in-app billing example)
and official document related that:
http://tools.android.com/tech-docs/new-build-system/user-guide#toc-project-structure
Comments
Post a Comment