点火位置编译错误

时间:2012-11-08 04:31:48

标签: android maven aspectj

我在编译适用于Android的Ignition库的最新版本时遇到问题。在我更新到最新版本的库之前,一切都很好。

[INFO] Reactor Summary:
[INFO] 
[INFO] ignition .......................................... SUCCESS [0.125s]
[INFO] ignition-support-project .......................... SUCCESS [0.000s]
[INFO] ignition-support .................................. SUCCESS [1.529s]
[INFO] ignition-core-project ............................. SUCCESS [0.047s]
[INFO] ignition-core ..................................... SUCCESS [1.232s]
[INFO] ignition-support-samples .......................... SUCCESS [4.025s]
[INFO] ignition-core-samples ............................. SUCCESS [4.072s]
[INFO] ignition-core-tests ............................... SUCCESS [0.000s]
[INFO] remote-image-view-test ............................ SUCCESS [2.511s]
[INFO] ignition-location-project ......................... SUCCESS [0.000s]
[INFO] ignition-location ................................. FAILURE [1.201s]
[INFO] ignition-location-samples ......................... SKIPPED
[INFO] ignition-location-tests ........................... SKIPPED

我对AOP编程相当新,我似乎无法找到编译错误的确切原因。我已将mvn clean install的所有详细输出传送到日志文件,这里是相关部分。

    [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.4:compile (default) on project ignition-location: Compiler errors:
[ERROR] error at ignitedLastKnownLocationTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Boolean[0]);
[ERROR] ^^^^^^^^^^^^^^^^^
[ERROR] C:\Users\Zia3\git-workspace\ignition\ignition-location\ignition-location-lib\src\com\github\ignition\location\IgnitedLocationManager.aj:195:0::0 AsyncTask.THREAD_POOL_EXECUTOR cannot be resolved
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.4:compile (default) on project ignition-location: Compiler errors:
error at ignitedLastKnownLocationTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Boolean[0]);
                                               ^^^^^^^^^^^^^^^^^
C:\Users\Zia3\git-workspace\ignition\ignition-location\ignition-location-lib\src\com\github\ignition\location\IgnitedLocationManager.aj:195:0::0 AsyncTask.THREAD_POOL_EXECUTOR cannot be resolved

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    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:320)
    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:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    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.codehaus.mojo.aspectj.CompilationFailedException: Compiler errors:
error at ignitedLastKnownLocationTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Boolean[0]);
                                               ^^^^^^^^^^^^^^^^^
C:\Users\Zia3\git-workspace\ignition\ignition-location\ignition-location-lib\src\com\github\ignition\location\IgnitedLocationManager.aj:195:0::0 AsyncTask.THREAD_POOL_EXECUTOR cannot be resolved

    at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:411)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more

它抱怨AsyncTask.THREAD_POOL_EXECUTOR这是此版本中添加的新代码。当我评论这一行时,所有似乎都编译并且所有测试都通过。

我试过更改android api级别,android版本,android api修订版,android插件版本和map api版本。

我的开发环境设置是:

Apache Maven 3.0.4 (r1232337; 2012-01-17 19:44:56+1100)
Maven home: C:\Development\apache-maven-3.0.4
Java version: 1.7.0_09, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_09\jre
Default locale: en_AU, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:\Development\apache-maven-3.0.4\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\Zia3\.m2\settings.xml
[DEBUG] Using local repository at C:\Users\Zia3\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\Users\Zia3\.m2\repository

我已经从命令提示符安装并运行了maven {。}}。

我该如何解决这个问题?

0 个答案:

没有答案