2014-10-04 106 views
0

在插件POM,有如下定义的属性:如何覆盖pom的插件属性?

<project 
    ... 
    <properties> 
     <jruby.version>1.6.8</jruby.version> 
    </properties> 

我想覆盖在我的项目的POM,物业(定义为“1.7.0”)。

一些额外的信息,可能是有用的:

这可能吗?

谢谢。根据POM Reference, Plugins

回答

0

关于b):

<plugin> 
    ... 
    <executions> 
    <execution> 
     <id>...</id> 
     <goals> 
     <goal>...</goal> 
     </goals> 
     <phase>...</phase> 
     <configuration> 
     <properties> 
      <jruby.version>1.7.0</jruby.version> 
     </properties> 
     </configuration> 
    </execution> 
    </executions> 
    ... 
</plugin> 
+0

不,这是行不通的,因为我需要改写的属性是用户定义的属性([链接] http://books.sonatype.com /mvnref-book/reference/resource-filtering-sect-properties.html#resource-filtering-sect-user-defined),你建议的方法是为插件Mojo可能期望的属性(这些是getter和setter在Java Mojo bean) – Mariana 2014-10-06 16:03:52