directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r345152 - in /directory/asn1/branches/adc-compiler: ./ asn1-compiler/ asn1-compiler/src/antlr/ asn1-compiler/src/java/ asn1-compiler/src/main/ asn1-compiler/src/main/antlr/ asn1-compiler/src/main/java/ asn1-compiler/src/main/java/org/apache...
Date Thu, 17 Nov 2005 00:06:53 GMT
Author: adc
Date: Wed Nov 16 16:06:45 2005
New Revision: 345152

URL: http://svn.apache.org/viewcvs?rev=345152&view=rev
Log:
Converted asn1-compiler

Added:
    directory/asn1/branches/adc-compiler/asn1-compiler/pom.xml
    directory/asn1/branches/adc-compiler/asn1-compiler/src/main/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/main/antlr/
      - copied from r345132, directory/asn1/branches/adc-compiler/asn1-compiler/src/antlr/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/main/java/
      - copied from r345132, directory/asn1/branches/adc-compiler/asn1-compiler/src/java/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/main/resources/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/main/resources/vm/
      - copied from r345132, directory/asn1/branches/adc-compiler/asn1-compiler/src/vm/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/
      - copied from r345132, directory/asn1/branches/adc-compiler/asn1-compiler/src/test/org/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/test/resources/
      - copied from r345132, directory/asn1/branches/adc-compiler/asn1-compiler/src/test-data/
Removed:
    directory/asn1/branches/adc-compiler/asn1-compiler/maven.xml
    directory/asn1/branches/adc-compiler/asn1-compiler/project.properties
    directory/asn1/branches/adc-compiler/asn1-compiler/project.xml
    directory/asn1/branches/adc-compiler/asn1-compiler/src/antlr/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/java/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/test-data/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/test/org/
    directory/asn1/branches/adc-compiler/asn1-compiler/src/vm/
    directory/asn1/branches/adc-compiler/etc/
    directory/asn1/branches/adc-compiler/maven.xml
    directory/asn1/branches/adc-compiler/project.properties
    directory/asn1/branches/adc-compiler/project.xml
Modified:
    directory/asn1/branches/adc-compiler/   (props changed)
    directory/asn1/branches/adc-compiler/asn1-compiler/   (props changed)
    directory/asn1/branches/adc-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/codegen/CodeGeneratorStage.java
    directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/CompilerTest.java
    directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/stages/parser/ASN1SyntaxTest.java
    directory/asn1/branches/adc-compiler/asn1-runtime/pom.xml
    directory/asn1/branches/adc-compiler/pom.xml

Propchange: directory/asn1/branches/adc-compiler/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 16 16:06:45 2005
@@ -6,3 +6,6 @@
 junit*.properties
 target
 classes
+*.iml
+*.ipr
+*.iws

Propchange: directory/asn1/branches/adc-compiler/asn1-compiler/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 16 16:06:45 2005
@@ -5,3 +5,6 @@
 junit*.properties
 target
 classes
+*.iml
+*.ipr
+*.iws

Added: directory/asn1/branches/adc-compiler/asn1-compiler/pom.xml
URL: http://svn.apache.org/viewcvs/directory/asn1/branches/adc-compiler/asn1-compiler/pom.xml?rev=345152&view=auto
==============================================================================
--- directory/asn1/branches/adc-compiler/asn1-compiler/pom.xml (added)
+++ directory/asn1/branches/adc-compiler/asn1-compiler/pom.xml Wed Nov 16 16:06:45 2005
@@ -0,0 +1,79 @@
+<project>
+
+  <parent>
+    <groupId>org.apache.asn1</groupId>
+    <artifactId>asn1-root</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.asn1</groupId>
+  <artifactId>asn1-compiler</artifactId>
+  <name>Apache ASN1 Compiler :: compiler</name>
+  <packaging>jar</packaging>
+
+  <build>
+  
+    <plugins>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antlr-plugin</artifactId>
+        <configuration>
+          <grammars>asn1.g</grammars>
+        </configuration>
+        <executions>
+           <execution>
+              <goals>
+                 <goal>generate</goal>
+              </goals>
+           </execution>
+        </executions>
+      </plugin>
+      
+    </plugins>
+    
+  </build>
+
+  <dependencies>
+  
+    <dependency>
+      <groupId>antlr</groupId>
+      <artifactId>antlr</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.asn1</groupId>
+      <artifactId>asn1-runtime</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>velocity</groupId>
+      <artifactId>velocity</artifactId>
+    </dependency>
+
+  </dependencies>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <artifactId>maven-clover-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <artifactId>maven-pmd-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+
+</project>

Modified: directory/asn1/branches/adc-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/codegen/CodeGeneratorStage.java
URL: http://svn.apache.org/viewcvs/directory/asn1/branches/adc-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/codegen/CodeGeneratorStage.java?rev=345152&r1=345132&r2=345152&view=diff
==============================================================================
--- directory/asn1/branches/adc-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/codegen/CodeGeneratorStage.java
(original)
+++ directory/asn1/branches/adc-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/codegen/CodeGeneratorStage.java
Wed Nov 16 16:06:45 2005
@@ -110,8 +110,8 @@
 
             PrintWriter pw = new PrintWriter( out );
 
-            Velocity.mergeTemplate( "copyright.vm", context, pw );
-            Velocity.mergeTemplate( "class.vm", context, pw );
+            Velocity.mergeTemplate( "vm/copyright.vm", context, pw );
+            Velocity.mergeTemplate( "vm/class.vm", context, pw );
 
 
             pw.flush();

Modified: directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/CompilerTest.java
URL: http://svn.apache.org/viewcvs/directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/CompilerTest.java?rev=345152&r1=345132&r2=345152&view=diff
==============================================================================
--- directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/CompilerTest.java
(original)
+++ directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/CompilerTest.java
Wed Nov 16 16:06:45 2005
@@ -16,27 +16,32 @@
  */
 package org.apache.asn1.compiler;
 
+import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
+
 import junit.framework.TestCase;
 
-import org.apache.asn1.compiler.stages.parser.ParseStage;
 import org.apache.asn1.compiler.stages.codegen.CodeGeneratorStage;
+import org.apache.asn1.compiler.stages.parser.ParseStage;
+
 
 /**
  * @version $Revision$ $Date: $
  */
 public class CompilerTest extends TestCase
 {
+    private String basedir;
 
     public void testLDAP() throws Exception
     {
         Compiler compiler = new Compiler();
         Map environment = new HashMap();
 
-        environment.put( ParseStage.SRC_URI, "file:./src/test-data/ldap.asn1" );
+        System.err.println( basedir );
+        environment.put( ParseStage.SRC_URI, Thread.currentThread().getContextClassLoader().getResource(
"./ldap.asn1" ).toString() );
         environment.put( CodeGeneratorStage.ROOT_PACKAGE, "org.apache.ldap.asn1" );
-        environment.put( CodeGeneratorStage.DESTINATION_PATH, "./target/test-code" );
+        environment.put( CodeGeneratorStage.DESTINATION_PATH, basedir );
 
         compiler.compile( environment );
     }
@@ -46,9 +51,9 @@
         Compiler compiler = new Compiler();
         Map environment = new HashMap();
 
-        environment.put( ParseStage.SRC_URI, "file:./src/test-data/SPNEGO.asn1" );
+        environment.put( ParseStage.SRC_URI, Thread.currentThread().getContextClassLoader().getResource(
"./SPNEGO.asn1" ).toString() );
         environment.put( CodeGeneratorStage.ROOT_PACKAGE, "org.apache.SPNEGO.asn1" );
-        environment.put( CodeGeneratorStage.DESTINATION_PATH, "./target/test-code" );
+        environment.put( CodeGeneratorStage.DESTINATION_PATH, basedir );
 
         compiler.compile( environment );
     }
@@ -58,10 +63,17 @@
         Compiler compiler = new Compiler();
         Map environment = new HashMap();
 
-        environment.put( ParseStage.SRC_URI, "file:./src/test-data/NBAP-25433-530.asn1" );
+        environment.put( ParseStage.SRC_URI, Thread.currentThread().getContextClassLoader().getResource(
"./NBAP-25433-530.asn1" ).toString() );
         environment.put( CodeGeneratorStage.ROOT_PACKAGE, "org.apache.NBAP.asn1" );
-        environment.put( CodeGeneratorStage.DESTINATION_PATH, "./target/test-code" );
+        environment.put( CodeGeneratorStage.DESTINATION_PATH, basedir );
 
         compiler.compile( environment );
+    }
+
+    public void setUp() throws Exception
+    {
+        File file = new File( System.getProperty( "basedir" ), "./target/test-code" );
+        file.mkdirs();
+        basedir = file.getCanonicalPath();
     }
 }

Modified: directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/stages/parser/ASN1SyntaxTest.java
URL: http://svn.apache.org/viewcvs/directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/stages/parser/ASN1SyntaxTest.java?rev=345152&r1=345132&r2=345152&view=diff
==============================================================================
--- directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/stages/parser/ASN1SyntaxTest.java
(original)
+++ directory/asn1/branches/adc-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/stages/parser/ASN1SyntaxTest.java
Wed Nov 16 16:06:45 2005
@@ -39,7 +39,7 @@
         getParser( "FOOBAR { dOOBAR dd(2) 2 } DEFINITIONS AUTOMATIC TAGS EXTENSIBILITY IMPLIED
::= BEGIN BSTRING ::= BIT STRING END" ).module_definition();
 
 
-        env = getParser( new File( "./src/test-data/ldap.asn1" ) ).compile();
+        env = getParser( new File( Thread.currentThread().getContextClassLoader().getResource(
"./ldap.asn1" ).getFile() ) ).compile();
     }
 
     public void testTypeAssignment() throws Exception

Modified: directory/asn1/branches/adc-compiler/asn1-runtime/pom.xml
URL: http://svn.apache.org/viewcvs/directory/asn1/branches/adc-compiler/asn1-runtime/pom.xml?rev=345152&r1=345151&r2=345152&view=diff
==============================================================================
--- directory/asn1/branches/adc-compiler/asn1-runtime/pom.xml (original)
+++ directory/asn1/branches/adc-compiler/asn1-runtime/pom.xml Wed Nov 16 16:06:45 2005
@@ -2,7 +2,7 @@
 
   <parent>
     <groupId>org.apache.asn1</groupId>
-    <artifactId>root</artifactId>
+    <artifactId>asn1-root</artifactId>
     <version>1.0-SNAPSHOT</version>
   </parent>
 
@@ -15,6 +15,11 @@
 
   <dependencies>
   
+    <dependency>
+      <groupId>commons-collections</groupId>
+      <artifactId>commons-collections</artifactId>
+    </dependency>
+
     <dependency>
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>

Modified: directory/asn1/branches/adc-compiler/pom.xml
URL: http://svn.apache.org/viewcvs/directory/asn1/branches/adc-compiler/pom.xml?rev=345152&r1=345151&r2=345152&view=diff
==============================================================================
--- directory/asn1/branches/adc-compiler/pom.xml (original)
+++ directory/asn1/branches/adc-compiler/pom.xml Wed Nov 16 16:06:45 2005
@@ -2,9 +2,10 @@
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.asn1</groupId>
-  <artifactId>root</artifactId>
+  <artifactId>asn1-root</artifactId>
   <name>Apache ASN1 Compiler Project</name>
   <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
   <description>Apache ASN1 Compiler parent</description>
   <url>http://directory.apache.org/subprojects/asn1</url>
 
@@ -99,6 +100,7 @@
    
   <modules>
     <module>asn1-runtime</module>
+    <module>asn1-compiler</module>
   </modules> 
 
   <licenses>
@@ -134,15 +136,28 @@
       </dependency>
    
       <dependency>
-        <groupId>commons-lang</groupId>
-        <artifactId>commons-lang</artifactId>
-        <version>2.0</version>
+        <groupId>org.apache.asn1</groupId>
+        <artifactId>asn1-runtime</artifactId>
+        <version>${version}</version>
       </dependency>
 
       <dependency>
         <groupId>commons-beanutils</groupId>
         <artifactId>commons-beanutils</artifactId>
         <version>1.7.0</version>
+      </dependency>
+
+      <dependency>
+        <groupId>commons-collections</groupId>
+        <artifactId>commons-collections</artifactId>
+        <version>3.1</version>
+        <scope>runtime</scope>
+      </dependency>
+
+      <dependency>
+        <groupId>commons-lang</groupId>
+        <artifactId>commons-lang</artifactId>
+        <version>2.0</version>
       </dependency>
 
       <dependency>



Mime
View raw message