Author: solomax
Date: Fri May 18 08:59:15 2012
New Revision: 1340036

URL: http://svn.apache.org/viewvc?rev=1340036&view=rev
Log:
MySQL JDBC driver is downloaded on demand, LICENSE and NOTICE are added to 
META-INF of all distributed jars

Modified:
    incubator/openmeetings/trunk/singlewebapp/.classpath
    incubator/openmeetings/trunk/singlewebapp/build.xml
    incubator/openmeetings/trunk/singlewebapp/ivy.xml

Modified: incubator/openmeetings/trunk/singlewebapp/.classpath
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/.classpath?rev=1340036&r1=1340035&r2=1340036&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/.classpath (original)
+++ incubator/openmeetings/trunk/singlewebapp/.classpath Fri May 18 08:59:15 
2012
@@ -101,7 +101,6 @@
        <classpathentry kind="lib" path="build/lib/om/dom4j-jar-1.6.1.jar"/>
        <classpathentry kind="lib" path="build/lib/om/fop-jar-1.0.jar"/>
        <classpathentry kind="lib" path="build/lib/om/mail-jar-1.4.4.jar"/>
-       <classpathentry kind="lib" 
path="build/lib/om/mysql-connector-java-jar-5.1.9.jar"/>
        <classpathentry kind="lib" 
path="build/lib/om/postgresql-jar-9.1-901.jdbc4.jar"/>
        <classpathentry kind="lib" path="build/lib/om/serp-jar-1.13.1.jar"/>
        <classpathentry kind="lib" path="build/lib/om/velocity-jar-1.7.jar"/>

Modified: incubator/openmeetings/trunk/singlewebapp/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/build.xml?rev=1340036&r1=1340035&r2=1340036&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/build.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/build.xml Fri May 18 08:59:15 2012
@@ -190,13 +190,12 @@
 
                <chmod dir="${red5.root}" perm="755" includes="**/*.sh" />
 
+               <antcall target="-process-db" inheritAll="true" 
inheritRefs="true"/>
                <copy todir="${dist.persistence.dir}">
                        <fileset file="src/META-INF/*.xml">
                                <exclude name="services.xml" />
                        </fileset>
                </copy>
-               <echo message="db.provider == ${db}"/>
-               <copy file="src/META-INF/${db}_persistence.xml" 
tofile="${dist.persistence.dir}/persistence.xml" overwrite="true"/>
 
                <!-- add language files from .war version -->
                <copy todir="${dist.webapps.dir}/languages">
@@ -277,10 +276,16 @@
                        <fileset dir="src/">
                                <include name="META-INF/services.xml" />
                        </fileset>
+                       <fileset dir="${main.out.dir}">
+                               <include name="META-INF/LICENSE" />
+                               <include name="META-INF/NOTICE" />
+                       </fileset>
                </jar>
                <jar 
destfile="${dist.webapps.dir}/WEB-INF/lib/openmeetings-WebService-${jar.suffix}.jar">
                        <fileset dir="${main.out.dir}">
                                <include name="**/openmeetings/axis/**" />
+                               <include name="META-INF/LICENSE" />
+                               <include name="META-INF/NOTICE" />
                        </fileset>
                </jar>
        </target>
@@ -298,6 +303,8 @@
                <jar destfile="${screenshare.out.dir}/red5-screenshare.jar">
                        <fileset dir="${main.out.dir}">
                                <include name="org/openmeetings/screen/**" />
+                               <include name="META-INF/LICENSE" />
+                               <include name="META-INF/NOTICE" />
                        </fileset>
                        <fileset 
file="${red5-screenshare.resources}/logback.xml"/>
                        <manifest>
@@ -410,6 +417,8 @@
                        <classpath refid="compile.classpath" />
                        <compilerarg value="-Aopenjpa.metamodel=true" />
                </javac>
+               <copy file="LICENSE" tofile="${main.out.dir}/META-INF/LICENSE" 
overwrite="true"/>
+               <copy file="NOTICE" tofile="${main.out.dir}/META-INF/NOTICE" 
overwrite="true"/>
        </target>
 
        <target name="doStartServer" depends="compile">
@@ -678,6 +687,8 @@
                <available classpathref="anakia.classpath" 
classname="org.apache.oro.text.GlobCompiler" property="anakia.installed"/>
                <available classpathref="rat.classpath" 
classname="org.apache.rat.Report" property="rat.installed"/>
                <available classpathref="svntask.classpath" 
classname="org.tmatesoft.svn.core.SVNCommitInfo" property="svntask.installed"/>
+               <available classpathref="compile.classpath" 
classname="com.mysql.jdbc.Driver" property="mysql.installed"/>
+               <available classpathref="compile.classpath" 
classname="org.apache.derby.jdbc.ClientDriver" property="derby.installed"/>
                <available file="${laszlo.home}/WEB-INF/lib" type="dir" 
property="laszlo.installed"/>
                <available file="${red5.lib}/red5.sh" type="file" 
property="red5.installed"/>
        </target>
@@ -829,6 +840,35 @@
                        <param name="ivy.lib.location" value="${red5.lib}"/>
                </antcall>
        </target>
+                       
+       <target name="-retrieve-db2" unless="db2.installed" 
description="Retrieves the libraries if needed" depends="-availability-check">
+               <!-- empty -->
+       </target>
+       
+       <target name="-retrieve-derby" unless="derby.installed" 
description="Retrieves the libraries if needed" depends="-availability-check">
+               <!-- retrieved automatically, added for compatibility -->
+       </target>
+       
+       <target name="-retrieve-mysql" unless="mysql.installed" 
description="Retrieves the libraries if needed" depends="-availability-check">
+               <antcall target="-retrieve" inheritAll="true" 
inheritRefs="true">
+                       <param name="ivy.conf.name" value="mysql"/>
+                       <param name="ivy.lib.location" value="${om.lib.dir}"/>
+               </antcall>
+       </target>
+       
+       <target name="-retrieve-oracle" unless="oracle.installed" 
description="Retrieves the libraries if needed" depends="-availability-check">
+               <!-- empty -->
+       </target>
+       
+       <target name="-retrieve-postgres" unless="postgres.installed" 
description="Retrieves the libraries if needed" depends="-availability-check">
+               <!-- retrieved automatically, added for compatibility -->
+       </target>
+       
+       <target name="-process-db" description="performs DB related tasks based 
on passed DB type">
+               <echo message="db.provider == ${db}"/>
+               <antcall target="-retrieve-${db}" inheritAll="true" 
inheritRefs="true"/>
+               <copy file="src/META-INF/${db}_persistence.xml" 
tofile="src/META-INF/persistence.xml" overwrite="true"/>
+       </target>
        
        <!-- Clean targets -->
        <!-- Remove classes directory for clean build -->
@@ -861,7 +901,6 @@
                <antcall target="-retrieve-tools.jar" inheritAll="true" 
inheritRefs="true"/>
                <antcall target="-retrieve-openlaszlo" inheritAll="true" 
inheritRefs="true"/>
                <antcall target="-retrieve-cmdadmin" inheritAll="true" 
inheritRefs="true"/>
-               <echo message="db.provider == ${db}"/>
-               <copy file="src/META-INF/${db}_persistence.xml" 
tofile="src/META-INF/persistence.xml" overwrite="true"/>
+               <antcall target="-process-db" inheritAll="true" 
inheritRefs="true"/>
        </target>
 </project>

Modified: incubator/openmeetings/trunk/singlewebapp/ivy.xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/ivy.xml?rev=1340036&r1=1340035&r2=1340036&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/ivy.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/ivy.xml Fri May 18 08:59:15 2012
@@ -30,6 +30,7 @@
                <conf name="dtd" description="Dtd-generator dependencies" />
                <conf name="svntask" description="Svn task dependencies" />
                <conf name="openlaszlo" description="Openlaszlo dependencies" />
+               <conf name="mysql" description="MySQL JDBC driver" />
        </configurations>
        <dependencies>
                <!--  START OF mainlib -->
@@ -165,9 +166,6 @@
                <dependency org="org.apache.derby" name="derbyclient" 
rev="10.8.2.2" conf="openmeetings->*" transitive="false">
                        <include type="jar" />
                </dependency>
-               <dependency org="mysql" name="mysql-connector-java" rev="5.1.9" 
conf="openmeetings->*" transitive="false">
-                       <include type="jar" />
-               </dependency>
                <dependency org="postgresql" name="postgresql" 
rev="9.1-901.jdbc4" conf="openmeetings->*" transitive="false">
                        <include type="jar" />
                </dependency>
@@ -289,6 +287,12 @@
                        <include type="jar" />
                </dependency>
                <!--  END OF Command Line Admin -->
+               
+               <!--  START OF MySQL Driver -->
+               <dependency org="mysql" name="mysql-connector-java" rev="5.1.9" 
conf="mysql->*" transitive="false">
+                       <include type="jar" />
+               </dependency>
+               <!--  END OF MySQL Driver -->
        </dependencies>
 </ivy-module>
 


Reply via email to