This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Need help building my first maven project in Eclipse  RSS feed

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded a tutorial (http://blog.springsource.com/2010/01/25/ajax-simplifications-in-spring-3-0/) using SVN within Eclipse and I don't know what to do next.

1) I right-clicked on the pom.xml and selected Maven build.... I got BUILD SUCCESS

2) Next, I assumed that I select Maven Install but I received an error:


[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvc-ajax 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ org.springframework.samples.mvc.ajax ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ org.springframework.samples.mvc.ajax ---
[INFO] Compiling 9 source files to /root/workspace/Eclipse/mvc-ajax/trunk/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.4.1:testResources (default-testResources) @ org.springframework.samples.mvc.ajax ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ org.springframework.samples.mvc.ajax ---
[INFO] Compiling 1 source file to /root/workspace/Eclipse/mvc-ajax/trunk/target/test-classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.633s
[INFO] Finished at: Mon Mar 29 09:52:14 CDT 2010
[INFO] Final Memory: 3M/9M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:testCompile (default-testCompile) on project org.springframework.samples.mvc.ajax: Compilation failure
/root/workspace/Eclipse/mvc-ajax/trunk/src/test/java/org/springframework/samples/mvc/ajax/account/AccountJsonBindingTests.java:[101,31] cannot find symbol
symbol : constructor String(byte[],java.nio.charset.Charset)
location: class java.lang.String
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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

I'm new to using SVN within Eclipse and new with Maven, I usually have used Ant. Anyway, I don't know what the errors mean. It sounds like I may be missing a plugin or perhaps a dependency.Can someone help me determine what to do?

Thanks.


 
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like the pom.xml is missing a dependency required to compile the unit tests. you should ask Kieth Donald (the blogger) why his pom.xml is incomplete (the blog does allow comments and questions).
 
laura mccord
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought maybe it was due to my lack of Maven/Eclipse knowledge and something easy that I overlooked through Eclipse. I'll post a comment on his blog.

Thanks.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Laura,

you have to use Java 1.6 to accept the String constructor used in that sample application, not a matter of Maven.
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fabrizio, welcome to Java Ranch!

And thank you for the input!
 
Fabrizio Cappelletti
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter!

Sorry, in my hurry to reply I forgot the well-manners: I'm an IT consultant working in Milan, Italy, and I love Java
I have appreciated the competence and kindness of JavaRanch people in the past: I'll try to give them back as far as I can

And... Well... Here I am!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!