Reputation: 30097
I am trying to launch tomcat using following maven command
mvn tomcat7:run
But how do I tell maven that tomcat is located at D:\Tomcat\
pom.xml
<build>
<finalName>test</finalName>
<!-- MAVEN COMPILER PLUGIN -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<!-- MAVEN TOMCAT PLUGIN -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<url>http://localhost:8080/manager/text</url>
<server>tomcat-server</server>
<path>/${project.build.finalName}</path>
</configuration>
</plugin>
</plugins>
</build>
Upvotes: 0
Views: 274
Reputation: 21961
mvn tomcat7:run
is the command of tomcat7
maven plugin. To run it you don't need to tell external tomcat server. It automatically download the server from repository and run the project.
Upvotes: 4
Reputation: 821
tomcat7-maven-plugin
should automatically download Tomcat instance. So there is no reason to specify path to your local tomcat.
Upvotes: 0