maven中遇到的一个问题

    今天项目中我将所有的项目删除之后,重新checkout之后,使用maven编译成功,但是源代码一致有错,可能是java JDK 采用的版本和应用版本不一致造成,检查JDK版本和应用版本一致,仔细检查之后,

很郁闷,使用检查maven的各种参数:

1.环境变量的的设置没有问题: mvn -v 可以查看

2. 在myeclpse 中的 maven4Myeclipse 中设置 User Setting file 为项目中maven使用的全局settings.xml文件。

User settings File :C:\Documents and Settings\Administrator\.m2\settings.xml

Local Repository :C:\Documents and Settings\Administrator\.m2\repository

 

3.在Build path中设置classpath Variables中M2_REPO变量值为settings.xml的目录路径即可:

M2_REPO=C:\Documents and Settings\Administrator\.m2\repository //项目中需要使用M2_REPO应用jar路径。

 

发现M2_REPO将的设置参数丢失,总算问题 解决

 

 

 

 

 

		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
			<version>${cxf.version}</version>
			<exclusions>
				<!-- see above -->
				<exclusion>
					<groupId>org.apache.geronimo.specs</groupId>
					<artifactId>geronimo-javamail_1.4_spec</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.geronimo.specs</groupId>
					<artifactId>geronimo-activation_1.1_spec</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<!-- webservice end -->

		<!-- rest begin -->
  <!---->

		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-server</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-client</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-json</artifactId>
			<version>${jersey.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.codehaus.jettison</groupId>
					<artifactId>jettison</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey.contribs</groupId>
			<artifactId>jersey-spring</artifactId>
			<version>${jersey.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework</groupId>
					<artifactId>spring</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.sun.jersey</groupId>
					<artifactId>jersey-grizzly2</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey.contribs</groupId>
			<artifactId>jersey-multipart</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<!-- rest end -->

		<!-- security begin -->
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-core</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-spring</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-web</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<!-- security end -->

		<!-- jms begin -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jms</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-core</artifactId>
			<version>${activemq.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.apache.activemq.protobuf</groupId>
					<artifactId>activemq-protobuf</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.springframework.osgi</groupId>
					<artifactId>spring-osgi-core</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.osgi</groupId>
					<artifactId>org.osgi.core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- jms end -->

		<!-- quartz -->
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
			<version>1.8.5</version>
		</dependency>

		<!-- memcached begin -->
		<dependency>
			<groupId>spy</groupId>
			<artifactId>spymemcached</artifactId>
			<version>2.6</version>
		</dependency>

		<dependency>
			<groupId>com.thimbleware.jmemcached</groupId>
			<artifactId>jmemcached-core</artifactId>
			<version>1.0.0</version>
		</dependency>
		<!-- memcached end -->












 

你可能感兴趣的:(jdk,maven,C++,c,xml)