Skip to content
Open
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
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,46 @@

<a name="Top"></a>

The docs for the 2.x branch can be found [here](https://github.com/Grails-Plugin-Consortium/grails-cxf/tree/grails-2). A lot of the previous documentation is somewhat applicable, but I will be creating new docs in the coming weeks.
The docs for the 2.x branch can be found [here](https://github.com/Grails-Plugin-Consortium/grails-cxf/tree/grails-2) and grails 3.x branch can be found [here](https://github.com/Grails-Plugin-Consortium/grails-cxf/tree/master). A lot of the previous documentation is somewhat applicable, but I will be creating new docs in the coming weeks.

Grails CXF Plugin
=========

The 3.x branch of the plugin is a grails plugin that contains simplified features to get simple soap endpoints exposed in grails 3 applications.
The 6.x branch of the plugin is a grails plugin that contains simplified features to get simple soap endpoints exposed in grails 6 applications.

Getting Started
-----------

At the core, this plugin is a simple wrapper for geeting grails service classes wired up as direct soap endpoints. As many of the previous features from the 2.x branch as could be ported for the initial release were ported. There will be continued support added for the more complex CXF features going forward.
At the core, this plugin is a simple wrapper for getting grails service classes wired up as direct soap endpoints. All the previous features from the 3.x branch were ported. There will be continued support added for the more complex CXF features going forward.

Installation
-----------

Grails 3.x:
```groovy
compile 'org.grails.plugins:cxf:3.1.2'
```

Grails 6.x:
```groovy
implemenation 'org.grails.plugins:cxf:6.0-JDK11-M1'
```
In addition if you want to use github package registry:

```groovy
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/vsachinv/grails-cxf")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}

```


Basic Usage
---------
Expand Down
186 changes: 107 additions & 79 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,105 +1,133 @@
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
}
plugins {
id "groovy"
id "war"
id "idea"
id "org.grails.grails-plugin"
id "eclipse"
id "com.gorylenko.gradle-git-properties"
id "maven-publish"
}

version "3.1.2"
group "org.grails.plugins"

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.grails-plugin-publish"

ext {
grailsVersion = project.grailsVersion
gradleWrapperVersion = project.gradleWrapperVersion
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
mavenCentral()
maven { url "https://repo.grails.org/grails/core/" }
}

dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
configurations {
all {
}
}

dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
implementation("org.grails:grails-core")
implementation("org.grails:grails-logging")
implementation("org.grails:grails-web-boot")
implementation("org.springframework.boot:spring-boot-autoconfigure")
implementation("org.springframework.boot:spring-boot-starter-logging")
implementation("org.springframework.boot:spring-boot-starter-validation")
compileOnly("io.micronaut:micronaut-inject-groovy")
console("org.grails:grails-console")
testImplementation("io.micronaut:micronaut-inject-groovy")
testImplementation("org.grails:grails-gorm-testing-support")
testImplementation("org.spockframework:spock-core")
testImplementation("io.micronaut:micronaut-http-client")

implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation "org.apache.cxf:cxf-core:${cxfVersion}"
implementation "org.apache.cxf:cxf-rt-transports-http:${cxfVersion}"
implementation "org.apache.cxf:cxf-rt-frontend-jaxrs:${cxfVersion}"
implementation "org.apache.cxf:cxf-rt-frontend-jaxws:${cxfVersion}"
}

provided "org.grails:grails-web-boot"
provided "org.grails:grails-dependencies"
provided 'javax.servlet:javax.servlet-api:3.1.0'

console "org.grails:grails-console"
java {
sourceCompatibility = JavaVersion.toVersion("11")
targetCompatibility = JavaVersion.toVersion("11")
}

profile "org.grails.profiles:plugin"
tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}

compile 'org.apache.commons:commons-lang3:3.4'
compile 'org.apache.cxf:cxf-core:3.1.8'
compile 'org.apache.cxf:cxf-rt-frontend-jaxws:3.1.8'
compile 'org.apache.cxf:cxf-rt-frontend-jaxrs:3.1.8'
compile 'org.apache.cxf:cxf-rt-transports-http:3.1.8'
tasks.withType(Test) {
useJUnitPlatform()
}

testCompile "org.grails:grails-plugin-testing"
task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

task wrapper(type: Wrapper) {
gradleVersion = gradleWrapperVersion
task packageJavadoc(type: Jar) {
from javadoc
classifier = 'javadoc'
}

grailsPublish {
githubSlug = 'Grails-Plugin-Consortium/grails-cxf'
license {
name = 'Apache-2.0'
}
title = "Grails CXF Plugin"
desc = "Grails CXF Plugin"
developers = [acetrike: "Christian Oestreich",
'ryan.j.crum': "Ryan Crum",
crafsman: "Ben Doerr"]

portalUser = ""
portalPassword = ""
task packageGroovydoc(type: Jar) {
from groovydoc
classifier = 'groovydoc'
}

bintray {
user = System.getenv("BINTRAY_USER") ?: project.hasProperty("bintrayUser") ? project.bintrayUser : ''
key = System.getenv("BINTRAY_KEY") ?: project.hasProperty("bintrayKey") ? project.bintrayKey : ''
publications = ['maven']
pkg {
repo = 'grails-plugins'
userOrg = 'ctoestreich'
name = "cxf"
desc = "Grails CXF Plugin"
websiteUrl = "http://grails.org/plugin/grails-cxf"
issueTrackerUrl = "https://github.com/Grails-Plugin-Consortium/grails-cxf/issues"
vcsUrl = "https://github.com/Grails-Plugin-Consortium/grails-cxf"
licenses = ['Apache-2.0']
publicDownloadNumbers = true
}
gitProperties {
keys = ['git.branch', 'git.commit.id', 'git.commit.time', 'git.commit.id.abbrev']
failOnNoGitDirectory = true
extProperty = 'gitProps' // git properties will be put in a map at project.ext.gitProps
}

generateGitProperties.outputs.upToDateWhen { false } // make sure the generateGitProperties task always executes (even when git.properties is not changed)

jar {
exclude 'org/grails/cxf/test/**'
dependsOn generateGitProperties
manifest {
attributes("Built-By": System.getProperty("user.name"))
attributes(["Plugin-Version" : version,
"Plugin-Title" : project.name,
"Plugin-Build-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Git-Commit" : "${-> project.ext.gitProps['git.commit.id.abbrev']}",
"Git-Branch" : "${-> project.ext.gitProps['git.branch']}",
"Published-By" : project.findProperty("nexusUsername") ?: System.getenv("NEXUS_USERNAME")])
}
from sourceSets.main.output
exclude 'git.properties'
}

publishing {

publications {
mavenJar(MavenPublication) {
from components.java
artifact sourceJar
artifact packageJavadoc
artifact packageGroovydoc
}
}

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/vsachinv/grails-cxf")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
maven {
name = "NexusRepo"
credentials {
username project.findProperty("nexusUsername") ?: System.getenv("NEXUS_USERNAME")
password project.findProperty("nexusPassword") ?: System.getenv("NEXUS_PASSWORD")
}
url project.findProperty("nexusUrl") ?: System.getenv("NEXUS_URL")
allowInsecureProtocol = project.findProperty("isNexusUrlInsecure") ? true : false
}
}
}

bintrayUpload.dependsOn sourcesJar, javadocJar
// enable if you wish to package this plugin as a standalone application
bootJar.enabled = false

bootRun.onlyIf { false }
8 changes: 8 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/core/" }
}
dependencies {
implementation("org.grails:grails-gradle-plugin:6.1.2")
implementation "com.gorylenko.gradle-git-properties:gradle-git-properties:2.4.2"
}
11 changes: 8 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
grailsVersion=3.3.4
gormVersion=6.1.9.RELEASE
gradleWrapperVersion=3.5
grailsVersion=6.2.0
grailsGradlePluginVersion=6.1.2
version=6.0-JDK11-M1
org.gradle.caching=true
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
cxfVersion=3.6.6
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Nov 27 23:09:32 CET 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
Loading