Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 在pom.xml中获取tomcat安装路径_Maven_Pom.xml - Fatal编程技术网

Maven 在pom.xml中获取tomcat安装路径

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&

我想在pom.xml中获取系统中安装的apache tomcat的根目录

例如,我的tomcat安装在c:\apache-tomcat-6.0.32中

<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>