[embjopr-commits] EMBJOPR SVN: r30 - trunk/core.

embjopr-commits at lists.jboss.org embjopr-commits at lists.jboss.org
Fri Oct 31 09:53:01 EDT 2008


Author: ips
Date: 2008-10-31 09:53:01 -0400 (Fri, 31 Oct 2008)
New Revision: 30

Modified:
   trunk/core/pom.xml
Log:
strip ejb-jar.xml and persistence.xml out of the core domain jar under WEB-INF/lib/ (fix for https://jira.jboss.org/jira/browse/EMBJOPR-21)


Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml	2008-10-30 15:38:13 UTC (rev 29)
+++ trunk/core/pom.xml	2008-10-31 13:53:01 UTC (rev 30)
@@ -308,6 +308,49 @@
 					<trimStackTrace>false</trimStackTrace>
 				</configuration>
 			</plugin>
+
+           <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>                
+                <executions>
+                    <execution>
+                        <id>de-ejb-domain-jar</id>
+                        <phase>package</phase>
+                        <goals><goal>run</goal></goals>
+                        <configuration>                            
+                            <tasks>
+                                 <!-- Strip out the ejb-jar.xml and persistence.xml from core domain jar, 
+                                      so AS5 will not try to deploy it as an EJB-JAR and dump warnings
+                                      about not being able to find an "RHQDS" datasource. --> 
+                                                                       
+                                 <!-- Extract the domain jar from the war. -->
+                                 <property name="deEjb.tmpDir" location="${basedir}/target/deEjb.tmp"/>
+                                 <delete dir="${deEjb.tmpDir}"/>
+                                 <mkdir dir="${deEjb.tmpDir}"/>                             
+                                 <unwar src="${basedir}/target/${project.build.finalName}.war"
+                                        dest="${deEjb.tmpDir}">
+                                     <patternset><include name="WEB-INF/lib/rhq-core-domain-${rhq.version}.jar"/></patternset>
+                                 </unwar>                             
+
+                                 <!-- Delete ejb-jar.xml and persistence.xml from the domain jar. -->
+                                 <property name="domainJar.tmpDir" location="${deEjb.tmpDir}/rhq-core-domain"/>
+                                 <property name="domainJar" location="${deEjb.tmpDir}/WEB-INF/lib/rhq-core-domain-${rhq.version}.jar"/>                                 
+                                 <mkdir dir="${domainJar.tmpDir}"/>  
+                                 <unzip dest="${domainJar.tmpDir}" src="${domainJar}"/>                                   
+                                 <delete>  
+                                    <fileset dir="${domainJar.tmpDir}" includes="META-INF/ejb-jar.xml,META-INF/persistence.xml"/>  
+                                 </delete>  
+                                 <delete file="${domainJar}"/>  
+                                 <zip destfile="${domainJar}" basedir="${domainJar.tmpDir}"/>  
+                                                                  
+                                 <!-- Stick the updated domain jar in the war. -->                                 
+                                 <war destfile="${basedir}/target/${project.build.finalName}.war"
+                                      basedir="${deEjb.tmpDir}"
+                                      update="true"/>                                 
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             
 		</plugins>
 	</build>




More information about the embjopr-commits mailing list