Bereitstellung von Projekt -, erstellt mit Eclipse und Maven, Tomcat

Ich bin mit Eclipse 3.5, Maven 2, m2eclipse und Tomcat 6. Also ich erstelle Maven-Projekt für archetype-webapp.
Dies ist pom.xml:

<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.itransition</groupId>
    <artifactId>hello</artifactId>
    <packaging>war</packaging>
    <version>0.0.1-SNAPSHOT</version>
    <name>hello Maven Webapp</name> 
    <url>http://maven.apache.org</url>

    <!-- tools.jar dependency -->    
    <profiles>
        <profile>
            <id>default-tools.jar</id>
            <activation>
                <property>
                    <name>java.vendor</name>
                    <value>Sun Microsystems Inc.</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.sun</groupId>
                    <artifactId>tools</artifactId>
                    <version>1.5.0</version>
                    <scope>system</scope>
                    <systemPath>${java.home}/../lib/tools.jar</systemPath>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
            <version>2.1.8.1</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>hello</finalName>
    </build>
</project>

So, dann möchte ich für die Bereitstellung der web-Anwendung auf Tomcat. Was muss ich tun? Maven installieren helfen nicht. Aber wenn ich den Krieg von Maven installieren, kann ich es importieren zu eclipse und bereitstellen von Tomcat "Hinzufügen" und " entfernen..." im popup-server.

  • BTW, was zum Teufel ist das default-tools.jar Profil?!
InformationsquelleAutor user348267 | 2010-05-23
Schreibe einen Kommentar