I am using eclipse to try to run a simple project here. When I typed contents in eclipse, it says: The type javax.validation.Payload cannot be resolved. It is indirectly referenced from required .class files. In the example shown there, he used maven and in my practice I haven't.
I also have maven plugin in eclipse m2e-wtp latest and kepler version of eclipse. I tried many websites, such as this one. Here he used command window and used some commands, but when I tried in my pc, it didn't work. I think maven needs to set in my environment variable. That means I have to install maven in my c:/programfiles or any.
Is there a way to run the commands in eclipse(naive)? can some one give me a link to build sample maven project using m2e eclipse?
I downloaded the application, and it ran fine on my computer. All I did was unzip and type:
mvn clean tomcat:run-war
I think you might be missing a transitive dependency (which Maven will automatically download), ensure you have all of these on your eclipse classpath:
$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SpringMVC Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ SpringMVC ---
[INFO] com.mkyong.common:SpringMVC:war:1.0-SNAPSHOT
[INFO] +- org.springframework:spring-core:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- org.springframework:spring-web:jar:3.0.5.RELEASE:compile
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework:spring-beans:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-context:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-context-support:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:3.0.5.RELEASE:compile
[INFO] \- org.hibernate:hibernate-validator:jar:4.2.0.Final:compile
[INFO] +- javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO] \- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.132s
[INFO] Finished at: Wed Sep 04 22:07:24 CDT 2013
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
My guess is this jar:
javax.validation:validation-api:jar:1.0.0.GA:compile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With