Thursday, May 14, 2009

maven profiles.xml

Just solved a problem with maven and profiles.xml. The documentation says that the profiles.xml file uses the exact format as the <profiles> element in pom.xml, but this isn't quite true. The <profiles> element is needed, but the documentation neglects to point out that you need to wrap the <profiles> element with a <profilesXml> root element.



<?xml version="1.0" encoding="UTF-8"?>
<profilesXml>
<profiles>
<profile>
<!-- This profile is used by default -->
<id>default-profile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<webapp.port>9090</webapp.port>
<webapp.admin.port>9999</webapp.admin.port>
</properties>
</profile>
</profiles>
</profilesXml>

0 Comments: