James Baxter
James Baxter

Reputation: 1246

Installing a wsdl file into a Maven repository

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?

Upvotes: 3

Views: 4873

Answers (1)

Raghuram
Raghuram

Reputation: 52665

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.

Upvotes: 3

Related Questions