blob: 4c206877082d731fcef71b76de3843d44782cfbb [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<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>
<!-- =======================================================================
A quickstart pom.xml that creates a sample project that uses ANTLR 3.x
grammars. You should replace the sample grammars in src/main/antlr3
with your own grammar files and use packages.
A .g file in
src/main/antlr3/com/temporalwave
belongs in the package
com.temporalwave
See http://antlr.org/antlr3-maven-plugin for more details.
This project produces both a jar file of the project and an executeable
jar file that contains all the dependencies so you can run it standalone.
See below for more details.
Archetype by Jim Idle (jimi@temporal-wave.com) - Oct 2009
Report bugs to the ANTLR interest list at http://www.antlr.org
Generated by antlr3-maven-archetype version 3.4.1-SNAPSHOT
=======================================================================
-->
<!-- This is your organizations normal group name
such as org.antlr
All the artifacts you create will be under this
group id.
-->
<groupId>${groupId}</groupId>
<!-- This is how maven knows your artifact
-->
<artifactId>${artifactId}</artifactId>
<!-- This is the human oriented name for the package
so you can call it anything you like
-->
<name>ANTLR3 project: ${package}</name>
<!-- This is the version of YOUR project -->
<version>${version}</version>
<packaging>jar</packaging>
<url>http://antlr.org</url>
<dependencies>
<!--
We need to have the ANTLR runtime jar when running and compiling.
-->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>3.4.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<!--
Tell Maven which other artifacts we need in order to
build with the ANTLR Tool. Here we also make the default
goal be install so that you can just type mvn at the command
line instead of mvn install. And we add the java compiler plugin
for convenience to show how you can use 1.6 source files but
generate 1.4 compatible .class files (as few people seem to
know about the jsr14 target).
-->
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
<version>3.4.1-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>antlr</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Strictly speaking, we did not need to generate this for you from
the prototype, but we use it to illustrate how you can get
the JDK 6 Java compiler to accept 1.5 or 1.6 targeted source code
but produce class files that are compatible with JRE 1.4. As
Michael Caine might say, "Not a lot of people know that!"
-->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>jsr14</target>
<sourceDirectory>src</sourceDirectory>
</configuration>
</plugin>
<plugin>
<!--
Build an uber-jar that is packaged with all the other dependencies,
such as the antlr-runtime and so on. This will be useful
for developers, who then do not need to download anything else or
remember that they need antlr.jar in their CLASSPATH and so
on.
You can delete this plugin of course and you will then
get a jar file with only the code generated and included
directly in this project. With this plugin though you will
find that when you build with:
mvn install
There will be an executable jar generated. You can run this
as:
java -jar ${artifactId}-${version}-jar-with-dependencies.jar demosource.dmo
assuming you have a file called demosource.dmo to attempt a parse.
-->
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!--
Specify that we want the resulting jar to be executable
via java -jar, which we do by modifying the manifest
of course.
-->
<archive>
<manifest>
<mainClass>${package}.Main</mainClass>
</manifest>
</archive>
</configuration>
<!--
We don't want to have to specifically ask for the uber jar, so we attach the
running of this plugin to the execution of the package life-cycle
phase.
-->
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>