Maven 在pom.xml中获取tomcat安装路径
我想在pom.xml中获取系统中安装的apache tomcat的根目录 例如,我的tomcat安装在c:\apache-tomcat-6.0.32中Maven 在pom.xml中获取tomcat安装路径,maven,pom.xml,Maven,Pom.xml,我想在pom.xml中获取系统中安装的apache tomcat的根目录 例如,我的tomcat安装在c:\apache-tomcat-6.0.32中 <execution> <id>generate.bat</id> <phase>test</phase> <goals> <goal>exec</goal&
<execution>
<id>generate.bat</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>here i want to get tomcat director</executable>
<workingDirectory>here i want to get tomcat directory</workingDirectory>
</configuration>
</execution>
生成.bat
测试
执行官
这里我要找tomcat导演
在这里我想得到tomcat目录
Maven无法猜测Tomcat的安装位置。
但您可以使用属性来实现这一点
例如,您可以更改define${tomcat.dir}
<execution>
<id>generate.bat</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${tomcat.dir}</executable>
<workingDirectory>${tomcat.dir}</workingDirectory>
</configuration>
</execution>
Maven无法猜测Tomcat的安装位置。 但您可以使用属性来实现这一点 例如,您可以更改define
${tomcat.dir}
<execution>
<id>generate.bat</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${tomcat.dir}</executable>
<workingDirectory>${tomcat.dir}</workingDirectory>
</configuration>
</execution>