Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#27 jdk11 #29

Merged
merged 12 commits into from
Jun 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: java
jdk:
- oraclejdk8
- oraclejdk9
- oraclejdk11

script: mvn clean install

Expand Down
455 changes: 446 additions & 9 deletions README.md

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions cxf-spring-boot-starter-maven-plugin-integrationtest/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?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>
<parent>
<groupId>de.codecentric</groupId>
<artifactId>cxf-spring-boot-starter-maven-plugin-reactor</artifactId>
<version>2.1.6-SNAPSHOT</version>
</parent>
<artifactId>cxf-spring-boot-starter-maven-plugin-integrationtest</artifactId>
<version>2.1.6-SNAPSHOT</version>
<description>Project solely for integrationtesting the cxf-spring-boot-starter-maven-plugin</description>

<properties>
<java.version>1.8</java.version>

<!-- Testing dependencies -->
<maven-verifier.version>1.6</maven-verifier.version>
<junit.version>4.12</junit.version>
</properties>

<dependencies>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-verifier</artifactId>
<version>${maven-verifier.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package de.codecentric.cxf;

import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
import org.junit.Before;
import org.junit.Test;

import java.io.File;
import java.io.IOException;

public class CxfSpringBootStarterMavenPluginIntegrationTest {

private File generationTestProjectDir;
private Verifier verifier;

@Before
public void setUp() throws IOException, VerificationException {
// Given
generationTestProjectDir = ResourceExtractor.simpleExtractResources( getClass(), "/generation-test-project" );
verifier = new Verifier( generationTestProjectDir.getAbsolutePath(), "$HOME/.m2/settings.xml");
verifier.setLogFileName("verifier-output.log");
}

@Test
public void plugin_output_should_look_good_in_log() throws VerificationException {

// When
verifier.executeGoal( "generate-sources" );

// Then
verifier.verifyErrorFreeLog();
verifier.verifyTextInLog("CXF-BOOT-MAVEN-PLUGIN STEP 0: Scanning for WSDL file in src/main/resources");
verifier.verifyTextInLog("CXF-BOOT-MAVEN-PLUGIN STEP 1: Found .wsdl-File");
verifier.verifyTextInLog("CXF-BOOT-MAVEN-PLUGIN STEP 2: Generating JAX-B Classfiles.");
verifier.verifyTextInLog("Processing: file:");
verifier.verifyTextInLog("jaxws:wsimport args: [-keep, -s, '");
verifier.verifyTextInLog("CXF-BOOT-MAVEN-PLUGIN setting relative wsdlLocation into @WebServiceClient:");
verifier.verifyTextInLog("CXF-BOOT-MAVEN-PLUGIN STEP 4: Guessing SEI implementation´s package name & injecting it into cxf-spring-boot-maven.properties for later Autodetection of Endpoints...");
verifier.verifyTextInLog("CXF-BOOT-MAVEN-PLUGIN STEP 5: Extracting targetNamespace from WSDL, generating packageName from it with com.sun.tools.xjc.api.XJC (see wsgen, WSImportTool and WSDLModeler at line 2312 of the JAXWSRI) and injecting it into cxf-spring-boot-maven.properties for later Autodetection of Endpoints...");

// Reset the streams before executing the verifier
verifier.resetStreams();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?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>de.codecentric.soap</groupId>
<artifactId>generation-test-project</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<description>Project solely for integrationtesting the cxf-spring-boot-starter-maven-plugin</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>de.codecentric</groupId>
<artifactId>cxf-spring-boot-starter-maven-plugin</artifactId>
<version>2.1.6-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
154 changes: 154 additions & 0 deletions cxf-spring-boot-starter-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<?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>
<parent>
<groupId>de.codecentric</groupId>
<artifactId>cxf-spring-boot-starter-maven-plugin-reactor</artifactId>
<version>2.1.6-SNAPSHOT</version>
</parent>
<artifactId>cxf-spring-boot-starter-maven-plugin</artifactId>
<version>2.1.6-SNAPSHOT</version>
<name>cxf-spring-boot-starter-maven-plugin</name>
<description>Maven plugin complementing the Boot starter for SOAP-Webservices with Apache CXF using JAX-WS &amp; JAXB with Annotations only</description>
<packaging>maven-plugin</packaging>
<url>https://github.com/codecentric/cxf-spring-boot-starter-maven-plugin</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://opensource.org/licenses/Apache-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Jonas Hecht</name>
<email>[email protected]</email>
<organization>codecentric AG</organization>
<organizationUrl>http://www.codecentric.de</organizationUrl>
</developer>
</developers>

<properties>
<java.version>1.8</java.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>

<!-- Project dependencies -->
<commons-io.version>2.6</commons-io.version>
<commons-lang3.version>3.9</commons-lang3.version>
<spring.version>5.1.7.RELEASE</spring.version>
<jaxb.version>2.3.2</jaxb.version>
<jaxws-ri.version>2.3.2</jaxws-ri.version>
<mojo-executor.version>2.3.0</mojo-executor.version>
<maven-plugin-plugin.version>3.6.0</maven-plugin-plugin.version>
<maven-plugin-annotations.version>3.6.0</maven-plugin-annotations.version>
<maven-plugin-api.version>3.6.0</maven-plugin-api.version>

<!-- Testing dependencies -->
<junit.version>4.12</junit.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven-plugin-api.version}</version>
</dependency>

<!-- dependencies to annotations -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>${maven-plugin-annotations.version}</version>
<scope>provided</scope>
</dependency>

<!-- To compose all needed JAX-WS-Maven-Plugins for generation of JAX-B-Classes and so on
see: http://stackoverflow.com/questions/526733/maven-plugin-executing-another-plugin -->
<dependency>
<groupId>org.twdata.maven</groupId>
<artifactId>mojo-executor</artifactId>
<version>${mojo-executor.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>

<!-- Generate package Name of SEI and WebServiceClient for later
Autodetection of Endpoints in cxf-spring-boot-starter -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>${jaxb.version}</version>
</dependency>

<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${jaxb.version}</version>
</dependency>

<!-- JAXWS for Java 11 -->
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>${jaxws-ri.version}</version>
<type>pom</type>
</dependency>

<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
<executions>
<execution>
<id>default-descriptor</id>
<phase>process-classes</phase>
</execution>
<!-- if you want to generate help goal -->
<execution>
<id>help-goal</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ private void generateJaxbClassFiles(File wsdl, String jaxwsMavenPluginGoal, Stri
* in 2015, where it is developed further: https://github.com/mojohaus/jaxws-maven-plugin
*/
plugin(
groupId("org.codehaus.mojo"),
groupId("com.sun.xml.ws"),
artifactId("jaxws-maven-plugin"),
version("2.5"),
version("2.3.2"),
dependencies(
dependency(
"org.jvnet.jaxb2_commons",
"jaxb2-namespace-prefix",
"1.3"))
),
),
goal(jaxwsMavenPluginGoal),
configuration(
/*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- W3C XML Schema defined in the Describing Media Content of Binary Data in XML specification,
see http://www.w3.org/TR/xml-media-types
Copyright © 2005 World Wide Web Consortium -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
targetNamespace="http://www.w3.org/2005/05/xmlmime">

<xs:attribute name="contentType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>

<xs:attribute name="expectedContentTypes" type="xs:string"/>

<xs:complexType name="base64Binary">
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:attribute ref="xmime:contentType"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>

<xs:complexType name="hexBinary">
<xs:simpleContent>
<xs:extension base="xs:hexBinary">
<xs:attribute ref="xmime:contentType"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>

</xs:schema>
Loading