Maven settings.xml (2.x)
Create a new XML file in your .m2 directory called settings.xml. Add the following lines, specifying the actual location of your Tomcat home directory (in this example /opt/tomcat
).
Do not include trailing / or \ slashes in the directory paths.
Sakai does not use the standard appserver.home
so you must include a <sakai.appserver.home>
element in your settings.xml
file. For Windows users, the sakai.appserver.home
value must be C:\opt\tomcat
.
Unix/Mac |
Windows |
---|---|
<settings 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/settings-1.0.0.xsd"> <profiles> <profile> <id>tomcat5x</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <appserver.id>tomcat5x</appserver.id> <appserver.home>/opt/tomcat</appserver.home> <maven.tomcat.home>/opt/tomcat</maven.tomcat.home> <sakai.appserver.home>/opt/tomcat</sakai.appserver.home> <surefire.reportFormat>plain</surefire.reportFormat> <surefire.useFile>false</surefire.useFile> </properties> </profile> </profiles> </settings> |
<settings 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/settings-1.0.0.xsd"> <profiles> <profile> <id>tomcat5x</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <appserver.id>tomcat5x</appserver.id> <appserver.home>c:\opt\tomcat</appserver.home> <maven.tomcat.home>c:\opt\tomcat</maven.tomcat.home> <sakai.appserver.home>c:\opt\tomcat</sakai.appserver.home> <surefire.reportFormat>plain</surefire.reportFormat> <surefire.useFile>false</surefire.useFile> </properties> </profile> </profiles> </settings> |
Optionally, you can specify the Tomcat home to be an environment variable:
<maven.tomcat.home>${env.CATALINA_HOME}</maven.tomcat.home>