You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by th...@apache.org on 2008/10/05 02:14:55 UTC

svn commit: r701728 - in /labs/droids/branch/LABS-144: src/templates/component/DROIDS-README.txt src/templates/component/NOTICE.txt src/templates/component/ivy.xml targets/plugins.xml

Author: thorsten
Date: Sat Oct  4 17:14:55 2008
New Revision: 701728

URL: http://svn.apache.org/viewvc?rev=701728&view=rev
Log:
LABS-189
Enhancing dialog to generate a component and adding more files to the template
ike ivy.xml for dependencies. The resolving is not yet working\!

Added:
    labs/droids/branch/LABS-144/src/templates/component/DROIDS-README.txt   (with props)
    labs/droids/branch/LABS-144/src/templates/component/ivy.xml
      - copied, changed from r701692, labs/droids/branch/LABS-144/ivy.xml
Modified:
    labs/droids/branch/LABS-144/src/templates/component/NOTICE.txt
    labs/droids/branch/LABS-144/targets/plugins.xml

Added: labs/droids/branch/LABS-144/src/templates/component/DROIDS-README.txt
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/src/templates/component/DROIDS-README.txt?rev=701728&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/src/templates/component/DROIDS-README.txt (added)
+++ labs/droids/branch/LABS-144/src/templates/component/DROIDS-README.txt Sat Oct  4 17:14:55 2008
@@ -0,0 +1,6 @@
+TODO: 
+ - Add instructions how to work with components
+ -- how to write documentation 
+ -- how to write the classes
+ -- how to add dependencies
+  
\ No newline at end of file

Propchange: labs/droids/branch/LABS-144/src/templates/component/DROIDS-README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: labs/droids/branch/LABS-144/src/templates/component/NOTICE.txt
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/src/templates/component/NOTICE.txt?rev=701728&r1=701727&r2=701728&view=diff
==============================================================================
--- labs/droids/branch/LABS-144/src/templates/component/NOTICE.txt (original)
+++ labs/droids/branch/LABS-144/src/templates/component/NOTICE.txt Sat Oct  4 17:14:55 2008
@@ -4,7 +4,7 @@
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
-See also the file LICENSE.txt
+See also the file LICENSE.txt and README.txt
 
 ------------------------------------------------------------------------
 The purpose of this NOTICE.txt file is to contain notices that are

Copied: labs/droids/branch/LABS-144/src/templates/component/ivy.xml (from r701692, labs/droids/branch/LABS-144/ivy.xml)
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/src/templates/component/ivy.xml?p2=labs/droids/branch/LABS-144/src/templates/component/ivy.xml&p1=labs/droids/branch/LABS-144/ivy.xml&r1=701692&r2=701728&rev=701728&view=diff
==============================================================================
--- labs/droids/branch/LABS-144/ivy.xml (original)
+++ labs/droids/branch/LABS-144/src/templates/component/ivy.xml Sat Oct  4 17:14:55 2008
@@ -16,44 +16,23 @@
   limitations under the License.
 -->
 <ivy-module version="1.0">
-  <info organisation="apache" module="droids">
+  <info organisation="@component.organisation@" module="@component.name@">
     <license name="Apache License, Version 2.0" url="http://www.apache.org/licenses/"/>
     <ivyauthor name="Apache Droids - an Apache Labs lab" url="http://labs.apache.org/"/>
   </info>
   <configurations>
     <conf name="core"/>
-    <conf name="dynamics" extends="core" visibility="public" description="dynamic support"/>
-    <conf name="plugins" extends="dynamics" visibility="public" description="plugins support"/>
-    <conf name="robots" extends="dynamics" visibility="public" description="plugins support"/>
-    <conf name="test" extends="core" visibility="private" description="for testing our framework"/>
   </configurations>
-  <publications>
-    <artifact name="org.apache.droids.core" type="jar" ext="jar" conf="core" />
-    <artifact name="org.apache.droids.dynamics" type="jar" ext="jar" conf="dynamics"/>
-    <artifact name="org.apache.droids.plugins" type="jar" ext="jar" conf="plugins" />
-    <artifact name="org.apache.droids.robots" type="jar" ext="jar" conf="robots" />
-    <artifact name="org.apache.droids.test" type="jar" ext="jar" conf="test"/>
+  <publications>
+    <artifact name="@component.name@" type="jar" ext="jar" conf="core" />
   </publications>
   <dependencies>
     <!-- core -->
-    <dependency org="org.apache.geronimo.specs" name="geronimo-stax-api_1.0_spec" rev="1.0.1" conf="core"/>
-    <dependency org="commons-logging" name="commons-logging" rev="1.1"/>
-    <dependency org="log4j" name="log4j" rev="1.2.14"/>
-    <dependency org="org.umlgraph" name="UmlGraph" rev="5.1" conf="core"/>
+    <dependency name="core" rev="latest.integration"/>
     <!-- dynamics -->
-    <dependency org="org.codehaus.woodstox" name="wstx-asl" rev="3.2.7" />
-    <dependency org="org.apache.cocoon" name="cocoon-spring-configurator" rev="2.0.0"/>
+    <dependency name="dynamics" rev="latest.integration" />
     <!-- Junit testing -->
-    <dependency org="junit" name="junit" rev="4.5"/>
+    <!--<dependency org="junit" name="junit" rev="4.5"/>-->
     <!-- plugins -->
-    <dependency org="nekohtml" name="nekohtml" rev="1.9.6.1"/>
-    <dependency org="org.apache.httpcomponents" name="httpclient" rev="4.0-beta1"/>
-    <!-- till now we do not have tika support yet.
-    As soon we are coming around to implement we have to do it in a plugin.
-    Leaving it for now in comment.
-    <dependency org="org.apache.tika" name="tika" rev="0.1-incubating"/>-->
-    <!-- Backport if you need a 1.4 lib 
-    <dependency org="net.sf.retrotranslator" name="retrotranslator-transformer" rev="1.2.4"/>
-    <dependency org="net.sf.retrotranslator" name="retrotranslator-runtime" rev="1.2.4"/>-->
   </dependencies>
 </ivy-module>

Modified: labs/droids/branch/LABS-144/targets/plugins.xml
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/targets/plugins.xml?rev=701728&r1=701727&r2=701728&view=diff
==============================================================================
--- labs/droids/branch/LABS-144/targets/plugins.xml (original)
+++ labs/droids/branch/LABS-144/targets/plugins.xml Sat Oct  4 17:14:55 2008
@@ -15,26 +15,59 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<project basedir="." name="plugins">
-  <property name="plugin.src.dir"             value="src"/>
-  <property name="droids.plugins.template.dir"       location="${droids.home}/src/pluginTemplate"/>
+<project basedir="." name="components">
+  <property name="component.src.dir"                    value="src"/>
+  <property name="droids.components.template.dir"       location="${droids.home}/src/templates/component"/>
+  <property name="component.readme" value="DROIDS-README.txt"/>
   
-  <target name="seedPlugin"
-    description="Create a new plugin directory in the current working directory and seed it with initial set of files">
-    <input message="What is the name of the plugin you wish to create?"
-           addproperty="plugin-name"/>
-    <input message="Provide a brief description of what the plugin does"
-           addproperty="plugin-desc"/>
-    <mkdir dir="${plugin-name}"/>
-    <mkdir dir="${plugin-name}/${plugin.src.dir}"/>
-    <copy todir="${plugin-name}"
+  <target name="seed"
+    description="Create a new component directory in the current working directory and seed it with initial set of files">
+    <input addproperty="component-organisation">
+      What is the name of the organisation?
+       
+      We recommend a fully qualified organisation name like org.apache.droids.
+    </input>
+    <input addproperty="component-name">
+      What is the name of the component you wish to create?
+       
+      We recommend the following naming for a plugin: "plugin.YourName"
+      and for a robot: "robot.YourName".
+    </input>
+    <input addproperty="component-desc">
+      Provide a brief description of what the component does and what use case it tries to solve.
+    </input>
+    <input addproperty="dynamic.needed" validargs="y,n" defaultvalue="n">
+      Do you need dynamic support?
+      
+      If you are solving a specific use case you probably do not need it (n - no).
+      Spring and the cocoon configurator gives you bean injections 
+      and dynamic registry support (y - yes).
+    </input>
+    <property name="component.dir" value="${component-organisation}.${component-name}"/>
+    <mkdir dir="${component.dir}"/>
+    <mkdir dir="${component.dir}/${component.src.dir}"/>
+    <copy todir="${component.dir}"
           filtering="true">
-      <fileset dir="${droids.plugins.template.dir}"/>
+      <fileset dir="${droids.components.template.dir}"/>
       <filterset>
         <filter token="droids-version" value="${version}"/>
-        <filter token="plugin-name" value="${plugin-name}"/>
-        <filter token="plugin-desc" value="${plugin-desc}"/>
+        <filter token="component.organisation" value="${component-organisation}"/>
+        <filter token="component.name" value="${component-name}"/>
+        <filter token="component.desc" value="${component-desc}"/>
       </filterset>
     </copy>
+    <property name="component.created.path" value="${basedir}/${component.dir}"/>
+    <echo>
+      You can now start the development of your component. 
+      
+      You can find it in 
+      ${component.created.path} 
+      
+      To add dependency to your component edit the file 
+      ${component.created.path}/ivy.xml.
+      
+      More information can be found in 
+      ${component.created.path}/${component.readme}
+    </echo>
   </target>
 </project>
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org