prickett    2002/10/10 20:31:35

  Modified:    periodicity project.xml
               periodicity/src/plugins-build/database maven.xml
                        plugin.jelly
  Added:       periodicity/src/plugins-build/database
                        install.user.properties
  Log:
  Added jelly to database maven file
  
  Added install.user.properties file
  
  Added a sourcesPresent jelly variable to the database maven file
  
  Added code to process and compile java code to the database maven file
  
  Added jelly to database plugin.jelly file
  
  Added a dbType jelly variable to the plugin.jelly file
  
  Added processing to create a mysql db url to the plugin.jelly file
  
  Added a database:url goal to the database plugin.jelly file
  
  Added a database:connection goal to the database plugin.jelly file
  
  Added a database:driver goal to the database plugin.jelly file
  
  Revision  Changes    Path
  1.11      +0 -1      jakarta-commons-sandbox/periodicity/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/project.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- project.xml       9 Oct 2002 18:18:50 -0000       1.10
  +++ project.xml       11 Oct 2002 03:31:35 -0000      1.11
  @@ -1,6 +1,5 @@
   <?xml version="1.0" encoding="UTF-8"?>
   <project>
  -  <property file="conf/build/build.db.users.proeprties"/>
     <pomVersion>3</pomVersion>
     <name>Periodicity</name>
     <id>periodicity</id>
  
  
  
  1.4       +27 -1     
jakarta-commons-sandbox/periodicity/src/plugins-build/database/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/maven.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- maven.xml 10 Oct 2002 22:43:08 -0000      1.3
  +++ maven.xml 11 Oct 2002 03:31:35 -0000      1.4
  @@ -1,8 +1,16 @@
  -<project default="plugin">
  +<project default="plugin" xmlns:j="jelly:core">
     
  +  <property file="install.user.properties"/>
     <property file="install.developer.properties"/>
     
  +  <j:set var="sourcesPresent" value="${periodicity.database.sources.present}"/>
  +
  +  
     <goal name="plugin">
  +    <j:if test="${sourcesPresent == 'true'}">
  +      <attainGoal name="java:compile"/>
  +      <attainGoal name="test:test"/>
  +    </j:if>  
       <mkdir dir="${periodicity.install.assembly.dir}"/>
       <copy todir="${periodicity.install.assembly.dir}">
         <fileset dir=".">
  @@ -13,6 +21,11 @@
           <exclude name="install*"/>
         </fileset>
       </copy>
  +    <j:if test="${sourcesPresent == 'true'}">
  +      <copy todir="${assemblyDir}">
  +        <fileset dir="target/classes"/>
  +      </copy>
  +    </j:if>
       <jar jarfile="${maven.build.dir}/${maven.final.name}.jar">
         <fileset dir="${periodicity.install.assembly.dir}"/>
       </jar>
  @@ -34,6 +47,19 @@
       <unzip src="${maven.build.dir}/${maven.final.name}.jar"
              dest="${maven.home}/plugins/${maven.final.name}"/>
     </goal>
  +
  +  <goal name="plugin:uninstall">
  +    <delete>
  +      <fileset dir="${maven.home}/plugins">
  +        <include name="periodicity-database*"/>
  +        <include name="periodicity-database**/**/*"/>
  +        <include name="periodicity-database-plugin-0.0.1-dev"/>
  +      </fileset>
  +    </delete>
  +    <delete>
  +      <fileset dir="${maven.home}/plugins/periodicity-database-plugin-0.0.1-dev"/>
  +    </delete>  
  +  </goal>  
   
   </project>  
     
  
  
  
  1.2       +31 -1     
jakarta-commons-sandbox/periodicity/src/plugins-build/database/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/plugin.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.jelly      10 Oct 2002 22:43:08 -0000      1.1
  +++ plugin.jelly      11 Oct 2002 03:31:35 -0000      1.2
  @@ -1,8 +1,38 @@
   <?xml version="1.0"?>
  -<project>
  +<project xmlns:j="jelly:core">
   
     <goal name="database">
       <echo>You made it to the database plugin!!!</echo>
  +  </goal>  
  +
  +  <set var="dbType" value="${periodicity.database.type}"/>
  +
  +  <j:choose>
  +    <j:when test="${dbType == '${periodicity.mysql.db.name}'">
  +      <j:choose>
  +        <j:otherwise>
  +          <echo>Setting db url for ${periodicity.database.type}</echo>
  +          <property name="derived.db.url" 
value="${periodicity.mysql.default.driver.scheme}://${periodicity.database.host}:${periodicity.database.port}/${periodicity.database.name}"/>
  +        </j:otherwise>
  +      </j:choose>
  +      <j:otherwise>
  +        <echo>Database Type "${periodicity.database.type}" is not yet 
supported</echo>
  +      </j:otherwise>  
  +    </j:when>
  +  </j:choose>  
  +      
  +      
  +  <goal name="database:url">
  +  </goal>
  +
  +  <goal name="database:connection">
  +  </goal>
  +
  +  <goal name="database:driver">
  +  </goal>
  +
  +  <goal name="view-derived-properties">
  +    <echo>derived.db.url = "${derived.db.url}"</echo>
     </goal>  
   
   </project>  
  
  
  
  1.1                  
jakarta-commons-sandbox/periodicity/src/plugins-build/database/install.user.properties
  
  Index: install.user.properties
  ===================================================================
  periodicity.database.sources.present=true
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to