uportal 3.1.1 and build filtering

13 messages Options
Embed this post
Permalink
Curtis Garman

uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
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
Arlo White

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
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.

  


[awhite.vcf]

begin:vcard
fn:Arlo White
n:White;Arlo
org:ITS;Application Integration
adr;dom:Calpoly;;Chase Hall, Room 215;San Luis Obispo;CA
email;internet:[hidden email]
title:Analyst/Programmer
tel;work:(805) 756-5211
x-mozilla-html:TRUE
version:2.1
end:vcard




smime.p7s (4K) Download Attachment
Curtis Garman

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
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
aaronbrown

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
In reply to this post by Curtis Garman
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.

What exactly do you need to customize in log4j configs for each tomcat?
 We use multiple tomcats per server and use log4j's built-in
${catalina.base} property to automagically reference each individual
tomcat's root.  The same log4j config file is distributed to every
tomcat, and they all use their own "logs" directories.

 - Aaron

--
Aaron Brown ([hidden email] | 785-864-0462)
University of Kansas
  Information Services
    System Design
      Enterprise System Integration
        Developer


smime.p7s (9K) Download Attachment
Curtis Garman

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
Aaron,

Are your tomcat instances on the same server or different servers?
Mine are on the same server...so not sure that ${catalina.base} would
do it...each instance of tomcat would need it's own environment
variable wouldn't it?...I don't want my build dependent on a list of
environment variables that are dependent on one machine. If you can
explain your setup further, I would appreciate it.

Curtis

On Thu, Oct 15, 2009 at 1:38 PM, Aaron Brown <[hidden email]> wrote:

> 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.
>
> What exactly do you need to customize in log4j configs for each tomcat?
>  We use multiple tomcats per server and use log4j's built-in
> ${catalina.base} property to automagically reference each individual
> tomcat's root.  The same log4j config file is distributed to every
> tomcat, and they all use their own "logs" directories.
>
>  - Aaron
>
> --
> Aaron Brown ([hidden email] | 785-864-0462)
> University of Kansas
>  Information Services
>    System Design
>      Enterprise System Integration
>        Developer
>



--
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

aaronbrown

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
Curtis Garman wrote:
> Are your tomcat instances on the same server or different servers?
> Mine are on the same server...so not sure that ${catalina.base} would
> do it...each instance of tomcat would need it's own environment
> variable wouldn't it?...I don't want my build dependent on a list of
> environment variables that are dependent on one machine. If you can
> explain your setup further, I would appreciate it.

In our production environment, we have three servers with six tomcat
instances each.  They are each fully self-sufficient copies (no shared
files between them), and they all use identical log4j.properties files,
thanks to the ${catalina.base} property.

Here is the relevant snippet from our log4j.properties file, with some
placeholder names:

log4j.appender.Whatever.File=${catalina.base}/logs/SomeLogFile.log

Log4j is smart enough to detect the root of the tomcat which executed
it, and uses that for its path.

 - Aaron

--
Aaron Brown ([hidden email] | 785-864-0462)
University of Kansas
  Information Services
    System Design
      Enterprise System Integration
        Developer


smime.p7s (9K) Download Attachment
Curtis Garman

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
hmm...ok, I'll try it...that's exactly what I'm trying to accomplish

On Thu, Oct 15, 2009 at 3:47 PM, Aaron Brown <[hidden email]> wrote:

> Curtis Garman wrote:
>> Are your tomcat instances on the same server or different servers?
>> Mine are on the same server...so not sure that ${catalina.base} would
>> do it...each instance of tomcat would need it's own environment
>> variable wouldn't it?...I don't want my build dependent on a list of
>> environment variables that are dependent on one machine. If you can
>> explain your setup further, I would appreciate it.
>
> In our production environment, we have three servers with six tomcat
> instances each.  They are each fully self-sufficient copies (no shared
> files between them), and they all use identical log4j.properties files,
> thanks to the ${catalina.base} property.
>
> Here is the relevant snippet from our log4j.properties file, with some
> placeholder names:
>
> log4j.appender.Whatever.File=${catalina.base}/logs/SomeLogFile.log
>
> Log4j is smart enough to detect the root of the tomcat which executed
> it, and uses that for its path.
>
>  - Aaron
>
> --
> Aaron Brown ([hidden email] | 785-864-0462)
> University of Kansas
>  Information Services
>    System Design
>      Enterprise System Integration
>        Developer
>



--
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

Curtis Garman

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
Aaron, that worked beautifully...exactly what I was needing to
accomplish...I still may do some filtering too later too but that is
definitely a much cleaner way to handle the log4j config...seems to me

log4j.appender.R.File=${catalina.base}/logs/portal.log

should be the default config for the portal and all jasig
portlets...seems like a good "convention over configuration"


On Thu, Oct 15, 2009 at 3:50 PM, Curtis Garman <[hidden email]> wrote:

> hmm...ok, I'll try it...that's exactly what I'm trying to accomplish
>
> On Thu, Oct 15, 2009 at 3:47 PM, Aaron Brown <[hidden email]> wrote:
>> Curtis Garman wrote:
>>> Are your tomcat instances on the same server or different servers?
>>> Mine are on the same server...so not sure that ${catalina.base} would
>>> do it...each instance of tomcat would need it's own environment
>>> variable wouldn't it?...I don't want my build dependent on a list of
>>> environment variables that are dependent on one machine. If you can
>>> explain your setup further, I would appreciate it.
>>
>> In our production environment, we have three servers with six tomcat
>> instances each.  They are each fully self-sufficient copies (no shared
>> files between them), and they all use identical log4j.properties files,
>> thanks to the ${catalina.base} property.
>>
>> Here is the relevant snippet from our log4j.properties file, with some
>> placeholder names:
>>
>> log4j.appender.Whatever.File=${catalina.base}/logs/SomeLogFile.log
>>
>> Log4j is smart enough to detect the root of the tomcat which executed
>> it, and uses that for its path.
>>
>>  - Aaron
>>
>> --
>> Aaron Brown ([hidden email] | 785-864-0462)
>> University of Kansas
>>  Information Services
>>    System Design
>>      Enterprise System Integration
>>        Developer
>>
>
>
>
> --
> Curtis Garman
> Web Programmer
> Heartland Community College
>



--
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

Curtis Garman

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
Aaron, one more question...you mentioned you have three servers...how
do you handle your project source code? Do you have a copy of the
project files on each server to be able to redeploy or do you have a
script or something that deploys across servers or what?

Curtis

On Fri, Oct 16, 2009 at 10:29 AM, Curtis Garman <[hidden email]> wrote:

> Aaron, that worked beautifully...exactly what I was needing to
> accomplish...I still may do some filtering too later too but that is
> definitely a much cleaner way to handle the log4j config...seems to me
>
> log4j.appender.R.File=${catalina.base}/logs/portal.log
>
> should be the default config for the portal and all jasig
> portlets...seems like a good "convention over configuration"
>
>
> On Thu, Oct 15, 2009 at 3:50 PM, Curtis Garman <[hidden email]> wrote:
>> hmm...ok, I'll try it...that's exactly what I'm trying to accomplish
>>
>> On Thu, Oct 15, 2009 at 3:47 PM, Aaron Brown <[hidden email]> wrote:
>>> Curtis Garman wrote:
>>>> Are your tomcat instances on the same server or different servers?
>>>> Mine are on the same server...so not sure that ${catalina.base} would
>>>> do it...each instance of tomcat would need it's own environment
>>>> variable wouldn't it?...I don't want my build dependent on a list of
>>>> environment variables that are dependent on one machine. If you can
>>>> explain your setup further, I would appreciate it.
>>>
>>> In our production environment, we have three servers with six tomcat
>>> instances each.  They are each fully self-sufficient copies (no shared
>>> files between them), and they all use identical log4j.properties files,
>>> thanks to the ${catalina.base} property.
>>>
>>> Here is the relevant snippet from our log4j.properties file, with some
>>> placeholder names:
>>>
>>> log4j.appender.Whatever.File=${catalina.base}/logs/SomeLogFile.log
>>>
>>> Log4j is smart enough to detect the root of the tomcat which executed
>>> it, and uses that for its path.
>>>
>>>  - Aaron
>>>
>>> --
>>> Aaron Brown ([hidden email] | 785-864-0462)
>>> University of Kansas
>>>  Information Services
>>>    System Design
>>>      Enterprise System Integration
>>>        Developer
>>>
>>
>>
>>
>> --
>> Curtis Garman
>> Web Programmer
>> Heartland Community College
>>
>
>
>
> --
> Curtis Garman
> Web Programmer
> Heartland Community College
>



--
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

aaronbrown

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
Curtis Garman wrote:
> Aaron, one more question...you mentioned you have three servers...how
> do you handle your project source code? Do you have a copy of the
> project files on each server to be able to redeploy or do you have a
> script or something that deploys across servers or what?

We have a test system, used by our QA team for final testing before
release, which is as close a copy to our production system as possible.
 We build our production code there (as .war files) and use a script to
deploy to all the servers/tomcats.  We have more production servers than
the ones I mentioned, but the others are VMs with one tomcat each -
their performance isn't as good as a real hardware server, so they're
mostly useful during peak usage times.  In all, it makes for quite a few
tomcat instances, so we've been using deployment scripts for some time
now and it works pretty well for us.

 - Aaron

--
Aaron Brown ([hidden email] | 785-864-0462)
University of Kansas
  Information Services
    System Design
      Enterprise System Integration
        Developer


smime.p7s (9K) Download Attachment
Cris J Holdorph

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
In reply to this post by Curtis Garman
Curtis, if you create a JIRA (and a patch if you can), I'll get this
applied to uPortal trunk.  I've wanted this change for a VERY long time
and did not know about this either.

---- Cris J H

Curtis Garman wrote:

> Aaron, that worked beautifully...exactly what I was needing to
> accomplish...I still may do some filtering too later too but that is
> definitely a much cleaner way to handle the log4j config...seems to me
>
> log4j.appender.R.File=${catalina.base}/logs/portal.log
>
> should be the default config for the portal and all jasig
> portlets...seems like a good "convention over configuration"
>
>
> On Thu, Oct 15, 2009 at 3:50 PM, Curtis Garman <[hidden email]> wrote:
>> hmm...ok, I'll try it...that's exactly what I'm trying to accomplish
>>
>> On Thu, Oct 15, 2009 at 3:47 PM, Aaron Brown <[hidden email]> wrote:
>>> Curtis Garman wrote:
>>>> Are your tomcat instances on the same server or different servers?
>>>> Mine are on the same server...so not sure that ${catalina.base} would
>>>> do it...each instance of tomcat would need it's own environment
>>>> variable wouldn't it?...I don't want my build dependent on a list of
>>>> environment variables that are dependent on one machine. If you can
>>>> explain your setup further, I would appreciate it.
>>> In our production environment, we have three servers with six tomcat
>>> instances each.  They are each fully self-sufficient copies (no shared
>>> files between them), and they all use identical log4j.properties files,
>>> thanks to the ${catalina.base} property.
>>>
>>> Here is the relevant snippet from our log4j.properties file, with some
>>> placeholder names:
>>>
>>> log4j.appender.Whatever.File=${catalina.base}/logs/SomeLogFile.log
>>>
>>> Log4j is smart enough to detect the root of the tomcat which executed
>>> it, and uses that for its path.
>>>
>>>  - Aaron
>>>
>>> --
>>> Aaron Brown ([hidden email] | 785-864-0462)
>>> University of Kansas
>>>  Information Services
>>>    System Design
>>>      Enterprise System Integration
>>>        Developer
>>>
>>
>>
>> --
>> 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
Curtis Garman

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
Cris,

Honestly about all I know how to do with subversion at the moment is
checkout...but I did create a JIRA...if you have a good link about
creating/working with patches that would be helpful.

On Wed, Oct 21, 2009 at 10:39 AM, Cris J Holdorph <[hidden email]> wrote:

> Curtis, if you create a JIRA (and a patch if you can), I'll get this applied
> to uPortal trunk.  I've wanted this change for a VERY long time and did not
> know about this either.
>
> ---- Cris J H
>
> Curtis Garman wrote:
>>
>> Aaron, that worked beautifully...exactly what I was needing to
>> accomplish...I still may do some filtering too later too but that is
>> definitely a much cleaner way to handle the log4j config...seems to me
>>
>> log4j.appender.R.File=${catalina.base}/logs/portal.log
>>
>> should be the default config for the portal and all jasig
>> portlets...seems like a good "convention over configuration"
>>
>>
>> On Thu, Oct 15, 2009 at 3:50 PM, Curtis Garman <[hidden email]>
>> wrote:
>>>
>>> hmm...ok, I'll try it...that's exactly what I'm trying to accomplish
>>>
>>> On Thu, Oct 15, 2009 at 3:47 PM, Aaron Brown <[hidden email]> wrote:
>>>>
>>>> Curtis Garman wrote:
>>>>>
>>>>> Are your tomcat instances on the same server or different servers?
>>>>> Mine are on the same server...so not sure that ${catalina.base} would
>>>>> do it...each instance of tomcat would need it's own environment
>>>>> variable wouldn't it?...I don't want my build dependent on a list of
>>>>> environment variables that are dependent on one machine. If you can
>>>>> explain your setup further, I would appreciate it.
>>>>
>>>> In our production environment, we have three servers with six tomcat
>>>> instances each.  They are each fully self-sufficient copies (no shared
>>>> files between them), and they all use identical log4j.properties files,
>>>> thanks to the ${catalina.base} property.
>>>>
>>>> Here is the relevant snippet from our log4j.properties file, with some
>>>> placeholder names:
>>>>
>>>> log4j.appender.Whatever.File=${catalina.base}/logs/SomeLogFile.log
>>>>
>>>> Log4j is smart enough to detect the root of the tomcat which executed
>>>> it, and uses that for its path.
>>>>
>>>>  - Aaron
>>>>
>>>> --
>>>> Aaron Brown ([hidden email] | 785-864-0462)
>>>> University of Kansas
>>>>  Information Services
>>>>   System Design
>>>>     Enterprise System Integration
>>>>       Developer
>>>>
>>>
>>>
>>> --
>>> 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
>



--
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

Cris J Holdorph

Re: uportal 3.1.1 and build filtering

Reply Threaded More More options
Print post
Permalink
svn diff filename1 filename2...  > patch.txt

so if you modified log4j.properties it might look like

svn diff uportal-war/src/main/webapp/WEB-INF/log4j.properties > patch.txt

if you then 'read' the patch.txt file, it should look reasonable for the
changes you made.

---- Cris J H

Curtis Garman wrote:

> Cris,
>
> Honestly about all I know how to do with subversion at the moment is
> checkout...but I did create a JIRA...if you have a good link about
> creating/working with patches that would be helpful.
>
> On Wed, Oct 21, 2009 at 10:39 AM, Cris J Holdorph <[hidden email]> wrote:
>> Curtis, if you create a JIRA (and a patch if you can), I'll get this applied
>> to uPortal trunk.  I've wanted this change for a VERY long time and did not
>> know about this either.
>>
>> ---- Cris J H
>>
>> Curtis Garman wrote:
>>> Aaron, that worked beautifully...exactly what I was needing to
>>> accomplish...I still may do some filtering too later too but that is
>>> definitely a much cleaner way to handle the log4j config...seems to me
>>>
>>> log4j.appender.R.File=${catalina.base}/logs/portal.log
>>>
>>> should be the default config for the portal and all jasig
>>> portlets...seems like a good "convention over configuration"
>>>
>>>
>>> On Thu, Oct 15, 2009 at 3:50 PM, Curtis Garman <[hidden email]>
>>> wrote:
>>>> hmm...ok, I'll try it...that's exactly what I'm trying to accomplish
>>>>
>>>> On Thu, Oct 15, 2009 at 3:47 PM, Aaron Brown <[hidden email]> wrote:
>>>>> Curtis Garman wrote:
>>>>>> Are your tomcat instances on the same server or different servers?
>>>>>> Mine are on the same server...so not sure that ${catalina.base} would
>>>>>> do it...each instance of tomcat would need it's own environment
>>>>>> variable wouldn't it?...I don't want my build dependent on a list of
>>>>>> environment variables that are dependent on one machine. If you can
>>>>>> explain your setup further, I would appreciate it.
>>>>> In our production environment, we have three servers with six tomcat
>>>>> instances each.  They are each fully self-sufficient copies (no shared
>>>>> files between them), and they all use identical log4j.properties files,
>>>>> thanks to the ${catalina.base} property.
>>>>>
>>>>> Here is the relevant snippet from our log4j.properties file, with some
>>>>> placeholder names:
>>>>>
>>>>> log4j.appender.Whatever.File=${catalina.base}/logs/SomeLogFile.log
>>>>>
>>>>> Log4j is smart enough to detect the root of the tomcat which executed
>>>>> it, and uses that for its path.
>>>>>
>>>>>  - Aaron
>>>>>
>>>>> --
>>>>> Aaron Brown ([hidden email] | 785-864-0462)
>>>>> University of Kansas
>>>>>  Information Services
>>>>>   System Design
>>>>>     Enterprise System Integration
>>>>>       Developer
>>>>>
>>>>
>>>> --
>>>> 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
>>
>
>
>

---
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