directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r124413 - in incubator/directory/server/trunk/plugin: . src/main/java/org/apache/eve/tools/schema
Date Thu, 06 Jan 2005 17:55:11 GMT
Author: akarasulu
Date: Thu Jan  6 09:55:09 2005
New Revision: 124413

URL: http://svn.apache.org/viewcvs?view=rev&rev=124413
Log:
changes ...

 o changed plugin name to directory plugin 
 o added reference to the java src path which is needed to detect if user
   already defined a producer so we do not generate another producer
 o corrected hard coded path that was checks of a human created producer 
   existed

todos ...
 
 o still need to change the eve qualifier for goals in the plugin and names
   of classes - we can do this while refactoring packages names


Modified:
   incubator/directory/server/trunk/plugin/project.xml
   incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaTool.java
   incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaToolTask.java

Modified: incubator/directory/server/trunk/plugin/project.xml
Url: http://svn.apache.org/viewcvs/incubator/directory/server/trunk/plugin/project.xml?view=diff&rev=124413&p1=incubator/directory/server/trunk/plugin/project.xml&r1=124412&p2=incubator/directory/server/trunk/plugin/project.xml&r2=124413
==============================================================================
--- incubator/directory/server/trunk/plugin/project.xml	(original)
+++ incubator/directory/server/trunk/plugin/project.xml	Thu Jan  6 09:55:09 2005
@@ -18,8 +18,8 @@
  -->
 <project>
   <extend>${basedir}/../project.xml</extend>
-  <artifactId>maven-directory-server-plugin</artifactId>
-  <name>Server plugin for Maven</name>
+  <artifactId>maven-directory-plugin</artifactId>
+  <name>Directory plugin for Maven</name>
   <package>org.apache.ldap.server.tools</package>
   <inceptionYear>2004</inceptionYear>
   <shortDescription>A collection of server tools as a maven plugin</shortDescription>

Modified: incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaTool.java
Url: http://svn.apache.org/viewcvs/incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaTool.java?view=diff&rev=124413&p1=incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaTool.java&r1=124412&p2=incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaTool.java&r2=124413
==============================================================================
--- incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaTool.java
(original)
+++ incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaTool.java
Thu Jan  6 09:55:09 2005
@@ -49,7 +49,11 @@
     public static final String SCHEMA_SRC_DIR_DEFAULT =
             basedir + File.separator + "src" + File.separator + "main" 
 		+ File.separator + "schema";
-    /** property for the name of the schema dependency file */
+    /** default dir where java src files are kept */
+    public static final String JAVA_SRC_DIR_DEFAULT =
+            basedir + File.separator + "src" + File.separator + "main" 
+		+ File.separator + "java";
+   /** property for the name of the schema dependency file */
     public static final String SCHEMA_DEP_FILE_DEFAULT = "schema.deps";
     /** default dir where the generated class files are created */
     public static final String SCHEMA_TARGET_DIR_DEFAULT =
@@ -60,6 +64,7 @@
     private String schemaSrcDir = SCHEMA_SRC_DIR_DEFAULT;
     /** the directory where we generate schema class files */
     private String schemaTargetDir = SCHEMA_TARGET_DIR_DEFAULT;
+    private String javaSrcDir = JAVA_SRC_DIR_DEFAULT;
 
 
     private BootstrapSchema schema;
@@ -98,6 +103,18 @@
     }
 
 
+    public String getJavaSrcDir()
+    {
+        return javaSrcDir;
+    }
+
+
+    public void setJavaSrcDir( String javaSrcDir )
+    { 
+        this.javaSrcDir = javaSrcDir;
+    }
+
+
     public BootstrapSchema getSchema()
     {
         return schema;
@@ -331,18 +348,13 @@
     protected boolean exists( ProducerTypeEnum type )
     {
         String defaultClass = schema.getFullDefaultBaseClassName( type );
-        String targetClass = schema.getFullDefaultBaseClassName( type );
 
         // check to see if any of the classes are available in the java 
         // source directory, if so we return true
-        File defaultFile = new File( basedir + File.separator +
-                "src" + File.separator + "java"
+        File defaultFile = new File( getJavaSrcDir()
                 + File.separator + getFilePath( defaultClass ) );
-        File targetFile = new File( basedir + File.separator +
-                "src" + File.separator + "java"
-                + File.separator + getFilePath( targetClass ) );
-
-        return defaultFile.exists() || targetFile.exists();
+        
+        return defaultFile.exists();
     }
 
 

Modified: incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaToolTask.java
Url: http://svn.apache.org/viewcvs/incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaToolTask.java?view=diff&rev=124413&p1=incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaToolTask.java&r1=124412&p2=incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaToolTask.java&r2=124413
==============================================================================
--- incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaToolTask.java
(original)
+++ incubator/directory/server/trunk/plugin/src/main/java/org/apache/eve/tools/schema/EveSchemaToolTask.java
Thu Jan  6 09:55:09 2005
@@ -29,12 +29,19 @@
  */
 public class EveSchemaToolTask extends org.apache.tools.ant.Task
 {
+    private String javaSrc;
     private String pkg;
     private String name;
     private String owner;
     private String[] dependencies;
     private BuildException lastFault;
 
+  
+    public void setJavaSrc( String javaSrc )
+    {
+        this.javaSrc = javaSrc;
+    }
+
 
     public void setPackage( String pkg )
     {
@@ -83,6 +90,11 @@
         AbstractBootstrapSchema schema =
                 new AbstractBootstrapSchema( owner, name, pkg, dependencies ){};
         tool.setSchema( schema );
+
+        if ( javaSrc != null )
+        {
+            tool.setJavaSrcDir( javaSrc ); 
+        }
 
         try
         {

Mime
View raw message