0

I have made a maven plugin that uses the following expression to find the target folder.

It runs fine (locally) on maven 3.1.0. It fails on my jenkins build server with maven 3.0.4.

Is there any expression that would be compatible with both maven versions?

/**
 * Location of the output directory.
 *
 * @parameter property="project.build.directory"
 * @required
 */
@SuppressWarnings("UnusedDeclaration")
private File outputDirectory;
4

1 回答 1

0
  1. Have you tried proper maven 3.x annotations ?
/**
 * Location of the output directory.
 *
 * @required
 **/
@Parameter( property = "project.build.directory")
private File outputDirectory;

From http://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html

  1. or does that work better ?
/** 
 * Location of the output directory.
 *
 * @parameter expression="${project.build.directory}"
 */
private File outputDirectory;
于 2013-08-15T22:25:07.387 回答