Projet

Général

Profil

MAY Project Setup » Historique » Version 28

Anonyme, 16/11/2011 15:06

1 1 Anonyme
*Draft version...*
2
3
h1. SpeADL MAY Project SetUp
4
5 18 Anonyme
h2. A classic JAVA project to start with...
6
7 1 Anonyme
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.
8
_This is necessary in order to..._
9
10 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.
11 3 Anonyme
12 2 Anonyme
!https://wwwsecu.irit.fr/redmine/attachments/download/336/add_xtext_nature_confirm.jpg!
13 5 Anonyme
14 19 Anonyme
h2. Maven convertion
15
16 5 Anonyme
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.
17
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:
18
19 6 Anonyme
<pre>
20
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22
	<modelVersion>4.0.0</modelVersion>
23
	<groupId>XXX</groupId>
24
	<artifactId>XXX</artifactId>
25
	<version>0.0.1-SNAPSHOT</version>
26
	<dependencies>
27
		<dependency>
28
			<groupId>fr.irit.smac.may.lib</groupId>
29
			<artifactId>common-components</artifactId>
30 27 Anonyme
			<version>0.0.3</version>
31 6 Anonyme
			<type>jar</type>
32
			<scope>compile</scope>
33
		</dependency>
34
	</dependencies>
35
	<repositories>
36
		<repository>
37
			<id>fr.irit.smac</id>
38
			<url>http://www.irit.fr/~Victor.Noel/maven-repos/</url>
39
		</repository>
40
	</repositories>
41
	<build>
42
		<plugins>
43
			<plugin>
44
				<groupId>org.codehaus.mojo</groupId>
45
				<artifactId>build-helper-maven-plugin</artifactId>
46
				<version>1.7</version>
47
				<executions>
48
					<execution>
49
						<id>add-source</id>
50
						<phase>generate-sources</phase>
51
						<goals>
52
							<goal>add-source</goal>
53
						</goals>
54
						<configuration>
55
							<sources>
56
								<source>src-gen</source>
57
							</sources>
58
						</configuration>
59
					</execution>
60
				</executions>
61
			</plugin>
62
		</plugins>
63
	</build>
64
</project>
65
</pre>
66 5 Anonyme
67 8 Anonyme
h1. Possible issues and resolutions
68
69 10 Anonyme
h2. Project configuration is not up-to-date
70
71 5 Anonyme
You may get an error message saying your project configuration is out of date with your new pom.xml
72
Update it : right click on your project / Maven / Update Project Configuration...
73 7 Anonyme
74 1 Anonyme
!https://wwwsecu.irit.fr/redmine/attachments/download/337/update_project_conf.jpg!