マルチモジュールプロジェクトがあります。子の内部では、いくつかの複雑なことを行う必要があります (アプリケーション サーバーへのデプロイとの統合テストなど)。したがって、統合テストの子があり、このモジュールから他のモジュールに到達するには、親のルートが必要です。「..」は使いたくない。integrationtest POM には次のプロパティがあります。
<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
...
</properties>
また、次の内容の antrun プラグインがあります。
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>render-parameter-sql</id>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echoproperties/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
出力では、main.basedir は解決されていません。
main:
[echoproperties] #Ant properties
[echoproperties] #Thu Oct 28 09:32:13 CEST 2010
[echoproperties] ant.core.lib=C\:\\Users\\gaborl\\.m2\\repository\\org\\apache\\ant\\ant\\1.8.1\\ant-1.8.1.jar
...
[echoproperties] main.basedir=${project.parent.basedir}
[echoproperties] maven.dependency.antlr.antlr.jar.path=C\:\\Users\\gaborl\\.m2\\repository\\antlr\\antlr\\2.7.6\\antlr-2.7.6.jar
本当に腹が立ったので、これを回避する方法をあなたに尋ねることにしました...