Someones are saying that Maven is hard to domesticate… That’s true but when you you become Maven aware it really facilitate the developer’s life. More posts will come later on Maven… For now just an answer to guys who are always asking me (and others):
“Hey! Which module include this dependency? I need to update the version but I can not find where it is defined?!”
(Dédicace à Nico Jr
)
mvn dependency:tree
This plugin will give you the complete dependency tree of the current module. Thanks Maven!
maven
maven, tip
This is quite the same thing than the previous post where I introduced how to expose JAXWS service in PEtALS ESB with Maven. This time, let’s proxify a Web service in PEtALS with Maven.
Here is the Maven descriptor snippet :
<build>
<plugins>
<plugin>
<groupId>org.ow2.petals</groupId>
<artifactId>maven-petals-wsproxy</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<id>generate-jbi</id>
<phase>package</phase>
<configuration>
<wsdl>
http://localhost:8080/Service?wsdl
</wsdl>
</configuration>
<goals>
<goal>wsproxy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
This will generate a JBI Service Assembly that you can then deploy intoo PEtALS to proxify the service defined in http://localhost:8080/Service?wsdl
You can give it a try, the snapshot version is available on the OW2 Maven repository…
PEtALS
maven, PEtALS, WebService
Since I am always using command line tools such as Maven or Ant to create my project and to package them, I have just created a new Maven plugin to easily and quickly expose a JAXWS service in PEtALS with Maven. This plugin will generate the JBI Service Unit and Service Assembly from a Maven java project with just a few lines of Maven settings…
As an example, the following interface :
package org.ow2.petals;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public interface Service {
@WebMethod
String ping(String input);
}
and its implementation :
package org.ow2.petals;
public class ServiceImpl implements Service {
public String ping(String input) {
return input;
}
}
will generate a Service Assembly idirectly deployable to PEtALS by the help of the Maven plugin :
<build>
<plugins>
<plugin>
<groupId>org.ow2.petals</groupId>
<artifactId>maven-petals-jaxws2jbi</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<id>generate-jbi</id>
<phase>package</phase>
<configuration>
<className>
org.ow2.petals.ServiceImpl
</className>
</configuration>
<goals>
<goal>java2jbi</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
The plugin takes the Service class, generates its associated WSDL file and the JBI descriptor and then package all into a Service Assembly.
PEtALS
jaxws, maven, PEtALS