Differences

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

Link to this comparison view

maven [02/12/2013 09:55]
p171024 [JCPIS_ANALYSE login plugin]
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 39: Line 39:
  
 First screen :  First screen : 
-Maven -> Web Project+Maven -> Web Application
  
 Next :  Next : 
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 !
  
  
Line 73: 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.3.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 : =====
  
Line 95: Line 154:
 Before editting these projects, you need to change the versionnumber : Before editting these projects, you need to change the versionnumber :
  
-<version>1.0</version> becomes <version>1.1-SNAPSHOT</version>+<code xml><version>1.0</version></code> becomes <code xml><version>1.1-SNAPSHOT</version></code>
  
 And change the reference in projects where jav2013 is used, This ensures the projects will use your latest version. And change the reference in projects where jav2013 is used, This ensures the projects will use your latest version.