MAY Project Setup » Historique » Version 36
Anonyme, 16/11/2011 15:41
| 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 | 31 | Anonyme | This is necessary to benefit from MAY source code generation. |
| 9 | 1 | Anonyme | |
| 10 | 32 | Anonyme | Create a folder main in the src folder, and then create a folder java in the main folder (Maven convention) |
| 11 | 33 | Anonyme | Then, create a new file with the speadl extension within the java folder. Eclipse will ask you if you want to add Xtext nature to the project, click yes. |
| 12 | 3 | Anonyme | |
| 13 | 2 | Anonyme | !https://wwwsecu.irit.fr/redmine/attachments/download/336/add_xtext_nature_confirm.jpg! |
| 14 | 5 | Anonyme | |
| 15 | 34 | Anonyme | Your package explorer should looks like this: |
| 16 | 35 | Anonyme | |
| 17 | 34 | Anonyme | !https://wwwsecu.irit.fr/redmine/attachments/download/352/package_explorer.jpg! |
| 18 | |||
| 19 | 19 | Anonyme | h2. Maven convertion |
| 20 | |||
| 21 | 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. |
| 22 | 30 | Anonyme | You will be asked to create a new POM file. Just click finish and edit it manually like this: |
| 23 | 5 | Anonyme | |
| 24 | 6 | Anonyme | <pre> |
| 25 | 29 | Anonyme | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 26 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||
| 27 | <modelVersion>4.0.0</modelVersion> |
||
| 28 | <groupId>XXX</groupId> |
||
| 29 | <artifactId>XXX</artifactId> |
||
| 30 | <version>0.0.1-SNAPSHOT</version> |
||
| 31 | <dependencies> |
||
| 32 | <dependency> |
||
| 33 | <groupId>fr.irit.smac.may.lib</groupId> |
||
| 34 | <artifactId>common-components</artifactId> |
||
| 35 | <version>0.0.3</version> |
||
| 36 | <type>jar</type> |
||
| 37 | <scope>compile</scope> |
||
| 38 | </dependency> |
||
| 39 | </dependencies> |
||
| 40 | <repositories> |
||
| 41 | <repository> |
||
| 42 | <id>fr.irit.smac</id> |
||
| 43 | <url>http://www.irit.fr/~Victor.Noel/maven-repos/</url> |
||
| 44 | </repository> |
||
| 45 | </repositories> |
||
| 46 | <build> |
||
| 47 | <sourceDirectory>src</sourceDirectory> |
||
| 48 | <plugins> |
||
| 49 | <plugin> |
||
| 50 | <groupId>org.codehaus.mojo</groupId> |
||
| 51 | <artifactId>build-helper-maven-plugin</artifactId> |
||
| 52 | <version>1.7</version> |
||
| 53 | <executions> |
||
| 54 | <execution> |
||
| 55 | <id>add-source</id> |
||
| 56 | <phase>generate-sources</phase> |
||
| 57 | <goals> |
||
| 58 | <goal>add-source</goal> |
||
| 59 | </goals> |
||
| 60 | <configuration> |
||
| 61 | <sources> |
||
| 62 | <source>src-gen</source> |
||
| 63 | </sources> |
||
| 64 | </configuration> |
||
| 65 | </execution> |
||
| 66 | </executions> |
||
| 67 | </plugin> |
||
| 68 | </plugins> |
||
| 69 | </build> |
||
| 70 | 6 | Anonyme | </project> |
| 71 | </pre> |
||
| 72 | 5 | Anonyme | |
| 73 | 8 | Anonyme | h1. Possible issues and resolutions |
| 74 | |||
| 75 | 10 | Anonyme | h2. Project configuration is not up-to-date |
| 76 | |||
| 77 | 5 | Anonyme | You may get an error message saying your project configuration is out of date with your new pom.xml |
| 78 | 36 | Anonyme | Update it : right click on your project / Maven / Update Project Configuration... and click Ok. |
| 79 | 7 | Anonyme | |
| 80 | 1 | Anonyme | !https://wwwsecu.irit.fr/redmine/attachments/download/337/update_project_conf.jpg! |