开普勒的Maven WebApp项目

时间:2014-11-26 14:18:59

标签: java eclipse maven

我按照大多数sties中提到的步骤来设置webapp maven项目。它创建的目录结构如下。

SampleWebApplication

|-- pom.xml
|-- src
    |-- main
    |   |-- resources
    |   |-- webapp
    |   |     |-- index.jsp
    |   |-- WEB-INF
    |   |     |-- web.xml

但是为什么没有创建java文件夹。我创建了一个java文件夹并输入了java代码,但根本没有编译问题。

请帮助您采取适当的措施。

我的Pom。

<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>org.hibernate.tutorials</groupId>
    <artifactId>hibernate-tutorial</artifactId>
    <packaging>war</packaging>
    <version>0.0.1-SNAPSHOT</version>
    <name>hibernate-tutorial Maven Webapp</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>3.3.2.GA</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
         <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.7</version>
        </dependency>

        <!-- Hibernate gives you a choice of bytecode providers between cglib and javassist -->
        <dependency>
            <groupId>javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.12.1.GA</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>hibernate-tutorial</finalName>
    </build>
</project>

0 个答案:

没有答案
相关问题