Projet

Général

Profil

MAY Maven Eclipse Setup » Historique » Version 1

Anonyme, 01/10/2014 16:06

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