Created
April 19, 2015 20:27
-
-
Save robizz/25fa13a7959cd9b354ba to your computer and use it in GitHub Desktop.
maven configuration to run AWS SWF Java Library with Java 8 and AWS SDK 1.9.27 in Eclipse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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"> | |
<!-- adapted from: https://github.com/pedropaulovc/aws-flow-maven-eclipse-samples | |
then upgraded to 1.9.27 and java 1.8 following http://stackoverflow.com/a/28843218/4094090 --> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.amazonaws.services.simpleworkflow.flow</groupId> | |
<artifactId>startstop</artifactId> | |
<version>1.8.4</version> | |
<packaging>jar</packaging> | |
<name>aws-flow-startstop</name> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<!-- version dependencies --> | |
<slf4j.version>1.7.5</slf4j.version> | |
<log4j-extras.version>1.2.17</log4j-extras.version> | |
<aws.java.sdk.version>1.9.27</aws.java.sdk.version> | |
<junit.version>4.10</junit.version> | |
<aspectj.version>1.8.2</aspectj.version> | |
<freemarker.version>2.3.9</freemarker.version> | |
<source.version>1.8</source.version> | |
<target.version>1.8</target.version> | |
<compliance.level.version>1.8</compliance.level.version> | |
<!-- version plugins --> | |
<processor.p.version>2.2.3</processor.p.version> | |
<compiler.p.version>2.1</compiler.p.version> | |
<aspectj.p.version>1.7</aspectj.p.version> | |
</properties> | |
<dependencies> | |
<!-- aws --> | |
<dependency> | |
<groupId>com.amazonaws</groupId> | |
<artifactId>aws-java-sdk</artifactId> | |
<version>${aws.java.sdk.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>com.amazonaws</groupId> | |
<artifactId>aws-java-sdk-swf-libraries</artifactId> | |
<version>${aws.java.sdk.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>com.amazonaws</groupId> | |
<artifactId>aws-java-sdk-flow-build-tools</artifactId> | |
<version>${aws.java.sdk.version}</version> | |
<scope>provided</scope> | |
</dependency> | |
<!-- testing --> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>${junit.version}</version> | |
<scope>test</scope> | |
</dependency> | |
<!-- logging --> | |
<dependency> | |
<groupId>org.slf4j</groupId> | |
<artifactId>slf4j-log4j12</artifactId> | |
<version>${slf4j.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>org.slf4j</groupId> | |
<artifactId>jcl-over-slf4j</artifactId> | |
<version>${slf4j.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>org.slf4j</groupId> | |
<artifactId>jul-to-slf4j</artifactId> | |
<version>${slf4j.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>log4j</groupId> | |
<artifactId>apache-log4j-extras</artifactId> | |
<version>${log4j-extras.version}</version> | |
</dependency> | |
<!-- aspectj weaving --> | |
<dependency> | |
<groupId>org.aspectj</groupId> | |
<artifactId>aspectjrt</artifactId> | |
<version>${aspectj.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>org.aspectj</groupId> | |
<artifactId>aspectjtools</artifactId> | |
<version>${aspectj.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>org.freemarker</groupId> | |
<artifactId>freemarker</artifactId> | |
<version>${freemarker.version}</version> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.bsc.maven</groupId> | |
<artifactId>maven-processor-plugin</artifactId> | |
<version>${processor.p.version}</version> | |
<executions> | |
<!-- Run annotation processors on src/main/java sources --> | |
<execution> | |
<id>process</id> | |
<goals> | |
<goal>process</goal> | |
</goals> | |
<phase>generate-sources</phase> | |
</execution> | |
<!-- Run annotation processors on src/test/java sources --> | |
<execution> | |
<id>process-test</id> | |
<goals> | |
<goal>process-test</goal> | |
</goals> | |
<phase>generate-test-sources</phase> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>${compiler.p.version}</version> | |
<configuration> | |
<!-- Disable annotation processors during normal compilation --> | |
<compilerArgument>-proc:none</compilerArgument> | |
<source>${source.version}</source> | |
<target>${target.version}</target> | |
</configuration> | |
</plugin> | |
<!-- AspectJ configuration --> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>aspectj-maven-plugin</artifactId> | |
<version>${aspectj.p.version}</version> | |
<configuration> | |
<complianceLevel>${compliance.level.version}</complianceLevel> | |
<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> | |
<showWeaveInfo>true</showWeaveInfo> | |
<verbose>true</verbose> | |
<sources> | |
<source> | |
<basedir>src/main/java</basedir> | |
<includes> | |
<include>**/*WorkflowImpl.java</include> | |
<include>**/*ActivitiesImpl.java</include> | |
</includes> | |
</source> | |
</sources> | |
</configuration> | |
<executions> | |
<execution> | |
<goals> | |
<goal>compile</goal> | |
<goal>test-compile</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
<pluginManagement> | |
<plugins> | |
<!--This plugin's configuration is used to store Eclipse m2e settings | |
only. It has no influence on the Maven build itself. --> | |
<plugin> | |
<groupId>org.eclipse.m2e</groupId> | |
<artifactId>lifecycle-mapping</artifactId> | |
<version>1.0.0</version> | |
<configuration> | |
<lifecycleMappingMetadata> | |
<pluginExecutions> | |
<pluginExecution> | |
<pluginExecutionFilter> | |
<groupId>org.bsc.maven</groupId> | |
<artifactId> | |
maven-processor-plugin | |
</artifactId> | |
<versionRange> | |
[2.2.3,) | |
</versionRange> | |
<goals> | |
<goal>process</goal> | |
<goal>process-test</goal> | |
</goals> | |
</pluginExecutionFilter> | |
<action> | |
<execute> | |
<runOnIncremental>false</runOnIncremental> | |
</execute> | |
</action> | |
</pluginExecution> | |
<pluginExecution> | |
<pluginExecutionFilter> | |
<groupId> | |
org.codehaus.mojo | |
</groupId> | |
<artifactId> | |
aspectj-maven-plugin | |
</artifactId> | |
<versionRange> | |
[1.7,) | |
</versionRange> | |
<goals> | |
<goal>test-compile</goal> | |
</goals> | |
</pluginExecutionFilter> | |
<action> | |
<ignore></ignore> | |
</action> | |
</pluginExecution> | |
</pluginExecutions> | |
</lifecycleMappingMetadata> | |
</configuration> | |
</plugin> | |
<plugin> | |
<artifactId>maven-assembly-plugin</artifactId> | |
<configuration> | |
<archive> | |
<manifest> | |
<mainClass>rey.sto.mcd.swf.startstop.StartStopWorker</mainClass> | |
</manifest> | |
<!-- <manifestEntries> --> | |
<!-- <Class-Path>.</Class-Path> --> | |
<!-- </manifestEntries> --> | |
</archive> | |
<descriptorRefs> | |
<descriptorRef>jar-with-dependencies</descriptorRef> | |
</descriptorRefs> | |
<finalName>startstop</finalName> | |
<appendAssemblyId>false</appendAssemblyId> | |
</configuration> | |
<executions> | |
<execution> | |
<id>make-assembly</id> <!-- this is used for inheritance merges --> | |
<phase>package</phase> <!-- bind to the packaging phase --> | |
<goals> | |
<goal>single</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</pluginManagement> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I try this maven says the following, how can I fix it?
[ERROR] 'build.plugins.plugin[com.mysema.maven:apt-maven-plugin].dependencies.dependency.scope' for com.amazonaws:aws-java-sdk-flow-build-tools:jar must be one of [compile, runtime, system] but is 'provided'. @ line 73, column 10