Last active
August 29, 2015 13:58
-
-
Save tingley/9980770 to your computer and use it in GitHub Desktop.
Sample pom.xml for a custom WorldServer SDK component
This file contains 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
<?xml version="1.0"?> | |
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.spartansoftwareinc.samples</groupId> | |
<artifactId>sample-wssdk-component</artifactId> | |
<name>Sample WorldServer component</name> | |
<url>http://maven.apache.org</url> | |
<!-- HOW TO USE THIS | |
* Install your wssdk.jar in a local repository and update | |
the dependencies section (see below) | |
* Put your desc.xml in src/main/resources | |
* Write your code in src/main/java | |
* Build with 'mvn package' | |
* Upload the sample-wssdk-component-1.0-SNAPSHOT.jar to WorldServer. | |
--> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
</properties> | |
<dependencies> | |
<!-- Add a dependency to the WSSDK here. This is left as an | |
exercise for the reader. You will need to install the wssdk | |
jar in a local repository under a group/artifactId of your | |
choosing, then reference here. Use <scope>provided</scope> | |
in the dependency statement, since you don't need to include it | |
in the jar you upload to WorldServer. --> | |
<!-- Add any other dependencies your project has here. --> | |
<!-- Some aspects of the SDK (notably configuration UI classes) | |
have a dependency on the servlet API. --> | |
<dependency> | |
<groupId>javax.servlet</groupId> | |
<artifactId>servlet-api</artifactId> | |
<version>2.5</version> | |
<scope>provided</scope> | |
</dependency> | |
<!-- WS components are encouraged to use log4j for logging. The | |
version of log4j in WS is much older (it still uses | |
org.apache.log4j.Category, which is now deprecated), but | |
this is basically just for compiling. | |
This is a much newer log4j than what WS uses, but it | |
shouldn't matter. Just be careful.--> | |
<dependency> | |
<groupId>log4j</groupId> | |
<artifactId>log4j</artifactId> | |
<version>1.2.17</version> | |
<scope>provided</scope> | |
</dependency> | |
<!-- Tools for testing. A Mocking library is very | |
helpful to simulate the interaction with the rest of | |
WS. --> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.11</version> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.jmock</groupId> | |
<artifactId>jmock-junit4</artifactId> | |
<version>2.6.0</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<!-- AFAIK, WorldServer still uses Java 1.5. --> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<configuration> | |
<source>1.5</source> | |
<target>1.5</target> | |
</configuration> | |
</plugin> | |
<!-- We use the maven-shade-plugin to bundle everything | |
up into the format WorldServer expects for SDK uploads. | |
You don't need to rename the output file .zip -- WS | |
will accept a .jar archive just fine, and ignore the | |
META-INF. --> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-shade-plugin</artifactId> | |
<version>1.6</version> | |
<configuration> | |
<createDependencyReducedPom>true</createDependencyReducedPom> | |
</configuration> | |
<executions> | |
<execution> | |
<phase>package</phase> | |
<goals> | |
<goal>shade</goal> | |
</goals> | |
<configuration> | |
<transformers> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | |
</transformer> | |
</transformers> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReactiveCocoa