This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I am using eclipse with maven plugin. When I do a jetty:run with maven inside eclipse for a project which has lot of dependencies, it is unable to find the dependencies in the maven repository even though it is all there. I am kind of lost as to why this would be happening since I made sure it is in the java build path of the project. If someone has any ideas, please let me know. Thanks!
Have you tried running your build from Maven on the command line as opposed to running from within eclipse?
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Sep 24, 2004
Thanks for your reply Nate. I tried running Maven from command prompt. I get the same errors. It is worth mentioning that initially, it said it was missing the settings.xml in my "documents and settings/.m2" folder when I ran it in eclipse. So, I went ahead and manually copied settings.xml into "documents and settings/.m2" from my "maven/conf" folder. It did not give me that error anymore. But, I am now stuck at a point where I don't know how to fix it having tried everything possible. Also, here is what I get from maven console in eclipse:
I ran it with -e option to get the stacktrace. Here are a few of the errors I get along with the stacktrace:
C:\Dev\ht\src\com\ben\ht\security\AuthenticationProcessing.java:[20,24] cannot find symbol symbol : variable super location: class com.ben.ht.security.AuthenticationProcessing
C:\Dev\ht\src\com\ben\ht\security\AuthenticationProcessing.java:[23,12] cannot find symbol symbol : variable StringUtils location: class com.ben.ht.security.AuthenticationProcessing
C:\Dev\ht\src\com\ben\ht\security\AuthenticationProcessing.java:[18,5] method does not override a method from its superclass
Error stacktrace: org.apache.maven.ProjectBuildFailureException: Build for project: com.ben.ht:war:1.0 failed during execution of mojo: org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:293) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149) at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223) at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1) at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:903) at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176) at org.apache.maven.cli.MavenCli.main(MavenCli.java:63) at org.apache.maven.cli.MavenCli.main(MavenCli.java:52) Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516) at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:577) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265) ... 11 more
Please let me know if you have any suggestions. Thanks again for your help.
OK - the error occurring on the command line has ruled out eclipse or the eclipse-maven plugin being the culprit. All of the errors posted look like they are compilation errors - probably caused by the maven build not finding the library your project depends on (because they all refer to not finding a superclass). Can you post the error message (if any) of maven not being able to find the library you depend on? And the dependency section where you're defining the dependency in your project?