Projet

Général

Profil

MAY Project Setup » Historique » Version 7

Anonyme, 08/11/2011 18:08

1 1 Anonyme
*Draft version...*
2
3
h1. SpeADL MAY Project SetUp
4
5
First, create a java project, choose a name, and click finish. Add the SpeADL Nature to the project : right click on the project / Configure / Add SpeADL Nature.
6
_This is necessary in order to..._
7
8 4 Anonyme
Then, create a new file with the speadl extension within the src folder. Eclipse will ask you if you want to add Xtext nature to the project, click yes.
9 3 Anonyme
10 2 Anonyme
!https://wwwsecu.irit.fr/redmine/attachments/download/336/add_xtext_nature_confirm.jpg!
11 5 Anonyme
12
The next step is to convert your project into a Maven project. To do this, right click on your project / Configure / Convert to Maven Project.
13
You will be asked to create a new POM file. Just click finish and edit it manually. A good starting pom.xml for a new project is the following:
14
15 6 Anonyme
<pre>
16
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
18
	<modelVersion>4.0.0</modelVersion>
19
	<groupId>XXX</groupId>
20
	<artifactId>XXX</artifactId>
21
	<version>0.0.1-SNAPSHOT</version>
22
	<dependencies>
23
		<dependency>
24
			<groupId>fr.irit.smac.may.lib</groupId>
25
			<artifactId>common-components</artifactId>
26
			<version>0.0.3-SNAPSHOT</version>
27
			<type>jar</type>
28
			<scope>compile</scope>
29
		</dependency>
30
	</dependencies>
31
	<repositories>
32
		<repository>
33
			<id>fr.irit.smac</id>
34
			<url>http://www.irit.fr/~Victor.Noel/maven-repos/</url>
35
		</repository>
36
	</repositories>
37
	<build>
38
		<plugins>
39
			<plugin>
40
				<groupId>org.codehaus.mojo</groupId>
41
				<artifactId>build-helper-maven-plugin</artifactId>
42
				<version>1.7</version>
43
				<executions>
44
					<execution>
45
						<id>add-source</id>
46
						<phase>generate-sources</phase>
47
						<goals>
48
							<goal>add-source</goal>
49
						</goals>
50
						<configuration>
51
							<sources>
52
								<source>src-gen</source>
53
							</sources>
54
						</configuration>
55
					</execution>
56
				</executions>
57
			</plugin>
58
		</plugins>
59
	</build>
60
</project>
61
</pre>
62 5 Anonyme
63
You may get an error message saying your project configuration is out of date with your new pom.xml
64
Update it : right click on your project / Maven / Update Project Configuration...
65 7 Anonyme
66
!https://wwwsecu.irit.fr/redmine/attachments/download/337/update_project_conf.jpg!