maven in action(九) myeclipse maven项目svn管理

项目搭建完毕后,还有一个关键是怎样提交maven代码到svn,团队中的其他人怎样根据svn地址下载maven源码,并生成maven项目?

maven提交到svn

提交svn,主要是提交源代码,提交src/main/java 文件夹下的源代码,提交资源文件src/main/resources,提交pom.xml文件; 如有需要把测试代码一起提交,其他的就不需要提交。

从myeclipse导入svn 

用myeclipse导入 --选择从svn导入--选择svn地址后,检出为--作为工作空间中的项目检出--修改项目名称,之后下载下来的是源代码和文件。找到项目的位置,修改project 文件中maven项目的相关属性 , 然后再F5刷新我们的项目, 这样就可以运行啦。修改的.project 文件代码如下 :

<buildSpec>
		<buildCommand>
			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
			<triggers>full,incremental,</triggers>
			<arguments>
				<dictionary>
					<key>LaunchConfigHandle</key>
					<value><project>/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator (2).launch</value>
				</dictionary>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.wst.common.project.facet.core.builder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.wst.validation.validationbuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.m2e.core.maven2Builder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.m2e.core.maven2Nature</nature>
		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
	</natures>

这样就可以提交svn和下载svn代码,并在本地上运行和测试maven项目了。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值