MARVELOUS STUFFS

Another personal blog by Rolly Ferolino

How to merge svn trunk to a branch

leave a comment

I am always forgetting the commands to merge, so here it is.

To merge from revision 1001 in the branch directory to the latest in the trunk.

svn merge -r 1001:HEAD https://svn.dev.your/repo/trunk/src .

or this works too

svn merge https://svn.dev.your/repo/trunk/src .

Then commit the merged files from the branch working directory.

svn ci -m "commit merged files from trunk"

Written by rolly.ferolino

June 21st, 2011 at 6:28 am

How to store property and config files in tomcat/conf — outside of WAR

leave a comment

The simplest way I know is to declare in spring or web.xml that the properties are loaded via classpath. For example, in web.xml

    
log4jConfigLocation
classpath:log4j.xml
    

Or in spring context file:

 


                classpath:application.properties
                classpath:build.properties
            
        
    

Then open tomcat/conf/catalina.properties file and modify the following line:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/conf

Notice, I added ${catalina.home}/conf at the end of the line.

Now copy the file to tomcat/conf, exclude the file when you package your project. For example, in my application that I am using maven:

    
            
                src/main/resources
                true
                
                    application.properties
                    security.properties
                    log4j.xml
                
            
        

Then restart tomcat.

Written by rolly.ferolino

June 16th, 2011 at 4:27 pm

Posted in Uncategorized