Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Further cleanup of Ant script
Browse files Browse the repository at this point in the history
(maybe ready to switch to exec plugin now to run template-processor...)
  • Loading branch information
vsonnier committed Jan 22, 2016
1 parent 8eede65 commit 5c84ae5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
11 changes: 3 additions & 8 deletions hppcrt/build.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@

<!-- Source code generation phase is handled by an ANT script, it's simply much easier to do it from ANT. -->

<project name="hppc" default="generate.sources">
<project name="hppcrt" default="generate.sources">

<!-- Generate code from templates. -->
<target name="generate.sources" description="Generate main sources from templates">
<loadfile property="builder.classpath" srcfile="${basedir}/.builder.classpath" />
<path id="libs">
<pathelement path="${builder.classpath}" />
<pathelement location="target/builder" />
</path>
<target name="generate.sources" description="Generate main/test sources from templates">

<taskdef classname="com.carrotsearch.hppcrt.generator.TemplateProcessor" name="generate">
<classpath refid="libs" />
<classpath path="${classpath}" />
</taskdef>

<generate
Expand Down
12 changes: 5 additions & 7 deletions hppcrt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
<scope>test</scope>
</dependency>
</dependencies>

<properties>
<version.retrotranslator>1.2.9</version.retrotranslator>
</properties>

<!-- Build tuning. -->
<build>
Expand All @@ -54,7 +50,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${version.maven-antrun-plugin}</version>
<executions>
<execution>
<id>generate.sources</id>
Expand All @@ -65,7 +60,6 @@
<maxmem>512m</maxmem>
<target>
<property name="classpath" refid="maven.plugin.classpath" />
<echo file="${project.basedir}/.builder.classpath">${classpath}</echo>
<ant antfile="${basedir}/build.xml" />
</target>
</configuration>
Expand All @@ -74,13 +68,17 @@
</goals>
</execution>
</executions>

<dependencies>
<dependency>
<groupId>com.github.vsonnier</groupId>
<artifactId>hppcrt-template-processor</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>${version.ant}</version>
</dependency>
</dependencies>
</plugin>

Expand Down
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
<version.maven-resources-plugin>2.7</version.maven-resources-plugin>
<version.maven-surefire-plugin>2.19.1</version.maven-surefire-plugin>

<version.maven-enforcer-plugin>1.4.1</version.maven-enforcer-plugin>
<version.maven-javadoc-plugin>2.10.3</version.maven-javadoc-plugin>
<version.maven-source-plugin>2.4</version.maven-source-plugin>

Expand Down Expand Up @@ -313,6 +314,29 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${version.maven-enforcer-plugin}</version>
<inherited>false</inherited>
<executions>
<execution>
<id>enforce-environment</id>
<phase>verify</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[${version.maven.api},)</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>

<!-- Use maven-bundle-plugin to generate an OSGi bundle -->
<plugin>
<groupId>org.apache.felix</groupId>
Expand Down

0 comments on commit 5c84ae5

Please sign in to comment.