English 中文(简体)
异构体外的工艺品
原标题:Specify artifact version outside of pom

是否有办法在POM档案之外具体说明手工版本?

我有2个开明艺术的 CI项目。 其中一个部门从发展部门建立“稳定”发展模式,另一个部门则形成不稳定的版本,这是将所有活跃的分支并入发展部门的结果。 我希望稳定版本能够建设成xyz-1.0.jar,一体化将建设成Xyz-1.0-SNAPSHOT。 jar。 如果在不手工修改人民党的情况下建造释放或shot状jar, CI的工作是否有办法执行清白的任务或通过指挥线具体说明? 目前,在om中,我有1.0版。 我考虑使用释放金,但我并不希望自动版本的编号增加和打字。

最佳回答

答案:无。 这里还有几点补充意见:

  • It doesn t make much sense to use a "released" version (i.e. non SNAPSHOT) for a branch under CI since released versions are not downloaded again even if a newer version is available.
  • Released versions should be tagged (e.g. 1.0), maintenance is done is in a branch derived from the tag (e.g. 1.0.1-SNAPSHOT).
  • If you want to distinguish versions built from different branches, use different versions in the POMs.
问题回答

我通过在我的人民党内使用财产,然后通过指挥线推翻财产,能够做到这一点。

pom.xml:

 ...
    <version>${artifactVersion}</version>
    <properties>
       <artifactVersion>1.0</artifactVersion>  <!-- default version -->
    </properties>
    ...

然后以<代码>mvn-DartifactVersion=1.0-SNAPSHOT为准。

但上述帕斯卡尔的答复更符合我真正要求的内容。 我的解决方法是我感到的更细致的工作。

您应当能够利用http://maven.apache.org/guides/introduction/introduction-to-profiles.html“rel=“nofollow noreferer”来做到这一点。





相关问题
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:...

热门标签