You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ve...@apache.org on 2009/05/24 15:02:18 UTC

svn commit: r778136 - in /synapse/trunk/java: ./ modules/distribution/ modules/distribution/src/main/assembly/ modules/patches/ modules/patches/jars/ modules/patches/src/ modules/patches/src/main/ modules/patches/src/main/assembly/ modules/war/ patches/

Author: veithen
Date: Sun May 24 13:02:17 2009
New Revision: 778136

URL: http://svn.apache.org/viewvc?rev=778136&view=rev
Log:
SYNAPSE-524: Modified the web app so that the patches are added to WEB-INF/classes. Also made the patches available as a Maven artifact so that users can refer to them in their own projects.

Added:
    synapse/trunk/java/modules/patches/
    synapse/trunk/java/modules/patches/jars/
    synapse/trunk/java/modules/patches/jars/httpcore-nio-4.0-patch-httpcore-193.jar
      - copied unchanged from r774656, synapse/trunk/java/patches/httpcore-nio-4.0-patch-httpcore-193.jar
    synapse/trunk/java/modules/patches/pom.xml   (with props)
    synapse/trunk/java/modules/patches/src/
    synapse/trunk/java/modules/patches/src/main/
    synapse/trunk/java/modules/patches/src/main/assembly/
    synapse/trunk/java/modules/patches/src/main/assembly/jars.xml   (with props)
Removed:
    synapse/trunk/java/patches/
Modified:
    synapse/trunk/java/modules/distribution/pom.xml
    synapse/trunk/java/modules/distribution/src/main/assembly/bin.xml
    synapse/trunk/java/modules/war/pom.xml
    synapse/trunk/java/pom.xml

Modified: synapse/trunk/java/modules/distribution/pom.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/distribution/pom.xml?rev=778136&r1=778135&r2=778136&view=diff
==============================================================================
--- synapse/trunk/java/modules/distribution/pom.xml (original)
+++ synapse/trunk/java/modules/distribution/pom.xml Sun May 24 13:02:17 2009
@@ -130,6 +130,15 @@
             <artifactId>xmltask</artifactId>
             <version>1.14</version>
         </dependency>
+        
+        <!-- Patches -->
+        <dependency>
+            <groupId>org.apache.synapse</groupId>
+            <artifactId>synapse-patches</artifactId>
+            <version>${pom.version}</version>
+            <classifier>jars</classifier>
+            <type>zip</type>
+        </dependency>
     </dependencies>
 
     <repositories>

Modified: synapse/trunk/java/modules/distribution/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/distribution/src/main/assembly/bin.xml?rev=778136&r1=778135&r2=778136&view=diff
==============================================================================
--- synapse/trunk/java/modules/distribution/src/main/assembly/bin.xml (original)
+++ synapse/trunk/java/modules/distribution/src/main/assembly/bin.xml Sun May 24 13:02:17 2009
@@ -180,15 +180,6 @@
         <!--<include>synapse.jar</include>-->
         <!--</includes>-->
         <!--</fileSet>-->
-
-        <fileSet>
-            <directory>../../patches</directory>
-            <outputDirectory>synapse-${synapse.version}/lib/patches</outputDirectory>
-            <includes>
-                <include>*.jar</include>
-                <include>patches.txt</include>                
-            </includes>
-        </fileSet>
     </fileSets>
     <files>
         <file>
@@ -234,6 +225,7 @@
             <useProjectArtifact>false</useProjectArtifact>
             <outputDirectory>synapse-${synapse.version}/lib</outputDirectory>
             <excludes>
+                <exclude>org.apache.synapse:synapse-patches:zip:jars</exclude>
                 <exclude>org.apache.axis2:addressing:mar</exclude>
                 <exclude>org.apache.rampart:rampart:mar</exclude>
                 <exclude>org.apache.sandesha2:sandesha2:mar</exclude>
@@ -257,6 +249,14 @@
                 <exclude>org.apache.qpid:qpid-client:jar</exclude>
                 <exclude>com.oopsconsultancy:xmltask:jar</exclude>
             </excludes>
+        </dependencySet>
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>synapse-${synapse.version}/lib/patches</outputDirectory>
+            <unpack>true</unpack>
+            <includes>
+                <include>org.apache.synapse:synapse-patches:zip:jars</include>
+            </includes>
         </dependencySet>
         <dependencySet>
             <useProjectArtifact>false</useProjectArtifact>

Added: synapse/trunk/java/modules/patches/pom.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/patches/pom.xml?rev=778136&view=auto
==============================================================================
--- synapse/trunk/java/modules/patches/pom.xml (added)
+++ synapse/trunk/java/modules/patches/pom.xml Sun May 24 13:02:17 2009
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~ 
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+<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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.synapse</groupId>
+        <artifactId>Apache-Synapse</artifactId>
+        <version>SNAPSHOT</version>
+        <relativePath>../../../pom.xml</relativePath>
+    </parent>
+    <artifactId>synapse-patches</artifactId>
+    <packaging>jar</packaging>
+    <name>Apache Synapse - Patches</name>
+    <description>
+        Contains patches for dependencies of Synapse. The project's main artifact is a JAR file
+        containing all the patched classes. It also attaches a ZIP file with the individual JAR
+        files.
+    </description>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <unjar dest="${project.build.outputDirectory}">
+                                    <fileset dir="${basedir}/jars">
+                                        <include name="**/*.jar"/>
+                                    </fileset>
+                                </unjar>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.2-beta-2</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <attach>true</attach>
+                            <descriptors>
+                                <descriptor>src/main/assembly/jars.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: synapse/trunk/java/modules/patches/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: synapse/trunk/java/modules/patches/src/main/assembly/jars.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/patches/src/main/assembly/jars.xml?rev=778136&view=auto
==============================================================================
--- synapse/trunk/java/modules/patches/src/main/assembly/jars.xml (added)
+++ synapse/trunk/java/modules/patches/src/main/assembly/jars.xml Sun May 24 13:02:17 2009
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+<assembly>
+    <id>jars</id>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <formats>
+        <format>zip</format>
+    </formats>
+    <fileSets>
+        <fileSet>
+            <directory>jars</directory>
+            <outputDirectory>/</outputDirectory>
+            <includes>
+                <include>*.jar</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+</assembly>
\ No newline at end of file

Propchange: synapse/trunk/java/modules/patches/src/main/assembly/jars.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: synapse/trunk/java/modules/war/pom.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/war/pom.xml?rev=778136&r1=778135&r2=778136&view=diff
==============================================================================
--- synapse/trunk/java/modules/war/pom.xml (original)
+++ synapse/trunk/java/modules/war/pom.xml Sun May 24 13:02:17 2009
@@ -70,6 +70,13 @@
             <groupId>org.apache.axis2</groupId>
             <artifactId>axis2-transport-mail</artifactId>
         </dependency>
+        
+        <!-- The patches -->
+        <dependency>
+            <groupId>org.apache.synapse</groupId>
+            <artifactId>synapse-patches</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
     </dependencies>
 
     <build>
@@ -78,7 +85,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.0-alpha-1</version>
+                <version>2.1</version>
                 <executions>
                     <execution>
                         <id>copy</id>
@@ -112,6 +119,20 @@
                             </artifactItems>
                         </configuration>
                     </execution>
+                    <execution>
+                        <!-- This will add the patches to WEB-INF/classes. This makes sure that they have priority
+                             over the original classes (which are still in the JARs in WEB-INF/lib). -->
+                        <id>unpack-patches</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>synapse-patches</includeArtifactIds>
+                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                            <excludes>META-INF/**/*</excludes>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
 
@@ -125,6 +146,7 @@
                         <addMavenDescriptor>false</addMavenDescriptor>
                     </archive>
                     <outputDirectory>target</outputDirectory>
+                    <packagingExcludes>WEB-INF/lib/synapse-patches-*.jar</packagingExcludes>
                     <webResources>
                         <resource>
                             <directory>../../repository</directory>

Modified: synapse/trunk/java/pom.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/pom.xml?rev=778136&r1=778135&r2=778136&view=diff
==============================================================================
--- synapse/trunk/java/pom.xml (original)
+++ synapse/trunk/java/pom.xml Sun May 24 13:02:17 2009
@@ -787,6 +787,7 @@
         <module>modules/core</module>
         <module>modules/extensions</module>
         <module>modules/samples</module>
+        <module>modules/patches</module>
         <module>modules/war</module>
         <module>modules/handler</module>
         <module>modules/xar-maven-plugin</module>