Skip to content

Building from source

Fabio Corubolo edited this page Mar 10, 2015 · 8 revisions

PET is build using Apache MAVEN, that will handle all the necessary dependencies for its execution.

In order to build PET, first install maven. There are various option, the most general being described here: How to get maven running

Once MAVEN is installed:

Maven build from within Eclipse

If you use the Eclipse IDE, you can execute the build from within it. Eclipse has been used for PET development; it will handle the build process and allow faster development. For instructions see: Working with Eclipse

Rightclick the project name and select "Run As... -> Maven install"

Afterwards you can execute the class "main.ExtractionMain" as Java Application in /src/java/main/ : rightclick the class and select "Run As... -> Java Application"

Maven build from command line

  1. go to the "external_tool/OfficeDDT" folder

(Office DDT is an external dependency for a PET module, and must be installed separately as it's not available on official repositories; there is also some issue with missing files on some tests, hence the option)

  1. run mvn install -DskipTests

  2. go back to the PET folder

  3. run mvn package -DskipTests

  4. a distribution version of PET will be built and can be found in the target folder 'target': "PET-extractor-1.0-SNAPSHOT.zip"

  5. the JAR file that is created in the TARGET folder will not include all the library dependencies for PET; for this reason, in order to run PET, you will need use and extract the ZIP distribution file.

Clone this wiki locally