Jonah,

Here are the steps what i compiled openmrs and deployed it on JBoss:

 1. Check Out OpenMRS From trunk repository
http://svn.openmrs.org/openmrs/trunk (On my pc, i name it as Openmrs-trunk)
 2. Create a directory named webapp_jboss (Openmrs-trunk/webapp_jboss), it
means creating another maven module
 3. In this new derectory, create a new pom file which overlays the war file
of tomcat and exclude some jar files(jta*.jar, xml-api*.jar,
xercesImpl*.jar), see attached file. Because these libraries are already
existed in JBoss.
 4. In parent pom.xml(Openmrs-trunk/pom.xml), fine the blocks module and add
another module called webapp_jboss, it will look like
   <modules>
                <module>tools</module>
                <module>test</module>
                <module>api</module>
                <module>web</module>
                <module>webapp</module>
                <module>webapp_jboss</module>
        </modules>
 5 Compile the project. 
 6. After compiling succesfully, you will see 2 files of openmrs.war 
      - Openmrs-trunk/webapp/target/openmrs.war for Tomcat
      - Openmrs-trunk/webapp_jboss/target/openmrs.war for JBoss
 7. Download JBoss 5.0 or upper at http://www.jboss.org/jbossas/downloads/
(I currently use JBoss 6.0.0.Final)
 8. Create a JBoss oponmrs server "jboss_path/server/openmrs/" by cloning
the content from "jboss_path/server/default/"
 9. Copy openmrs.war that we already compiled for JBoss to
"jboss_path/server/openmrs/deploy"
 10. Use the command line and goto directory "jboss_path/bin/"
 11. And run: ./run.sh -c openmrs (on windows run.bat -c openmrs) for
deploying openmrs application


Hope that this can help you.

Sokha.

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
   <parent>
      <groupId>org.openmrs</groupId>
      <artifactId>openmrs</artifactId>
      <version>1.9.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.openmrs.web</groupId>
   <artifactId>openmrs-webapp-jboss</artifactId>
   <packaging>war</packaging>
   <name>openmrs-webapp-jboss</name>
   <description>The web application of openmrs for jboss</description>

   <dependencies>
      <dependency>
         <groupId>org.openmrs.web</groupId>
         <artifactId>openmrs-webapp</artifactId>
         <version>${project.version}</version>
         <type>war</type>
         <scope>runtime</scope>
      </dependency>
   </dependencies>

   <build>
      <finalName>${webapp.name}</finalName>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1-beta-1</version>
            <configuration>
	            <overlays>
		            <overlay>
		              <groupId>org.openmrs.web</groupId>
		              <artifactId>openmrs-webapp</artifactId>
		              <excludes>
		                <exclude>WEB-INF/lib/jta*.jar</exclude>
		                <exclude>WEB-INF/lib/xml-api*.jar</exclude>
		                <exclude>WEB-INF/lib/xercesImpl*.jar</exclude>
		              </excludes>
		            </overlay>
	            </overlays>
            </configuration>
         </plugin>
      </plugins>
   </build>
   <properties>
      <WEBAPP.DISPLAY.NAME>OpenMRS Jboss</WEBAPP.DISPLAY.NAME>
      <WEBAPP.DESCRIPTION>An Open-Source EMR System</WEBAPP.DESCRIPTION>
      <webapp.name>openmrs</webapp.name>
   </properties>
</project>

Reply via email to