build-helper-maven-plugin不添加源

时间:2016-03-28 08:10:31

标签: maven

我试图为wsdl架构生成对象,然后在我的项目中使用它们。

我可以看到.java文件在generate-sources文件夹中正确生成,但它们在我的项目中不被视为源。

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
    <version>0.12.3</version>
    <executions>
        <execution>
            <id>order-generate</id>
            <goals>
                <goal>generate</goal>
            </goals>
            <configuration>
                <schemaLanguage>WSDL</schemaLanguage>
                <generatePackage>orderService.wsdl</generatePackage>
                <generateDirectory>${project.build.directory}/generated-sources/orderService</generateDirectory>
                <schemas>
                    <schema>
                        <url>https://localhost/orderService_v2.1/AppOrderService?wsdl</url>
                    </schema>
                </schemas>
                <removeOldOutput>true</removeOldOutput>
            </configuration>
        </execution>
    </executions>
</plugin>
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>add-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>${project.build.directory}/generated-sources/orderService</source>
                </sources>
            </configuration>
        </execution>
    </executions>
</plugin>

0 个答案:

没有答案