Arlo, thanks so much...I'll give this a go on our installation and see
if I can get it working
On Thu, Oct 15, 2009 at 12:05 PM, Arlo White <
[hidden email]> wrote:
> You have to do it with Maven. We use build.properties to configure a lot of
> different things. I've bolded the important bits that we added to the
> pom.xml files.
>
> uportal-war/pom.xml
ÿÿ ÿ <build>
ÿÿ ÿ ÿÿ <filters>
ÿÿ ÿ ÿÿ ÿÿ <filter>../build.properties</filter>
> ÿÿ ÿÿ </filters>
>ÿÿ ÿÿ ÿ <finalName>${uportal.docbase}</finalName>
> ÿÿ ÿÿ <plugins>
> ÿÿ ÿÿ ÿÿ ÿ <plugin>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <groupId>net.sf.alchim</groupId>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <artifactId>yuicompressor-maven-plugin</artifactId>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <executions>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <execution>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <goals>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <goal>compress</goal>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ </goals>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ </execution>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ </executions>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <configuration>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <excludes>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <exclude>**/*.min.js</exclude>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ </excludes>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <suffix>.min</suffix>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ </configuration>
ÿÿ ÿÿ ÿÿ ÿÿ </plugin>
> ÿÿ ÿÿ ÿÿ ÿ <plugin>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <groupId>net.sf.alchim</groupId>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <artifactId>yuicompressor-maven-plugin</artifactId>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <version>0.7.1</version>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <executions>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <execution>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <goals><goal>compress</goal></goals>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ </execution>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ </executions>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <configuration>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <excludes>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <exclude>**/*.min.js</exclude>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ </excludes>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <linebreakpos>10000</linebreakpos>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <suffix>.min</suffix>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ </configuration>
ÿÿ ÿÿ ÿÿ ÿÿ </plugin>
> ÿÿ ÿÿ ÿÿ ÿ <plugin>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <groupId>org.apache.maven.plugins</groupId>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <artifactId>maven-war-plugin</artifactId>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <version>2.0.2</version>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <configuration>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <webXml>${war-plugin-webxml-source}</webXml>
>
> <warSourceExcludes>WEB-INF/lib/uportal-impl-${project.version}.jar</warSourceExcludes>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <webResources>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <resource>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <filtering>true</filtering>
>
> <directory>${basedir}/src/main/webapp</directory>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <includes>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <include>META-INF/context.xml</include>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <include>WEB-INF/web.xml</include>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <include>WEB-INF/log4j.xml</include>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <include>help/feedback.html</include>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ </includes>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ </resource>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <resource>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <filtering>true</filtering>
>
> <directory>${basedir}/src/main/resources</directory>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <targetPath>WEB-INF/classes</targetPath>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <includes>
>
> <include>layout/theme/universality/universality.xsl</include>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ </includes>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ </resource>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ </webResources>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ </configuration>
> ÿÿ ÿÿ ÿÿ ÿ </plugin>
> [snip...]
>
> uportal-impl/pom.xml
ÿÿ ÿ <build>
ÿÿ ÿ ÿÿ <filters>
ÿÿ ÿ ÿÿ ÿÿ <filter>../build.properties</filter>
> ÿÿ ÿÿ </filters>
>ÿÿ ÿÿ ÿ <resources>
> ÿÿ ÿÿ ÿÿ ÿ <!-- This configuration will make sure all .xml and .properties
> file are copied and filtered -->
>ÿÿ ÿÿ ÿ ÿÿ <resource>
> ÿÿ ÿÿ ÿÿ ÿ ÿÿ <directory>src/main/resources</directory>
>ÿÿ ÿÿ ÿ ÿÿ ÿÿ <filtering>true</filtering>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <includes>
> ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <include>**/*.properties</include>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <include>**/*.xml</include>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ </includes>
ÿÿ ÿÿ ÿ ÿÿ ÿÿ </resource>
ÿÿ ÿ ÿÿ ÿÿ <!-- This configuration will make sure all resources are copied,
> except the .xml and .properties files -->
>ÿÿ ÿÿ ÿ ÿÿ <resource>
> ÿÿ ÿÿ ÿÿ ÿ ÿÿ <directory>src/main/resources</directory>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <excludes>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <exclude>**/*.properties</exclude>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <exclude>**/*.xml</exclude>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ </excludes>
> ÿ ÿÿ ÿÿ ÿÿ ÿ </resource>
> ÿÿ ÿÿ ÿÿ ÿ <resource>
ÿÿ ÿ ÿÿ ÿÿ ÿÿ ÿ <directory>src/main/java</directory>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ <includes>
>ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ <include>**/*.properties</include>
ÿÿ ÿÿ ÿÿ ÿÿ ÿÿ ÿ </includes>
> ÿ ÿÿ ÿÿ ÿÿ ÿ </resource>
> ÿÿ ÿÿ </resources>
>
> This will filter properties with ${PROPNAME}, for example:
> uportal-war/src/main/webapp/WEB-INF/web.xml
>ÿÿ <context-param>
> ÿÿ ÿÿ <param-name>edu.yale.its.tp.cas.proxyUrl</param-name>
ÿÿ ÿÿ ÿÿ <param-value>${casProxyUrl}</param-value>
>ÿÿ </context-param>
>
> ${casProxyUrl} will be replaced with the value from build.properties
>
>
> Curtis Garman wrote:
>
> I'm setting up an environment with multiple instances of tomcat per
> server and was wondering if someone can give me a tip on setting up my
> build to take my server.home defined in my build.properties and use
> this as the base path for my tomcat log4j configuration files via
> swapping it in in place of a variable or something so that literally
> the only thing I have to do to deploy the same configuration to each
> jvm is change the server.home value. The way the current build.xml
> file is setup (using pieces of ant and maven) I'm not sure if this
> would be done via ant or maven. Not sure how others do it, but
> something like this seems like it would be a valuable default
> configuration for the uportal build script.
>
>
>
--
Curtis Garman
Web Programmer
Heartland Community College
---
You are currently subscribed to
[hidden email] as:
[hidden email]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/uportal-user