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

标签 maven-2 apache-axis maven-plugin

我正在尝试使用 Axis2 和 Maven 来处理示例 Web 服务,同时 aar 文件正在生成,但在 aar 中,因为首先生成 war 文件,然后生成 aar 文件。有人可以在这里提供一些帮助吗?

<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>

最佳答案

问题已解决。我对 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>

关于maven-2 - aar 文件未添加到 war axis2-aar-maven-plugin 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14689333/

相关文章:

java - one-jar 删除有关应用程序加载的详细警告信息

java - 集成 Maven 报告插件

java - 解决 Maven 多模块项目的依赖项时出错

android - Web 服务和 Android 的架构

json - 如何在 maven 的 POM 中更改由 jsonschema2pojo 生成的默认 OutputSchema.java 类名

maven-2 - 查找 maven 用于运行 testng 测试用例的类路径

java - 从简单的 java 客户端调用 Web 服务

java - Axis2 生成的服务创建错误的请求

maven - Mantis 集成到 Maven

java - maven插件配置继承(嵌套元素的合并策略)