Projet

Général

Profil

MAY Project Setup » Historique » Révision 29

Révision 28 (Anonyme, 16/11/2011 15:06) → Révision 29/74 (Anonyme, 16/11/2011 15:31)

*Draft version...* 

 h1. SpeADL MAY Project SetUp 

 h2. A classic JAVA project to start with... 

 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. 
 _This is necessary in order to..._ 

 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. 

 !https://wwwsecu.irit.fr/redmine/attachments/download/336/add_xtext_nature_confirm.jpg! 

 h2. Maven convertion 

 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. 
 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: 

 <pre> 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
     
	 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
     
	 <modelVersion>4.0.0</modelVersion> 
     
	 <groupId>XXX</groupId> 
     
	 <artifactId>XXX</artifactId> 
     
	 <version>0.0.1-SNAPSHOT</version> 
     
	 <dependencies> 
         
		 <dependency> 
             
			 <groupId>fr.irit.smac.may.lib</groupId> 
             
			 <artifactId>common-components</artifactId> 
             
			 <version>0.0.3</version> 
             
			 <type>jar</type> 
             
			 <scope>compile</scope> 
         
		 </dependency> 
     
	 </dependencies> 
     
	 <repositories> 
         
		 <repository> 
             
			 <id>fr.irit.smac</id> 
             
			 <url>http://www.irit.fr/~Victor.Noel/maven-repos/</url> 
         
		 </repository> 
     
	 </repositories> 
     
	 <build> 
    	 <sourceDirectory>src</sourceDirectory> 
         
		 <plugins> 
             
			 <plugin> 
                 
				 <groupId>org.codehaus.mojo</groupId> 
                 
				 <artifactId>build-helper-maven-plugin</artifactId> 
                 
				 <version>1.7</version> 
                 
				 <executions> 
                     
					 <execution> 
                         
						 <id>add-source</id> 
                         
						 <phase>generate-sources</phase> 
                         
						 <goals> 
                             
							 <goal>add-source</goal> 
                         
						 </goals> 
                         
						 <configuration> 
                             
							 <sources> 
                                 
								 <source>src-gen</source> 
                             
							 </sources> 
                         
						 </configuration> 
                     
					 </execution> 
                 
				 </executions> 
             
			 </plugin> 
         
		 </plugins> 
     
	 </build> 
 </project> 
 </pre> 

 h1. Possible issues and resolutions 

 h2. Project configuration is not up-to-date 

 You may get an error message saying your project configuration is out of date with your new pom.xml 
 Update it : right click on your project / Maven / Update Project Configuration... 

 !https://wwwsecu.irit.fr/redmine/attachments/download/337/update_project_conf.jpg!