English 中文(简体)
继承Maven财产
原标题:Ant inheriting Maven properties
  • 时间:2010-10-01 13:17:53
  •  标签:
  • maven-2
  • ant

我正在考虑将Ant/Ivy项目改为Ant/Maven-Ant-Tasks。 我不希望自己使用Maven,因为我需要更多地控制建筑过程。

是否有办法继承载于pom.xml档案中的财产?

我一直在创建通用建筑目录,可用于几个项目,并装载一个具体项目。 财产档案,但如果我能把所有这些财产都列入om。

感谢。

最佳回答

我利用XMLProperty的ant子 task平和复制这些财产

rel=“noreferer” http://ant.apache.org/manual/Tasks/xmlproperty.html

<xmlproperty file="<your pom location>" keepRoot="false"/>
<property name="test"   value="${properties.test}"/>

另一种选择是,如果你利用Maven Antrun lugin经营该建筑,则该不动产将可在建筑档案中使用。

rel=“noreferer”>http://maven.apache.org/plugins/maven-antrun-plugin/usage.html

问题回答

暂无回答




相关问题
Derby gets stuck closing?

I ve got unit tests (in maven) that use derby. At the end of the test run, there is a very long pause, with these log messages before the pause. INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:...

Execute goal on parent after children complete

I have a multi-module maven project (several levels of nesting). Normally, when I execute a maven build (like mvn install or whatever), maven will run all the goals for the parent project before ...

Including dependencies in a jar with Maven

Is there a way to force maven(2.0.9) to include all the dependencies in a single jar file? I have a project the builds into a single jar file. I want the classes from dependencies to be copied into ...

Java Equivalent of distcc

Distcc makes it easy to distribute a C or C++ compile job across a number of machines, and is a godsend for working with large, frequently-built codebases. An increasing number of our large projects ...

Maven Assembly Problem

I have a maven multiple-module project, which is giving me headaches in the assembly:assembly phase. I have a module which has an assembly defined in it which works fine when I invoke mvn assembly:...

热门标签