Differences

This shows you the differences between two versions of the page.

Link to this comparison view

maven [24/02/2014 10:10]
robindolle
maven [01/02/2019 16:01] (current)
Anthony Arents [Setting up a developer machine :]
Line 4: Line 4:
  
 Maven is one of several possible build tools, it's easy to use and supported in Netbeans + Eclipse. Maven is one of several possible build tools, it's easy to use and supported in Netbeans + Eclipse.
-Maven is preinstalled on mac (3.0.3), maven is also bundled with Netbeans (3.0.5 we'll use that version to avoid problems).+Maven is preinstalled on mac (3.0.3), maven is also bundled with Netbeans (3.0.5). I prefer downloading latest from http://maven.apache.org
  
 ===== Advantages of using Maven are numerous : ===== ===== Advantages of using Maven are numerous : =====
Line 56: Line 56:
  
   - fiddle with the options in pom to generate a different build.   - fiddle with the options in pom to generate a different build.
-  - time to change the context.xml file (located under Web Pages/META-INF/context.xml) +  - time to change the context.xml file (located under Web Pages/META-INF/context.xml)\\ easiest way : copy the file from JCPIS_ANALYSE_BUILD_EFFEKT, adjust it so the path & webapp rootkey are unique
-easiest way : copy the file from JCPIS_ANALYSE_BUILD_EFFEKT, adjust it so the path & webapp rootkey are unique+
   - Remove the web.xml file from the build !   - Remove the web.xml file from the build !
  
Line 74: Line 73:
 ===== Setting up a developer machine : ===== ===== Setting up a developer machine : =====
  
-  - In case of a new developer on a mac : use a copy of Netbeans, adjusted by our company (Netbeans.app hides the maven config file) +  - settings.xml 
-  We'll provide a settings.xml file + instructions on where to put it. +<code xml><?xml version="1.0" encoding="iso-8859-1"?> 
-  Check out MentoringSystems parent pom &ampbuild this one first, it contains some settings needed to recover all company projects ! +<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quotxsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> 
-  Check out the project you need to work on + <mirrors> 
-(for example, work on model) + <mirror> 
 + <id>nexus</id> 
 + <mirrorOf>*</mirrorOf> 
 + <url>http://svn.jcpis.de:8081/nexus/content/groups/public</url> 
 + </mirror> 
 + </mirrors> 
 + <proxies/> 
 + <servers> 
 + <server> 
 + <id>nexus</id> 
 + <username>***</username> 
 + <password>***</password> 
 + </server> 
 + </servers> 
 + <pluginGroups/> 
 + <profiles> 
 + <profile> 
 + <id>nexus</id> 
 + <!--Enable snapshots for the built in central repo to direct --> 
 + <!--all requests to nexus via the mirror --> 
 + <repositories> 
 + <repository> 
 + <id>central</id> 
 + <url>http://central</url> 
 + <releases> 
 + <updatePolicy>always</updatePolicy> 
 + <enabled>true</enabled> 
 + </releases> 
 + <snapshots> 
 + <updatePolicy>always</updatePolicy> 
 + <enabled>true</enabled> 
 + </snapshots> 
 + </repository> 
 + </repositories> 
 + <pluginRepositories> 
 + <pluginRepository> 
 + <id>central</id> 
 + <url>http://central</url> 
 + <releases> 
 + <updatePolicy>always</updatePolicy> 
 + <enabled>true</enabled> 
 + </releases> 
 + <snapshots> 
 + <updatePolicy>always</updatePolicy> 
 + <enabled>true</enabled> 
 + </snapshots> 
 + </pluginRepository> 
 + </pluginRepositories> 
 + </profile> 
 + </profiles> 
 + <activeProfiles> 
 + <activeProfile>nexus</activeProfile> 
 + </activeProfiles> 
 +</settings> 
 +</code>
 possible locations : possible locations :
  
-bundled maven (mac) : +bundled maven (mac) : \\  
-/Applications/NetBeans/NetBeans 7.4.app/Contents/Resources/NetBeans/java/maven/conf/settings.xml+''/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/java/maven/conf/settings.xml''
  
-preinstalled maven (mac) : +preinstalled maven (mac) : \\  
-/usr/share/maven/conf/settings.xml+''/usr/share/maven/conf/settings.xml''
  
-installed maven (windows) : +installed maven (mac, probably the same for linux) : \\  
-<userdir>/.m2/settings.xml+''/<wherever you've placed it>/maven/conf/settings.xml''
  
 +installed maven (windows) : \\ 
 +''<userdir>/.m2/settings.xml''
 +
 +  - Check out MentoringSystems parent pom & build this one first, it contains some settings needed to recover all company projects !
 +  - Check out the project you need to work on
 +(for example, work on model)
 ===== Important : updating an existing maven project : ===== ===== Important : updating an existing maven project : =====