Skip to content

Instantly share code, notes, and snippets.

@ikikko
Created January 16, 2011 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikikko/782033 to your computer and use it in GitHub Desktop.
Save ikikko/782033 to your computer and use it in GitHub Desktop.
slim3 archetype +alpha
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.ikikko</groupId>
<artifactId>guestbook-ajax</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<slim3.version>1.0.6</slim3.version>
<appengine.version>1.4.0</appengine.version>
<generated.src>.apt_generated</generated.src>
<generated.war>war</generated.war>
<eclipse.lib>eclipse.lib</eclipse.lib>
</properties>
<repositories>
<repository>
<id>maven.seasar.org</id>
<name>The Seasar Foundation Maven2 Repository</name>
<url>https://www.seasar.org/maven/maven2</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven.seasar.org</id>
<name>The Seasar Foundation Maven2 Repository</name>
<url>https://www.seasar.org/maven/maven2</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.slim3</groupId>
<artifactId>slim3</artifactId>
<version>${slim3.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-labs</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${appengine.version}</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-labs</artifactId>
<version>${appengine.version}</version>
</dependency>
<dependency>
<groupId>org.slim3</groupId>
<artifactId>slim3-gen</artifactId>
<version>${slim3.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>${appengine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-local-runtime</artifactId>
<version>${appengine.version}</version>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>${appengine.version}</version>
<scope>test</scope>
</dependency>
-->
<dependency>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>json-lib</artifactId>
<version>2.1</version>
<type>jar</type>
<classifier>jdk15</classifier>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>slim3-maven</finalName>
<outputDirectory>${generated.war}/WEB-INF/classes</outputDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<dependencies>
<dependency>
<groupId>org.slim3</groupId>
<artifactId>slim3-gen</artifactId>
<version>${slim3.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.src}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>utf-8</encoding>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>apt-maven-plugin</artifactId>
<configuration>
<encoding>utf-8</encoding>
<outputDirectory>${generated.src}</outputDirectory>
</configuration>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies-for-webapp</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${generated.war}/WEB-INF/lib</outputDirectory>
<includeScope>runtime</includeScope>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
<execution>
<id>copy-dependencies-for-apt</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${eclipse.lib}</outputDirectory>
<includeArtifactIds>slim3-gen</includeArtifactIds>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${generated.war}/WEB-INF/lib</directory>
<includes>
<include>**/*.jar</include>
</includes>
</fileset>
<fileset>
<directory>${generated.src}</directory>
<includes>
<include>**/*.*</include>
</includes>
</fileset>
<!--
<fileset>
<directory>${eclipse.lib}</directory>
<includes>
<include>slim3-gen-*.jar</include>
</includes>
</fileset>
-->
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>war/WEB-INF/web.xml</webXml>
<warSourceExcludes>.gwt-tmp/**</warSourceExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<excludes>
<exclude>org.slim3:slim3-gen</exclude>
<exclude>com.google.appengine:appengine-api-1.0-sdk</exclude>
<exclude>com.google.appengine:appengine-api-labs</exclude>
<exclude>com.google.appengine:appengine-api-stubs</exclude>
<exclude>com.google.appengine:appengine-local-runtime</exclude>
</excludes>
<additionalProjectnatures>
<projectnature>com.google.appengine.eclipse.core.gaeNature</projectnature>
<projectnature>com.google.gdt.eclipse.core.webAppNature</projectnature>
<!-- add config -->
<projectnature>org.eclipse.wst.jsdt.core.jsNature</projectnature>
</additionalProjectnatures>
<additionalBuildcommands>
<buildcommand>com.google.gdt.eclipse.core.webAppProjectValidator</buildcommand>
<buildcommand>com.google.appengine.eclipse.core.enhancerbuilder</buildcommand>
<buildcommand>com.google.appengine.eclipse.core.projectValidator</buildcommand>
<!-- add config -->
<buildcommand>org.eclipse.wst.jsdt.core.javascriptValidator</buildcommand>
</additionalBuildcommands>
<classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
<classpathContainer>com.google.appengine.eclipse.core.GAE_CONTAINER</classpathContainer>
</classpathContainers>
<additionalConfig>
<file>
<name>.factorypath</name>
<content>
<![CDATA[
<factorypath>
<factorypathentry kind="WKSPJAR" id="/${artifactId}/${eclipse.lib}/slim3-gen-${slim3.version}.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
]]>
</content>
</file>
<file>
<name>.settings/org.eclipse.jdt.apt.core.prefs</name>
<content>
<![CDATA[
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=${generated.src}
org.eclipse.jdt.apt.reconcileEnabled=false
]]>
</content>
</file>
<file>
<name>.settings/com.google.gdt.eclipse.core.prefs</name>
<content>
<![CDATA[
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
warSrcDir=war
warSrcDirIsOutput=false
]]>
</content>
</file>
<file>
<name>.settings/com.google.appengine.eclipse.core.prefs</name>
<content>
<![CDATA[
eclipse.preferences.version=1
ormEnhancementInclusions=
]]>
</content>
</file>
</additionalConfig>
</configuration>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment