Hi
I am new to this maven, in my project we are using tomcat 6.0 and maven 2.0.8, I written the following code. I have facing problem for start / stop the server with the pom build script, I don't this is the correct code; I followed in cargo sample code. But it is not working, 1) What maven commands I need use for starts / stop server? 2) Is this code correct or not? 3) Is there any diff code for start / stop the server? 4) How to give (tomcat\webapp folder) target folder for war? <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.attainware.maven2example</groupId> <artifactId>maven2example_webapp</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>maven2example_webapp Maven Webapp</name> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> </dependencies> <build> <directory>target</directory> <outputDirectory>target/classes</outputDirectory> <finalName>${project.artifactId}-${project.version}</finalName> <sourceDirectory>${basedir}/src/main/java</sourceDirectory> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> <resource> <targetPath> com/accenture/demonstrator/multilingual </targetPath> <directory> ${basedir}/src/main/java/com/accenture/demonstrator/multilingual </directory> </resource> </resources> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.1</version> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-2</version> </plugin> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>2.2</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <artifactId>maven-dependency-plugin</artifactId> <version>2.0</version> </plugin> <plugin> <artifactId>maven-deploy-plugin</artifactId> <version>2.3</version> </plugin> <plugin> <artifactId>maven-plugin-plugin</artifactId> <version>2.3</version> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.2</version> </plugin> <plugin> <artifactId>maven-site-plugin</artifactId> <version>2.0-beta-6</version> </plugin> <plugin> <artifactId>maven-source-plugin</artifactId> <version>2.0.4</version> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.1-alpha-1</version> </plugin> <plugin> <inherited>true</inherited> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <configuration> <updateReleaseInfo>true</updateReleaseInfo> </configuration> </plugin> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <configuration> <container> <containerId>tomcat6.0</containerId> <type>existing</type> </container> </configuration> </plugin> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <executions> <execution> <goals> <goal>start</goal> </goals> <configuration> <wait>true</wait> <container> <containerId>tomcat6.0</containerId> <type>existing</type> <home>C:\apache-tomcat-6.0.14</home> <output> C:\apache-tomcat-6.0.14 </output> </container> <deployables> <deployable> <location> $\{project.build.directory\}/$\{project.build.finalName\}.$\{project.pac kaging\} </location> <pingURL> http://localhost:8080/${pom.artifactId}/index.html </pingURL> </deployable> </deployables> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> Thanks & Regards, Sridhar Thota,
