NoSuchMethodError WSDLReader.readWSDL in JBPM WorkItemHandler - web-services

I'm working with JBPM 5.4 and using the console-server rest services available to manage the workflow of the processes.
I've also successfully tested a dummy WorkItemHandler that just get 2 values and return the sum of them, just to see a simple process working.
That was fine.
However, as I was testing a WorkItemHandler to invoke a external Web Service, the following error appeared:
Caused by: java.lang.NoSuchMethodError: javax.wsdl.xml.WSDLReader.readWSDL(Ljavax/wsdl/xml/WSDLLocator;Lorg/w3c/dom/Element;)Ljavax/wsdl/Definition;
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:237) [cxf-rt-core-2.4.4.jar:2.4.4]
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186) [cxf-rt-core-2.4.4.jar:2.4.4]
What I did:
I used the cxf-codegen-plugin version 2.4.4 (wich is the same version of cxf in the lib of console-server.war) to generate the java code from a wsdl.
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.4.4</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/adm/exampleService.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
The code is generated just fine.
I copied the work item jar file in the lib folder of the console-server project, as I have done before with a dummy WorkItemHandler.
I have also checked the cxf(2.4.4) and wsdl4j(1.6.2) versions inside de lib folder of console-server project. In fact, WSDLReader contains the "missing" method in that jar version of wsdl4j.
Where I am:
I understand that somehow the class called it is not from that version, but I can't imagine how that happens.
Anyone have a clue what to do?
I'm using the jboss that comes with jbpm installer, I have changed nothing.
Thanks!

I found the problem. I will document here in case someone stumbles accross this in the future:
JBPM 5.4 - Project gwt-console-server.war
Inside the lib folder there are these 2 jars:
wsdl4j.jar and javax.wsdl_1.5.1.v201012040544.jar.
They have the same classes, but inside the second jar, as it is another version, the class doesnt have the method required.
So, I simply removed that jar. I imagine it is a mistake for both of them to be together, but if someone knows a reason and I will fall in another issue further, please let me know. For now, it solves the problem.
Anyway, thanks everyone for the attention, I was struggling for a while with this.
Regards.

I would guess that, if you do have a jar with the correct version of WSDLReader in your classpath, that you might have another jar in your classpath that also contains an (incorrect) version of the same class. Note that this might be in your own war, but for example also in the server lib folder etc.

You can also exclude the wsdl4j.jar dependency in your pom file.
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
<type>jar</type>
<exclusions>
<exclusion>
<groupId>axis</groupId>
<artifactId>axis-wsdl4j</artifactId>
</exclusion>
</exclusions>
</dependency>

This is happening as the same class is found in two jar files. You can check the same in your local workspace to find in which jar files "javax.wsdl.xml.WSDLReader" class is present. Then keep only relevant jar file in your classpath.
In my case this file was present in given below two jar files:
eclipse-birt-javax.wsdl_1.5.1.v201012040544.jar
wsdl4j-1.6.2.jar
Hence I removed the irrelevant eclipse-birt-javax.wsdl_1.5.1.v201012040544.jar from classpath and then it worked.

Related

How to configure sonar properties for C++ project

I am trying to generate sonar report for C++ project. But I am getting "Please provide compiled classes of your project with sonar.java.binaries property" error. I am using SonarQube Data Center EditionVersion 7.9.4 (build 35981). PFB properties that i am having in pom.xml.
<sonar.maven.version>3.6.0.1398</sonar.maven.version>
<sonar.scm.enabled>true</sonar.scm.enabled>
<sonar.sources>.</sonar.sources>
<sonar.cfamily.build-wrapper-output>build_wrapper_output_directory</sonar.cfamily.build-wrapper-output>
<sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
I tried by giving c++, C++ in <sonar.language>c++</sonar.language>.
I had a similar issue that was fixed by adding:
-Dsonar.language=cxx
-Dsonar.inclusions=**/*.cxx,**/*.cpp,**/*.cc,**/*.c,**/*.hxx,**/*.hpp,**/*.hh,**/*.h,**/*.r
-Dsonar.exclusions=**/*.java
-Dsonar.cxx.file.suffixes=.cxx,.cpp,.cc,.c,.hxx,.hpp,.hh,.h,.r
You'll need to remove the "D" and adapt this to XML tags (and all might not be necessary) but it may fix your issue.
Need to download the Build Wrapper directly from your SonarQube server, so that its version perfectly matches your version of the plugin.
http://localhost:9000/static/cpp/build-wrapper-linux-x86.zip
http://localhost:9000/static/cpp/build-wrapper-macosx-x86.zip
http://localhost:9000/static/cpp/build-wrapper-win-x86.zip
Based on operating system extract respective zip file and place files into your project root directory. Use below code to run clean all. It will generate build-wrapper-dump.json and build-wrapper.log files. You can find them in output directory.
<execution>
<id>mfas-core-build-wrapper</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>build-wrapper-linux-x86-64</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>--out-dir</argument>
<argument>${output}</argument>
<argument>make</argument>
<argument>clean</argument>
<argument>all</argument>
</arguments>
</configuration>
</execution>
Need to add below properties in pom.xml
<sonar.language>cxx</sonar.language>
<sonar.sources>.</sonar.sources>
<sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
<sonar.cfamily.build-wrapper-output>${output}</sonar.cfamily.build-wrapper-output>
<sonar.inclusions>**/*.c,**/*.h,**/*.xml</sonar.inclusions>
<sonar.exclusions>**/*.java</sonar.exclusions>
<sonar.cxx.file.suffixes>.c,.h</sonar.cxx.file.suffixes>
Now run sonar scanner to analysis and generate the report.

MessageReceiver class missing

I could not find the class ProjectSubscriptionName/MessageReceiver and eclipse reporting ProjectSubscriptionName/MessageReceiver class can not resolved error tough the related google-cloud-pubsub jar imported to build path by defining in pom.xml file.
pom.xml:
<dependency>
<groupId>com.google.cloud.dataflow</groupId>
<artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>0.8.0</version>
</dependency>
Need help here to find the correct jar for missing classes. Appreciate your help. Jar should be stable one not alpha/beta version.
Hi Kamal,
Google released pubsub 1.31.0 version yesterday and pom entry below:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>1.31.0</version>
</dependency>
Link:
https://mvnrepository.com/artifact/com.google.cloud/google-cloud-pubsub/1.31.0
The ProjectSubscriptionName and MessageReceiver are only defined in later versions of the client library that were in beta until version 1.31.0 was released. The newer client libraries are designed to make it easier to handle high throughput and low latency. The MessageReceiver interface first appeared in version 0.9.0-alpha. The ProjectSubscriptionName class first appeared in 0.36.0-beta.

Where can I find the HttpTester class in Jetty 9.3.1?

In the Jetty 9.3.1 documentation the Class HttpTester is referenced, however it doesn't appear to be in any of the jar files provided in the download package.
HttpTester.Request request = HttpTester.newRequest();
request.setURI("/some/resource");
HttpTester.Response response =
HttpTester.parseResponse(HttpTester.from(localConnector.getResponse(request.generate())));
I want to use HttpTester.Response and HttpTester.Request in my unit test cases.
Was this class removed in 9.3.1? If so, is there a recommended alternative?
It was moved to the tests classified artifacts.
Try this (in maven-speak):
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>9.3.11.v20160721</version>
<classifier>tests</classifier>
</dependency>

How to consume Amazon SWF [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Amazon SWF was launched today. How best to consume it with Java / PHP / etc. ?
The current SDK support doesn't appear to include it. I know it's new, but does anyone have any good resources on how to consume it, or what changes I'd need to implement in the any of the following SDK's to get going right away?
AWS SDK for Java
AWS SDK for PHP
AWS SDK for Python
AWS SDK for Ruby
AWS SDK for .NET
Personally, my interest is on the Java & PHP SDK's...
Updated releases are visible at: http://aws.amazon.com/releasenotes Thanks Bjorn!
I'm using Amazon Simple Workflow Service (SWF) to implement asynchronous business processing using the AWS Flow Framework. It was important to me to have my development build setup using Maven, so that I could easily build from my IDE of choice (IntelliJ IDEA) as well as automate my test builds for continuous integration and production builds for release and deploy.
Most of my time was spent trying to get the auto-generated proxy classes created using AspectJ. This was initially a problem for me in Eclipse as I was using version 3.7 (Indigo) and even after following both the load-time and compile-time weaving instructions in the Setting up the Development Environment documentation I was unable to successfully get the classes blown out. On a hunch I remembered that the documentation says they used Eclipse 3.6 (Helios), so I downloaded this specific version of Eclipse and retried using the load-time weaving approach and it worked like a champ. Looking at the Eclipse logs between these two versions I was able to see that Eclipse 3.7 is missing a dependency for log4j and freemarker. I didn't bother going too far down the road to troubleshoot this further with Eclipse as I'm more of an IntelliJ IDEA user, but I'm sure that it's most definitely possible to get Eclipse working properly.
My next effort was to get an IntelliJ IDEA Maven project up and running with the minimum amount of information in my pom.xml to enable the auto-generation of the proxy classes. The clue was the last paragraph of the instructions for load-time weaving in the Setting up the Development Environment documentation, which states:
If you are building your project from the command line, ensure that
aws-java-sdk-flow-build-tools-1.3.3.jar is in the classpath. This jar
file contains the AWS Flow Framework annotation processor that must be
run to generate code. For an example, see the build.xml file included
in the samples folder.
Unless I'm mistaken, the research I've done to date indicates that the aspectj-maven-plugin doesn't not currently support load-time weaving. Breaking away from doing load-time weaving and utilizing an aop.xml file in conjunction with aspectjweaver running as a Java agent, I moved to compile-time weaving supported by this plugin. I can't help but think that when I installed the AWS SDK for Java support directly in Eclipse that it in turn baked in the support found in the aws-java-sdk-flow-build-tools-1.3.3.jar dependency. Taking the aforementioned clue, I was finally able to get the proxy classes blowing out by including a dependency for aws-java-sdk-flow-build-tools-1.3.3.jar in my pom.xml after installing this JAR into my local Maven repository. The rest of this entry outlines the steps taken to make this all happen.
IntelliJ IDEA Project Creation
Start the IntelliJ IDEA application.
Create a New Project.
Input the Project name and Project files location.
Select type should be Maven Module.
Adjust any Maven properties if appropriate on next screen and click Finish.
Follow the Maven instructions below for setting up the pom.xml.
AWS SDK for Java
In order to reference the necessary types for developing workflows and activities, you will need to download the AWS SDK for Java. It is recommended that you use Maven to include a dependency for this library for your project and build, but you should still download this library in order to get the aws-java-sdk-flow-build-tools library which can be found under the lib directory.
SWF Flow Build Tools
The AWS SDK for Java download includes a aws-java-sdk-flow-build-tools-<version>.jar JAR under the lib directory. In order to allow the inclusion of a Maven dependency for this library, you'll need to install the JAR into your local Maven repository. You can achieve this by running the following from the lib directory of the AWS SDK download:
mvn install:install-file
-Dfile=aws-java-sdk-flow-build-tools-<version>.jar
-DgroupId=com.amazonaws
-DartifactId=aws-java-sdk-flow-build-tools
-Dversion=<version>
-Dpackaging=jar
NOTE: Be sure to replace the tokens in the above command with the appropriate version found in your AWS SDK download.
Maven
Your pom.xml file should include the following dependencies. I've included the version numbers I'm using in case you run into breaking changes using different versions:
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.11</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-flow-build-tools</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.18</version>
</dependency>
</dependencies>
Your pom.xml file should also include the following plugin. I'm using source include patterns that following a packaging and interface naming convention I use in my code, though you don't necessarily need to do things this way:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<complianceLevel>1.5</complianceLevel>
<showWeaveInfo>true</showWeaveInfo>
<verbose>true</verbose>
<sources>
<source>
<basedir>src/main/java</basedir>
<includes>
<include>*/**/workflow/*Workflow.java</include>
<include>*/**/workflow/activities/*Activities.java</include>
</includes>
</source>
</sources>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
Once you've include the plugin listed above and have at least run a Maven compile, you should notice an aspectj node appear under the Plugins node within the Maven Projects tool window in IntelliJ IDEA. You can also optional add or tweak the elements of the configuration section of the aspectj-maven-plugin plugin if you desire. The various supported settings can be found in the aspectj:compile goal documentation found here. I've haven't tweaked my plugin configuration yet to ensure that the .java files are generated in the proper location under my source directory, though I'm sure this is quite doable.
External Libraries
Once you've include the set of dependencies listed above and have at least run a Maven compile, you should notice at minimum the following set of dependencies listed under the External Libraries node within the Project tool window in IntelliJ IDEA:
com.amazonaws:aws-java-sdk-flow-build-tools
com.amazonaws:aws-java-sdk
commons-codec:commons-codec
commons-logging:commons-logging
org.apache.httpcomponents:httpclient
org.apache.httpcomponents:httpcore
org.aspectj:aspectjrt
org.codehaus.jackson:jackson-core-asl
org.codehaus.jackson:jackson-mapper-asl
org.freemarker:freemarker
Example 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>swf_example</groupId>
<artifactId>swf_example</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.11</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-flow-build-tools</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.18</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<complianceLevel>1.5</complianceLevel>
<showWeaveInfo>true</showWeaveInfo>
<verbose>true</verbose>
<sources>
<source>
<basedir>src/main/java</basedir>
<includes>
<include>*/**/workflow/*Workflow.java</include>
<include>*/**/workflow/activities/*Activities.java</include>
</includes>
</source>
</sources>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Defining Workflows
To define a workflow you must create a Java interface that meets the following criteria:
The interface is annotated with #Workflow.
A single method is defined for the interface that is annotated with #Execute and has a version property set.
The interface has a name that ends with the string Workflow.
The interface resides under a package that ends with workflow.
The following is an example workflow interface named MyWorkflow, and would be contained a file named MyWorkflow.java, located under the source directory src/main/java, and under the package directory structure com/some/package/workflow. I haven't included the #WorkflowRegistrationOptions annotation or other bells and whistles as these aren't required and are dependent on your particular needs:
package com.some.package.workflow;
import com.amazonaws.services.simpleworkflow.flow.annotations.Execute;
import com.amazonaws.services.simpleworkflow.flow.annotations.Workflow;
#Workflow
public interface MyWorkflow {
#Execute(version="1.0")
void doWorkflow();
}
Defining Activities
To define activities you must create a Java interface that meets the following criteria:
The interface is annotated with #Activities and has a version property set.
The interface has a name that ends with the string Activities.
The interface resides under a package that ends with workflow/activities.
The following is an example activities interface named MyActivities, and would be contained in a file named MyActivities.java, located under the source directory src/main/java, and under the package directory structure com/some/package/workflow/activities. I haven't included the #ActivityRegistrationOptions annotation or other bells and whistles as these aren't required and are dependent on your particular needs:
package com.some.package.workflow.activities;
import com.amazonaws.services.simpleworkflow.flow.annotations.Activities;
#Activities(version="1.0")
public interface MyActivities {
void doActivity1();
void doActivity2();
void doActivity3();
}
Building
In order to ensure that the build process is the same during everyday development as well as for non-development environments (e.g. test, production, etc.), you should run builds in your development tool of choice through Maven. Various aspects have been included in the aws-java-sdk and aws-java-sdk-flow-build-tools JARs which are weaved into your workflows and activities, and the aws-java-sdk-flow-build-tools JAR includes the necessary mechanism to auto-generate the required proxy classes to execute workflows and activities. In order to ensure that you're working with the latest generated proxy classes, you should take care to clean the generated artifacts before a build in order to throw away unneeded and/or old classes. This can be achieved by running the following command or equivalent in your development tool of choice:
mvn clean install
If you keep the showWeaveInfo configuration option enabled in the aspectj-maven-plugin plugin, you should see something like the following snippet in your build output, albeit there are only have a few lines of output here due to only having a single workflow and single activities for this run:
Mar 12, 2012 5:21:22 PM com.amazonaws.eclipse.simpleworkflow.asynchrony.annotationprocessor.AsynchronyDeciderAnnotationProcessor process
INFO: AsynchronyDeciderAnnotationProcessor.process() invoked.
Mar 12, 2012 5:21:22 PM com.amazonaws.eclipse.simpleworkflow.asynchrony.annotationprocessor.AsynchronyDeciderAnnotationProcessor process
INFO: Processing #Activities for MyActivities
Mar 12, 2012 5:21:22 PM com.amazonaws.eclipse.simpleworkflow.asynchrony.annotationprocessor.AsynchronyDeciderAnnotationProcessor process
INFO: Processing #Workflow for MyWorkflow
Mar 12, 2012 5:21:22 PM com.amazonaws.eclipse.simpleworkflow.asynchrony.annotationprocessor.AsynchronyDeciderAnnotationProcessor process
INFO: AsynchronyDeciderAnnotationProcessor.process() invoked.
Auto-Generated Proxies
Once you've compiled your workflows and activities you should find the follow set of auto-generated proxy classes have been created. These proxies are to be used within your workflows to call upon your various activities, execute child workflows within other workflows, and also to execute workflows at a top level. NOTE: The strings "Workflow" and "Activities" in the following bullets would actually be the name of your actual workflow and activities interfaces respectively, and you should see the following set of classes created for each of your defined workflow and activities interfaces:
WorkflowClient.java
WorkflowClientExternal.java
WorkflowClientExternalFactory.java
WorkflowClientExternalFactoryImpl.java
WorkflowClientExternalImpl.java
WorkflowClientFactory.java
WorkflowClientFactoryImpl.java
WorkflowClientImpl.java
WorkflowSelfClient.java
WorkflowSelfClientImpl$1.java
WorkflowSelfClientImpl.java
ActivitiesClient.java
ActivitiesClientImpl.java
I'm also including some background information to help clarify the type of development environment I'm working on and tools I'm using for day to day coding.
OS
Mac OS X version 10.7.3
Java
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50b)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
Maven
Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
Maven home: /usr/share/maven
Java version: 1.6.0_29, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.3", arch: "x86_64", family: "mac"
IntelliJ IDEA (Community Edition)
IntelliJ IDEA 11.0.2
Build #IC111.277
Built on February 1, 2012
Here is a more recent answer that works for Java8 (JDK8) and compile time weaving.
The problem is that the maven compiler can perform annotation processing. If its turned on and aspectj, you will try to double create the same classes.
its better to leave the maven compiler to process the annotations (generate the workflow/activity classes) since aspectJ needs them created so it can then do its weaving (#Retry #Async)
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<goals>
<goal>compile</goal> <!-- use this goal to weave all your main classes -->
<goal>test-compile</goal> <!-- use this goal to weave all your test classes -->
</goals>
</execution>
</executions>
<configuration>
<complianceLevel>1.8</complianceLevel>
<showWeaveInfo>true</showWeaveInfo>
<verbose>true</verbose>
<source>1.8</source>
<target>1.8</target>
<aspectLibraries>
<aspectLibrary>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-swf-libraries</artifactId>
</aspectLibrary>
</aspectLibraries>
<!-- This is important so we don't double process the annotations -->
<proc>none</proc>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
Did you check the updated SDKs today? There was a new release about 10 hours ago (1.4.3 for .NET at least, released on February 21, 2012).
http://aws.amazon.com/releasenotes/.NET/5023081835314406
Several years later, this thread helped me a lot to make AWS SWF Flow work with Maven. However, some aspects are not working out of the box with this approach. I have written an article to concentrate all my findings. PS: would love some tips to make Java 1.8 work as well with this.
I have managed to make JAVA8 / AWS SDK 1.9.x work with Maven and Eclipse following this remarkable examples pedropaulovc/aws-flow-maven-eclipse-samples and tweaking the pom.xml, including the brave Mircea suggestion and other reworks.
you can find the resulting working pom.xml here
Note that i had to add to the aspectj plugin aspect libraries also the updated flow-build-tools, otherwise, the Activity and Workflow impl version number annotations do not work properly
<aspectLibraries>
<!-- for aspect weaving and swf versions -->
<aspectLibrary>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-swf-libraries</artifactId>
</aspectLibrary>
<aspectLibrary>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-flow-build-tools</artifactId>
</aspectLibrary>
</aspectLibraries>
Hope this could be helpful!
For the brave souls that read this:
Most of the stuff still applies. To make it work with Java 1.8, you need to use the following aspect library with AspectJ:
<aspectLibraries>
<aspectLibrary>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-swf-libraries</artifactId>
</aspectLibrary>
</aspectLibraries>
For a full sample look at:
https://github.com/mirceal/swf-flow-java18-sample

Maven Checkstyle Plugin creates empty report

We are currently migrating our Eclipse RCP application on a Maven build with Tycho.
Everythings runs fine, so we wanted to introduce the Maven checkstyle plugin.
The structure looks as following:
parent
- pom.xml
child1
- pom.xml
child2
- pom.xml
Every child is configured as module from the parent project (and vice versa).
We configured the maven-checkstyle-plugin like this:
<build>
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.9.1</version>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
Starting mvn clean install site from the child1 project does create the checkstyle-result.xml but this file is empty.
Any hints what's wrong here?
this:
http://larsmartinle.wordpress.com/2011/01/22/getting-checkstyle-pmd-an-other-plugins-to-work-with-maven/
might help you
add the correct source-location (instead of maven default "src/main/java")
..
<build>
<sourceDirectory>src</sourceDirectory>
..
I would like to point out that your approach of configuring reports in the plugin section is deprecated in maven 3.3.
(from https://maven.apache.org/plugins/maven-site-plugin/maven-3.html)
As a consequence, with maven-site-plugin 3.3, the configuration has simply been removed (more precisely marked private/internal), since it should not be used directly. This documentation has been kept public only to help people who used it in previous versions understand why they need to migrate back to classic configuration.
In addition it is discouraged to use this in any maven version, the recommended way is (again)
using the section (but that may change again).