0

次の式を使用してターゲットフォルダーを見つけるmavenプラグインを作成しました。

Maven 3.1.0 では (ローカルで) 正常に動作します。maven 3.0.4 を使用している jenkins ビルド サーバーでは失敗します。

両方の Maven バージョンと互換性のある式はありますか?

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

1 に答える 1

0
  1. 適切な maven 3.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から

  1. またはそれはうまくいきますか?
/** 
 * Location of the output directory.
 *
 * @parameter expression="${project.build.directory}"
 */
private File outputDirectory;
于 2013-08-15T22:25:07.387 に答える