This project is not related to nortal/j-road. It is simple alternative, that doesn't keep any generated sources. You will also need to generate necessary classes in your project. Check out examples.
<dependency>
<groupId>com.nortal.jroad.starter</groupId>
<artifactId>j-road-client</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>com.nortal.jroad.starter</groupId>
<artifactId>j-road-server</artifactId>
<version>0.3.0</version>
</dependency>
##How X-Road works? X-Road is the way to securely exchange the data between e-Country services. The base idea is that you have security servers at both points. So if you need to test service providing/consumption, you need security server at your point. The second thing is to get access for your user to use services you need. The current project is not going to help you do that. These work should be done before you use project's libs. Read more here.
##What does this project do? It has two Java-libraries: client and server, where you control everything (including marshalling and unmarshalling).
Client lib provides the way to consume other services. It has simple Configuration class and simple Service class base. See example of it's usage in "example_client" module.
Server - TODO description.
##What does this project not do? This project doesn't keep the bunch of WSDLs and XSDs with generated classes. That's how it stays clean. The idea is to simplify SOAP logic only. So it's on you to generate Java classes from WSDLs you need. It's also recommended to keep these WSDLs and generated classes in your project's VCS. You can have the task for classes regeneration, like this:
configurations {
jaxws
}
dependencies {
jaxws "com.sun.xml.ws:jaxws-tools:2.3.2"
jaxws "com.sun.xml.bind:jaxb-impl:2.3.2"
}
/**
* Run Gradle with "-PgenWsdlClasses" to regenerate WSDL/XSDs into Java classes.
**/
task genJaxwsFiles {
if (project.hasProperty("genWsdlClasses")) {
delete fileTree("$projectDir/src/main/java/{...}/generated") {
include "**/*.java"
}
ant.taskdef(name: 'wsimport', classname: 'com.sun.tools.ws.ant.WsImport', classpath: configurations.jaxws.asPath)
ant.wsimport(
sourcedestdir: "$projectDir/src/main/java",
package: "{...}.generated",
wsdl: "$projectDir/src/main/resources/wsdl/{...}.wsdl",
wsdlLocation: "../{...}/../wsdl/{...}.wsdl",
keep: true,
extension: true,
verbose: true,
quiet: false,
xendorsed: true,
xnocompile: true
) {
xjcarg(value: "-XautoNameResolution")
}
}
}
These instructions are needed only for developers and maintainers of this repository.
You need to create a JIRA ticket and find someone who already has access to (com.nortal) to approve. Then you need to wait for the rights to be added to your user.
gpg --gen-key
You get the ID as output. Something like this: FA074FD8AD325C5E16447B587D5B9A643F9CA057 In next commands you need 8 last digits of it: 3F9CA057 And also pick a password that you need later. We use 'myPassword' here
gpg --keyring secring.gpg --export-secret-keys 3F9CA057 > ~/.gnupg/secring.gpg
Use file gradle.properties.sample to create your own version of gradle.properties
Edit build.gradle
Tag a new version in GitHub And then perform a clean clone and checkout on it (to be sure you are a correct tag and that you have no uncommitted changes).
git clone https://github.com/nortal/j-road-starter.git --branch 0.3.0
Avoid creating a relase on working directory (as you might depend on files not committed to VCS)
This build has to pass:
gradle sign -Psigning.secretKeyRingFile=/Users/me/.gnupg/secring.gpg -Psigning.password=myPassword -Psigning.keyId=3F9CA057
gpg --keyserver hkp://pool.sks-keyservers.net --send-keys 3F9CA057
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 3F9CA057
gradle clean sign publishToMavenLocal
gradle clean sign publish -Psigning.secretKeyRingFile=/Users/me/.gnupg/secring.gpg -Psigning.password=myPassword -Psigning.keyId=3F9CA057
Click "close".
In case there are any errors you need to solve them before proceeding.
For every item you need to define a staging repository in dependent component:
<repository>
<id>stagingJroadStarter</id>
<name>Maven Central Staging</name>
<url>https://oss.sonatype.org/content/repositories/comnortaljroad-1056/</url>
</repository>
Clean build the dependent project to test. Remove from local repository every time you switch to new one.