aar文件未添加到war axis2-aar-maven-plugin中

时间:2013-02-04 14:55:32

标签: maven-2 axis2 maven-plugin

我正在尝试使用Axis2和Maven来关注一个示例Web服务,而aar文件正在生成,但是因为war文件首先生成,而aar文件是afterwordds。有人可以在这里提供一些帮助。

<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.prash</groupId>
<artifactId>test.webservice</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>test.webservice 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>javax.servlet.jsp</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.2.1-b03</version>
    </dependency>
    <dependency>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2</artifactId>
        <version>1.6.2</version>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-aar-maven-plugin</artifactId>
        <version>1.6.2</version>
        <type>maven-plugin</type>
    </dependency>
    <dependency>
        <groupId>axis2</groupId>
        <artifactId>axis2-xmlbeans</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-adb</artifactId>
        <version>1.6.2</version>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-aar-maven-plugin</artifactId>
            <version>1.6.2</version>
            <extensions>true</extensions>

            <configuration>
            <!--  Set true  if you want Depending Jar to be included into AAR file-->
            <includeDependencies>false</includeDependencies>
                <aarName>StockQuoteService</aarName>
                <outputDirectory>${basedir}/src/webapp/</outputDirectory>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>aar</goal>
                    </goals>
                </execution>

            </executions>
        </plugin>
    </plugins>
    <finalName>test.webservice</finalName>

</build>

1 个答案:

答案 0 :(得分:1)

问题已解决。我已经对pom.xml进行了以下更改

<plugins>
            <plugin>
                <groupId>org.apache.axis2</groupId>
                <artifactId>axis2-aar-maven-plugin</artifactId>
                <version>1.6.2</version>
                <extensions>true</extensions>
                <configuration>
                <!--  Set true  if you want Depending Jar to be included into AAR file-->
                <includeDependencies>false</includeDependencies>
                    <aarName>StockQuoteService</aarName>
                    <outputDirectory>${basedir}/target/test.webservice/WEB-INF/services</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>aar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>