我制作了一个maven插件,它使用以下表达式来查找目标文件夹。
它在maven 3.1.0上运行良好(本地)。它在我的jenkins构建服务器maven 3.0.4上失败了。
是否有任何表达式可以与两个maven版本兼容?
/**
* Location of the output directory.
*
* @parameter property="project.build.directory"
* @required
*/
@SuppressWarnings("UnusedDeclaration")
private File outputDirectory;
- 您尝试过正确的maven3.x注释吗
/**
* Location of the output directory.
*
* @required
**/
@Parameter( property = "project.build.directory")
private File outputDirectory;
发件人http://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html
- 还是效果更好
/**
* Location of the output directory.
*
* @parameter expression="${project.build.directory}"
*/
private File outputDirectory;