mikegeorge (1) [Avatar] Offline
#1
Hi,

I was able to compile and run this sample using ant, but while trying to compile using Maven, getting following error:

D:mikecommikegeorgeooksAspectJ_in_Action_2nd_EdSection2.2.3InterTypeDeclaration>mvn -e clean compile exec:java
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.mikegeorge:Section2.2.3InterTypeDeclaration:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:exec-maven-plugin is missing. @ line 59, column 12
[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 Section2.2.3InterTypeDeclaration 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ Section2.2.3InterTypeDeclaration ---
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ Section2.2.3InterTypeDeclaration ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:mikecommikegeorgeooksAspectJ_in_Action_2nd_EdSection2.2.3InterTypeDeclarationsrcmain esources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ Section2.2.3InterTypeDeclaration ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 2 source files to D:mikecommikegeorgeooksAspectJ_in_Action_2nd_EdSection2.2.3InterTypeDeclaration argetclasses
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] mikecommikegeorgeooksAspectJ_in_Action_2nd_EdSection2.2.3InterTypeDeclarationsrcmainjavaajiamainMain.java:[28,25] cannot find symbol
symbol : method getLastAccessedTime()
location: class ajia.messaging.MessageCommunicator
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.580s
[INFO] Finished at: Thu Jan 12 11:36:07 IST 2012
[INFO] Final Memory: 6M/89M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project Section2.2.3InterTypeDeclaration: Compilatio
n failure
[ERROR] mikecommikegeorgeooksAspectJ_in_Action_2nd_EdSection2.2.3InterTypeDeclarationsrcmainjavaajiamainMain.java:[28,25] cannot find symbol
[ERROR] symbol : method getLastAccessedTime()
[ERROR] location: class ajia.messaging.MessageCommunicator
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on proj
ect Section2.2.3InterTypeDeclaration: Compilation failure
mikecommikegeorgeooksAspectJ_in_Action_2nd_EdSection2.2.3InterTypeDeclarationsrcmainjavaajiamainMain.java:[28,25] cannot find symbol
symbol : method getLastAccessedTime()
location: class ajia.messaging.MessageCommunicator

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.CompilationFailureException: Compilation failure
mikecommikegeorgeooksAspectJ_in_Action_2nd_EdSection2.2.3InterTypeDeclarationsrcmainjavaajiamainMain.java:[28,25] cannot find symbol
symbol : method getLastAccessedTime()
location: class ajia.messaging.MessageCommunicator

at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:12smilie
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 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
D:mikecommikegeorgeooksAspectJ_in_Action_2nd_EdSection2.2.3InterTypeDeclaration>

Any hints to resolve this is appreciated.

Reg

MG
yongv0dwoh (1) [Avatar] Offline
#2
Re: Section2.2.3InterTypeDeclaration Maven Compile Fails
<h1 style="position: absolute; top: -3107px;">

question

</h1>
Anybody have answer?