maven中添加war包依赖

maven中添加war包依赖

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.appfuse.plugins</groupId>
                    <artifactId>maven-warpath-plugin</artifactId>
                    <version>2.2.2-SNAPSHOT</version>
                </plugin>
            </plugins>
        </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
           <groupId>org.appfuse</groupId>
                <artifactId>maven-warpath-plugin</artifactId>
                <version>2.0.2</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>add-classes</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

通常会再添加以下配置将war包中的lib包过滤掉:

                        <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<dependentWarExcludes>WEB-INF/lib/*</dependentWarExcludes>
				</configuration>
			</plugin>

添加war包依赖

       <dependency>
            <groupId>cn.kingsoft</groupId>
            <artifactId>game-web</artifactId>
            <version>1.0</version>
            <type>warpath</type>
        </dependency>
发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /opt/wordpress/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048