我开始学习包装几个发行版(目前Cygwin和Debian的)。
I start learning packaging for several distros (currently Cygwin and Debian).
他们的要求来构建系统,让外树构建(同义词外源构建)
They have requirement to build system to allow out-of-tree build (synonym out-of-source build):
wiki.debian/UpstreamGuide#Out-of-Tree_Builds
要与工作围绕哑巴打造系统为例 cygport 推荐使用 lndir (从 xutils 项目):
To work-around "dumb" build system for example cygport recommend use lndir (from xutils project):
lndir ${S} ${B} cd {B} ...build-commands...我读 MVN(1)手册页,但不会发现任何挪用。接下来,我只是尝试:
I read mvn(1) man page but doesn't found anything appropriated. Next I just try:
$ mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false ... $ pwd /maven/simple $ ls my-app $ mvn -f my-app/pom.xml compile ... [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ my-app --- [INFO] Compiling 1 source file to /maven/simple/my-app/target/classes正如你所看到的目标在源根目录层级中创建,而我寻找一个方法来避免这个目录。
As you can see target directory created in source root hierarchy while I look for a way to avoid this.
有可能的外树用Maven构建?怎么样?
Is it possible out-of-tree build with maven? And how?
推荐答案这可能是具有这样的简单
It might be as simple as having a
<build> <directory>/your/build/directory</directory> </build>在你的pom.xml。 /你/编译/目录不必在源树,并可以使用常用的参数化 $ {...} 语法。
in your pom.xml. /your/build/directory need not be in the source tree and can be parameterized using the usual ${...} syntax.
干杯,
更多推荐
外树使用Maven构建。是否可以?
发布评论