maven修改webroot位置

    xiaoxiao2024-12-13  13

    <build> <finalName>AutoTest</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <archive> <addMavenDescriptor>false</addMavenDescriptor> </archive> <webappDirectory>${basedir}/WebRoot</webappDirectory> <warSourceDirectory>${basedir}/WebRoot</warSourceDirectory> <webXml>${basedir}/WebRoot/WEB-INF/web.xml</webXml> <ignoreWebxml>false</ignoreWebxml> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <!-- 拷贝依赖的jar包到lib目录 --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory> ${project.build.directory}/lib </outputDirectory> </configuration> </execution> </executions> </plugin> </plugins> <resources> <resource> <directory>src/main/java</directory> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>**</include> </includes> </resource> </resources> </build> <profiles> <profile> <id>command</id> <build> <directory>build</directory> </build> </profile> </profiles>

     

    最新回复(0)