MAY Maven Standalone Setup » Historique » Version 1
Anonyme, 01/10/2014 16:03
| 1 | 1 | Anonyme | h1. SpeADL MAY Maven SetUp |
|---|---|---|---|
| 2 | |||
| 3 | The first step is to convert your project into a Maven project. |
||
| 4 | To do this, right click on your project and on *Configure* / *Convert to Maven Project*. |
||
| 5 | |||
| 6 | You will be asked to create a new POM file. Just click *Finish* and edit it as in the following: |
||
| 7 | |||
| 8 | <pre> |
||
| 9 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||
| 10 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||
| 11 | <modelVersion>4.0.0</modelVersion> |
||
| 12 | <groupId>XXX</groupId> |
||
| 13 | <artifactId>XXX</artifactId> |
||
| 14 | <version>XXX</version> |
||
| 15 | |||
| 16 | <properties> |
||
| 17 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||
| 18 | <may-lib-version>3.3.0</may-lib-version> |
||
| 19 | </properties> |
||
| 20 | |||
| 21 | <dependencies> |
||
| 22 | <dependency> |
||
| 23 | <groupId>fr.irit.smac.lib.may</groupId> |
||
| 24 | <artifactId>common-components</artifactId> |
||
| 25 | <version>${may-lib-version}</version> |
||
| 26 | </dependency> |
||
| 27 | </dependencies> |
||
| 28 | |||
| 29 | <repositories> |
||
| 30 | <repository> |
||
| 31 | <id>fr.irit.smac</id> |
||
| 32 | <url>http://www.irit.fr/~Victor.Noel/maven-repos/</url> |
||
| 33 | </repository> |
||
| 34 | </repositories> |
||
| 35 | |||
| 36 | <build> |
||
| 37 | <sourceDirectory>src</sourceDirectory> |
||
| 38 | <plugins> |
||
| 39 | <plugin> |
||
| 40 | <artifactId>maven-compiler-plugin</artifactId> |
||
| 41 | <configuration> |
||
| 42 | <source>1.7</source> |
||
| 43 | <target>1.7</target> |
||
| 44 | </configuration> |
||
| 45 | </plugin> |
||
| 46 | <plugin> |
||
| 47 | <groupId>org.codehaus.mojo</groupId> |
||
| 48 | <artifactId>build-helper-maven-plugin</artifactId> |
||
| 49 | <version>1.8</version> |
||
| 50 | <executions> |
||
| 51 | <execution> |
||
| 52 | <id>add-source</id> |
||
| 53 | <goals> |
||
| 54 | <goal>add-source</goal> |
||
| 55 | </goals> |
||
| 56 | <configuration> |
||
| 57 | <sources> |
||
| 58 | <source>speadl-gen</source> |
||
| 59 | </sources> |
||
| 60 | </configuration> |
||
| 61 | </execution> |
||
| 62 | <!-- The following is only needed so that speadl files are included in the generated maven artifact --> |
||
| 63 | <execution> |
||
| 64 | <id>add-resource</id> |
||
| 65 | <goals> |
||
| 66 | <goal>add-resource</goal> |
||
| 67 | </goals> |
||
| 68 | <configuration> |
||
| 69 | <resources> |
||
| 70 | <resource> |
||
| 71 | <directory>${project.build.sourceDirectory}</directory> |
||
| 72 | <includes> |
||
| 73 | <include>**/*.speadl</include> |
||
| 74 | </includes> |
||
| 75 | </resource> |
||
| 76 | </resources> |
||
| 77 | </configuration> |
||
| 78 | </execution> |
||
| 79 | </executions> |
||
| 80 | </plugin> |
||
| 81 | </plugins> |
||
| 82 | </build> |
||
| 83 | </project> |
||
| 84 | </pre> |