标签:str nbsp index.jsp pom 手动 www. pac 命令 创建文件夹
<?xml version="1.0" encoding="UTF-8"?> <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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.wbg.test</groupId> <artifactId>maventest</artifactId> <version>1</version> <packaging>war</packaging> <build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <hostName>localhost</hostName> <port>8080</port> <path>/ccc</path> <uriEncoding>UTF-8</uriEncoding> </configuration> </plugin> </plugins> </build> </project>
4、在scr目录下面创建main文件夹,在main目录下面创建java文件夹,java放源码
public class start{ public static void main(String[]ager){ System.out.println("Hello Word"); } }
切换目录在pom.xml文件下面进行编译 mvn compile
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0"> </web-app>
标签:str nbsp index.jsp pom 手动 www. pac 命令 创建文件夹
原文地址:https://www.cnblogs.com/weibanggang/p/9768450.html