Skip to content

Commit

Permalink
make sample-server-archetype a real java module
Browse files Browse the repository at this point in the history
sample server archetype is now a real module that can be compiled and built like any other java module. The archetype gets created and published as part of the build process. This should fix the issue of the platform version in the archetype not being updated by the release plugin.
  • Loading branch information
Martin Traverso committed Dec 7, 2010
1 parent 67ba4be commit c4fc81a
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 120 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@
<module>bootstrap</module>
<module>formatting</module>
<module>configuration</module>
<module>sample-server-archetype</module>
<module>zookeeper</module>
<module>concurrent</module>
<module>io</module>
<module>collections</module>
<module>dbpool</module>
<module>sample-server</module>
</modules>
</project>

37 changes: 0 additions & 37 deletions sample-server-archetype/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions sample-server/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sample server that demonstrates usage of the platform codebase.
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@
<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>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<groupId>com.proofpoint.platform</groupId>
<artifactId>sample-server</artifactId>
<version>0.18-SNAPSHOT</version>
<name>sample-server</name>

<properties>
<main-class>Main</main-class>
<main-class>com.proofpoint.sample.Main</main-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform-version>0.15-SNAPSHOT</platform-version>
<platform-version>0.18-SNAPSHOT</platform-version>
</properties>

<dependencies>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>2.0</version>
</dependency>

<dependency>
<groupId>com.proofpoint.platform</groupId>
<artifactId>bootstrap</artifactId>
Expand Down Expand Up @@ -59,7 +65,7 @@
<type>tar.gz</type>
</dependency>


<!-- for testing -->
<dependency>
<groupId>org.testng</groupId>
Expand Down Expand Up @@ -95,6 +101,71 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<id>create-archetype</id>
<phase>generate-sources</phase>
<goals>
<goal>create-from-project</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>1.5</version>
<configuration>
<debug>true</debug>
<pomIncludes>
<pomInclude>archetype/pom.xml</pomInclude>
</pomIncludes>
<projectsDirectory>${project.build.directory}/generated-sources</projectsDirectory>
</configuration>
<executions>
<execution>
<id>package-archetype</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<goals>
<goal>package</goal>
</goals>
</configuration>
</execution>
<execution>
<id>install-archetype</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<goals>
<goal>install</goal>
</goals>
</configuration>
</execution>
<execution>
<id>deploy-archetype</id>
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<goals>
<goal>deploy</goal>
</goals>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};
package com.proofpoint.sample;

import com.proofpoint.configuration.Config;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};

package com.proofpoint.sample;

import com.proofpoint.sample.HelloConfig;

import com.google.inject.Inject;

import javax.ws.rs.GET;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};
package com.proofpoint.sample;

import com.google.inject.Injector;
import com.proofpoint.bootstrap.Bootstrap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};
package com.proofpoint.sample;

import com.proofpoint.sample.HelloConfig;

import com.google.inject.Binder;
import com.google.inject.Module;
import com.google.inject.Scopes;
import com.proofpoint.configuration.ConfigurationModule;
import com.proofpoint.sample.HelloResource;
import org.codehaus.jackson.jaxrs.JacksonJsonProvider;

public class MainModule
Expand Down

0 comments on commit c4fc81a

Please sign in to comment.