Installing a wsdl file into a Maven repository

耗尽温柔 提交于 2019-12-10 17:54:45

问题


I'm trying to install a wsdl file into a remote Maven repository so I can reference it in a CXF project as per this blog post.

I'm sure it could be done manually, but I want an actual maven project so I can make use of the release plugin for tagging etc.

Has anybody got experience with this?


回答1:


You can use the build helper maven plugin to do this. Here is an indicative code snippet

 <build>
 ...
     <plugins>
     ...
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>attach-artifacts</id>
                    <phase>package</phase>
                    <goals>
                        <goal>attach-artifact</goal>
                    </goals>
                    <configuration>
                        <artifacts>
                            <artifact>
                                <file>${wsdlLocation}/project.wsdl</file>
                                <type>wsdl</type>
                            </artifact>
                        </artifacts>
                   </configuration>
               </execution>
            </executions>
        </plugin>
    </plugins>
</build.


来源:https://stackoverflow.com/questions/4804580/installing-a-wsdl-file-into-a-maven-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!