Posts Tagged ‘Maven’
Working with Multimodule Projects in m2eclipse
How to Create an Apache CXF SOAP Proxy in Apache Camel 2.8 with Apache Felix Maven Bundle Plugin 2.3.5
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.eti.fernandoribeiro.sample</groupId>
<artifactId>sampleroute</artifactId>
<packaging>bundle</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<version>2.8.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.5</version>
<extensions>true</extensions>
<configuration>
<instructions>
<DynamicImport-Package>*</DynamicImport-Package> <!-- replacing several Apache CXF imports -->
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
SampleService.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.fernandoribeiro.eti.br/ws/sample" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.fernandoribeiro.eti.br/ws/sample" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema elementFormDefault="qualified" targetNamespace="http://www.fernandoribeiro.eti.br/ws/sample">
<xs:element name="Sample">
<xs:complexType />
</xs:element>
<xs:element name="SampleResponse">
<xs:complexType />
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="Sample">
<wsdl:part name="Sample" element="tns:Sample" />
</wsdl:message>
<wsdl:message name="SampleResponse">
<wsdl:part name="SampleResponse" element="tns:SampleResponse" />
</wsdl:message>
<wsdl:portType name="SamplePortType">
<wsdl:operation name="SampleOperation">
<wsdl:input message="tns:Sample" />
<wsdl:output message="tns:SampleResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SampleSoapBinding" type="tns:SamplePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="SampleOperation">
<soap:operation soapAction="" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SampleService">
<wsdl:port name="SamplePort" binding="tns:SampleSoapBinding">
<soap:address location="http://ws.fernandoribeiro.eti.br/SampleService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:cxf="http://camel.apache.org/schema/cxf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd">
<bean id="routeBuilder" class="br.eti.fernandoribeiro.sample.SampleRouteBuilder" />
<camel:camelContext>
<camel:routeBuilder ref="routeBuilder" />
</camel:camelContext>
<cxf:cxfEndpoint id="cxfEndpoint" address="http://0.0.0.0:8080/ws/SampleService" wsdlURL="wsdl/SampleService.wsdl" endpointName="sample:SamplePort" serviceName="sample:SampleService" xmlns:sample="http://www.fernandoribeiro.eti.br/sample" />
</beans>
How to Customize the equals and hashCode Methods with JAXB Commons 0.6.3
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>br.eti.fernandoribeiro</groupId>
<artifactId>sample</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
<version>0.6.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<extension>true</extension>
<args>
<arg>-Xequals</arg>
<arg>-XhashCode</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.6.3</version>
</plugin>
</plugins>
</configuration>
</plugin>
</plugins>
</build>
</project>
JCP/JavaEE Artifacts in Maven Central
This includes the official JCP/JavaEE artifacts, being published by the official steward of Java technology.
Great move.
http://weblogs.java.net/blog/edburns/archive/2011/09/02/jcpjavaee-artifacts-maven-central
How to Generate a JAX-WS Client with JAX-WS Maven Plugin 2.1
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.eti.fernandoribeiro.wsclient</groupId>
<artifactId>samplewsclient</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
</repository>
</repositories>
</project>
Bug in JAX-WS Maven 2 Plugin 1.12
The plugin needs to be updated for Maven 3.
http://java.net/jira/browse/JAX_WS_COMMONS-66 (vote for it!)
How to Generate an Apache Axis 1.4 Client with Axis Tools Maven Plugin 1.4
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.eti.fernandoribeiro.wsclient</groupId>
<artifactId>samplewsclient</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
m2eclipse: The collaboration of the Maven & Eclipse Platforms
Nice changes coming in 1.0.