Skip to content
stephanenicolas edited this page Sep 15, 2013 · 5 revisions

Maven is the primary build system used by BoundBox. You can find sample of setups in the samples section of the github repo. Nevertheless, here is a wrap up :

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <properties>
    <boundbox.version>x.y.z</boundbox.version>
    <maven-compiler-plugin.version>2.5.1</maven-compiler-plugin.version>
    <build-helper-maven-plugin.version>1.8</build-helper-maven-plugin.version>
    <java.version>1.6</java.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.boundbox</groupId>
      <artifactId>boundbox-library</artifactId>
      <version>${boundbox.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- Use BoundBox annotation processor -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <annotationProcessors>
            <annotationProcessor>org.boundbox.processor.BoundBoxProcessor</annotationProcessor>                       
          </annotationProcessors>
        </configuration>
      </plugin>

      <!-- This is for eclipse, it will bind the generated source folder of maven to eclipse source folder -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-sources/annotations/</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>