java - Maven/mvn warnings - It is highly recommended to fix these problems because they threaten the stability of your build -
this question not spring framework or j2ee such.
as per book, have spring project in eclipse-jee. tells me build project maven. new maven , don't know doing it.
so, used windows cmd project folder in eclipse , executed mvn package -dskiptests
. now, succeeds build success
message, gives me warnings given below.
please tell me why warnings occur , how can ignorning warnings hurt me in future ?
[info] scanning projects... [warning] [warning] problems encountered while building effective model com.perfmath.spring:soba:war:4 [warning] 'dependencies.dependency.(groupid:artifactid:type:classifier)' must unique: org.apache.httpcomponents:httpclient:jar -> version 4.1.2 vs 4.0.3 @ li ne 229, column 15 [warning] 'build.plugins.plugin.version' org.codehaus.mojo:tomcat-maven-plug in missing. @ line 46, column 12 [warning] [warning] highly recommended fix these problems because threaten t stability of build. [warning] [warning] reason, future maven versions might no longer support buildin g such malformed projects. [warning]
dependencies section of pom.xml -
<dependency> <groupid>log4j</groupid> <artifactid>log4j</artifactid> <version>1.2.14</version> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>servlet-api</artifactid> <version>2.5</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-beans</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-jdbc</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-web</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-webmvc</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-orm</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-oxm</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-tx</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.springframework.security</groupid> <artifactid>spring-security-web</artifactid> <version>${spring-security.version}</version> </dependency> <dependency> <groupid>org.springframework.security</groupid> <artifactid>spring-security-config</artifactid> <version>${spring-security.version}</version> </dependency> <dependency> <groupid>org.springframework.security</groupid> <artifactid>spring-security-taglibs</artifactid> <version>${spring-security.version}</version> </dependency> <dependency> <groupid>org.springframework.security</groupid> <artifactid>spring-security-acl</artifactid> <version>${spring-security.version}</version> </dependency> <dependency> <groupid>org.springframework.security</groupid> <artifactid>spring-security-core-tiger</artifactid> <version>2.0.7.release</version> </dependency> <dependency> <groupid>org.springframework.security</groupid> <artifactid>spring-security-crypto</artifactid> <version>${spring-security.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-mock</artifactid> <version>${spring-mock.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-test</artifactid> <version>${org.springframework.version}</version> </dependency> <!-- spring webflow --> <dependency> <groupid>commons-lang</groupid> <artifactid>commons-lang</artifactid> <version>2.3</version> </dependency> <dependency> <groupid>org.springframework.webflow</groupid> <artifactid>spring-binding</artifactid> <version>${spring.webflow.version}</version> </dependency> <dependency> <groupid>org.springframework.webflow</groupid> <artifactid>spring-js</artifactid> <version>${spring.webflow.version}</version> </dependency> <dependency> <groupid>org.springframework.webflow</groupid> <artifactid>spring-webflow</artifactid> <version>${spring.webflow.version}</version> </dependency> <dependency> <groupid>org.codehaus.jackson</groupid> <artifactid>jackson-mapper-asl</artifactid> <version>${jackson-mapper-asl.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupid>javax.xml.bind</groupid> <artifactid>jaxb-api</artifactid> <version>${jaxb-api.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupid>org.hibernate</groupid> <artifactid>hibernate-core</artifactid> <version>${hibenate.version}</version> </dependency> <dependency> <groupid>org.hibernate</groupid> <artifactid>hibernate-entitymanager</artifactid> <version>${hibenate.version}</version> </dependency> <dependency> <groupid>org.hibernate</groupid> <artifactid>hibernate-ehcache</artifactid> <version>${hibenate.version}</version> </dependency> <dependency> <groupid>org.hibernate</groupid> <artifactid>hibernate-validator</artifactid> <version>4.3.1.final</version> </dependency> <dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-log4j12</artifactid> <version>1.6.6</version> </dependency> <dependency> <groupid>taglibs</groupid> <artifactid>standard</artifactid> <version>1.1.2</version> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>jstl</artifactid> <version>1.1.2</version> </dependency> <dependency> <groupid>commons-dbcp</groupid> <artifactid>commons-dbcp</artifactid> <version>1.4</version> </dependency> <dependency> <groupid>commons-pool</groupid> <artifactid>commons-pool</artifactid> <version>20030825.183949</version> </dependency> <dependency> <groupid>org.apache.httpcomponents</groupid> <artifactid>httpclient</artifactid> <version>4.1.2</version> </dependency> <dependency> <groupid>org.apache.httpcomponents</groupid> <artifactid>httpclient</artifactid> <version>4.0.3</version> </dependency> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <version>4.9</version> </dependency> <dependency> <groupid>org.testng</groupid> <artifactid>testng</artifactid> <version>6.8</version> </dependency> <dependency> <groupid>org.easymock</groupid> <artifactid>easymock</artifactid> <version>3.1</version> </dependency> <dependency> <groupid>org.aspectj</groupid> <artifactid>aspectjrt</artifactid> <version>${aspectj.version}</version> </dependency> <dependency> <groupid>org.aspectj</groupid> <artifactid>aspectjweaver</artifactid> <version>${aspectj.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-context-support</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>net.sf.ehcache</groupid> <artifactid>ehcache</artifactid> <version>2.7.5</version> </dependency> <dependency> <groupid>commons-collections</groupid> <artifactid>commons-collections</artifactid> <version>3.2</version> </dependency> </dependencies>
open pom file. @ missing classes in error. find tags classes in pom file , read next steps.
you have 2 warnings. first warns you have same dependency declared twice, different versions. when using classes org.apache.httpcomponents:httpclient, how maven know want classes 4.1.2, or 4.0.3? delete dependency tag 1 of them.
the second warning says plugin org.codehaus.mojo:tomcat-maven-plugin declared without version. when declare dependency or plugin, should use version well, unless version inherited pluginmanagement or dependencymanagement section. fix problem, find plugin under <build><plugins>
, , explicitly set version use.
you can version number eclipse (if installed it) using - click window –> preferences –> maven –> installation . show installation window maven version.
Comments
Post a Comment