Intersult Live is a very simple product for live mapping of workspace file into deployment. All is managed by slim live.xml configurations. Using maven build process, just copy the examples into your resource path without any changes.
Intersult Live works together with Dynamic Code Evolution:
Note: If you have problems using the Dynamic Code Evolution patch with Eclipse or other applications, you should use a copy of your VM eg. C:\Java\jdk1.6.0_23 -> C:\Java\jdk1.6.0_23dce.
<?xml version="1.0" encoding="UTF-8"?> <live xmlns="http://intersult.com/live/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://intersult.com/live/1.0 http://repository.intersult.com"> <mapping source="C\:\Java\workspace-helios\com.intersult\public\jsf-desktop\target/classes" target="/"/> </live>
The live.xml has to be located in the root directory of the resulting JAR file. It is independent using \ or / as path separators, paths are normalized.
In most cases you want to exclude mapping of files in /META-INF, because this would break the system JAR loader:
<?xml version="1.0" encoding="UTF-8"?> <live xmlns="http://intersult.com/live/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://intersult.com/live/1.0 http://repository.intersult.com"> <mapping source="C:/<your-path>/classes" target="/"> <exclude path="/META-INF*"/> </mapping> </live>
In most cases there is only some static compiler stuff.
<project> ... <build> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>**/*.properties</exclude> </excludes> <filtering>true</filtering> </resource> </resources> </build> ... </project>
After this step you are able to use ${...}-Expressions in live.xml files: Simply JAR:
<?xml version="1.0" encoding="UTF-8"?> <live xmlns="http://intersult.com/live/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://intersult.com/live/1.0 http://repository.intersult.com/repository/com/intersult/live/1.0-SNAPSHOT/live.xsd "> <mapping source="${project.build.directory}/classes" target="/"/> </live>
JAR with resources:
<?xml version="1.0" encoding="UTF-8"?> <live xmlns="http://intersult.com/live/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://intersult.com/live/1.0 http://repository.intersult.com/repository/com/intersult/live/1.0-SNAPSHOT/live.xsd "> <mapping source="${project.build.directory}/classes" target="/"> <exclude path="/META-INF*"/> </mapping> <mapping source="${basedir}/src/main/resources" target="/"/> </live>
WAR on Tomcat or JBoss:
<?xml version="1.0" encoding="UTF-8"?> <live xmlns="http://intersult.com/live/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://intersult.com/live/1.0 http://repository.intersult.com/repository/com/intersult/live/1.0-SNAPSHOT/live.xsd"> <mapping source="${project.build.directory}/classes" target="/WEB-INF/classes"/> <mapping source="${basedir}/src/main/webapp" target="/" loader="jndi:/localhost/${project.name}"> <exclude path="/META-INF*"/> </mapping> </live>
WAR on Glassfish (only difference is JNDI-location):
<?xml version="1.0" encoding="UTF-8"?> <live xmlns="http://intersult.com/live/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://intersult.com/live/1.0 http://repository.intersult.com/repository/com/intersult/live/1.0-SNAPSHOT/live.xsd"> <mapping source="${project.build.directory}/classes" target="/WEB-INF/classes"/> <mapping source="${basedir}/src/main/webapp" target="/" loader="jndi:/server/${project.name}"> <exclude path="/META-INF*"/> </mapping> </live>