maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r519550 - in /maven/doxia/trunk/doxia-modules/doxia-module-latex: ./ src/main/java/org/apache/maven/doxia/module/latex/ src/test/java/org/apache/maven/doxia/module/latex/ src/test/resources/
Date Sun, 18 Mar 2007 05:08:07 GMT
Author: jvanzyl
Date: Sat Mar 17 22:08:07 2007
New Revision: 519550

URL: http://svn.apache.org/viewvc?view=rev&rev=519550
Log:
decoupling module

Added:
    maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/resources/
    maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/resources/test.apt   (with
props)
Modified:
    maven/doxia/trunk/doxia-modules/doxia-module-latex/pom.xml
    maven/doxia/trunk/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java
    maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java

Modified: maven/doxia/trunk/doxia-modules/doxia-module-latex/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-latex/pom.xml?view=diff&rev=519550&r1=519549&r2=519550
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-latex/pom.xml (original)
+++ maven/doxia/trunk/doxia-modules/doxia-module-latex/pom.xml Sat Mar 17 22:08:07 2007
@@ -5,17 +5,13 @@
     <version>1.0-alpha-9-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.maven.doxia</groupId>
   <artifactId>doxia-module-latex</artifactId>
-  <name>doxia-module-latex</name>
-  <version>1.0-SNAPSHOT</version>
-  <url>http://maven.apache.org</url>
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-apt</artifactId>
+      <version>${projectVersion}</version>
       <scope>test</scope>
     </dependency>
-  </dependencies>
-</project>
\ No newline at end of file
+  </dependencies>  
+</project>

Modified: maven/doxia/trunk/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java?view=diff&rev=519550&r1=519549&r2=519550
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java
(original)
+++ maven/doxia/trunk/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java
Sat Mar 17 22:08:07 2007
@@ -19,15 +19,15 @@
  * under the License.
  */
 
-import org.apache.maven.doxia.module.apt.AptParser;
+import org.apache.maven.doxia.parser.Parser;
 import org.apache.maven.doxia.sink.SinkAdapter;
 import org.apache.maven.doxia.util.LineBreaker;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.io.Writer;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.Writer;
 
 public class LatexSink
     extends SinkAdapter
@@ -395,13 +395,13 @@
             }
             switch ( justification[i] )
             {
-                case AptParser.JUSTIFY_CENTER:
+                case Parser.JUSTIFY_CENTER:
                     justif.append( 'c' );
                     break;
-                case AptParser.JUSTIFY_LEFT:
+                case Parser.JUSTIFY_LEFT:
                     justif.append( 'l' );
                     break;
-                case AptParser.JUSTIFY_RIGHT:
+                case Parser.JUSTIFY_RIGHT:
                     justif.append( 'r' );
                     break;
             }
@@ -587,13 +587,13 @@
         char justif;
         switch ( cellJustif[cellCount] )
         {
-            case AptParser.JUSTIFY_LEFT:
+            case Parser.JUSTIFY_LEFT:
                 justif = 'l';
                 break;
-            case AptParser.JUSTIFY_RIGHT:
+            case Parser.JUSTIFY_RIGHT:
                 justif = 'r';
                 break;
-            case AptParser.JUSTIFY_CENTER:
+            case Parser.JUSTIFY_CENTER:
             default:
                 justif = 'c';
                 break;

Modified: maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java?view=diff&rev=519550&r1=519549&r2=519550
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java
(original)
+++ maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java
Sat Mar 17 22:08:07 2007
@@ -20,8 +20,14 @@
  */
 
 import org.apache.maven.doxia.module.latex.LatexSink;
+import org.apache.maven.doxia.module.apt.AptParser;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.sink.AbstractSinkTestCase;
+import org.apache.maven.doxia.parser.Parser;
+
+import java.io.Reader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -35,9 +41,24 @@
         return "tex";
     }
 
+    protected Parser createParser()
+    {
+        return new AptParser();
+    }
+
     protected Sink createSink()
         throws Exception
     {
         return new LatexSink( getTestWriter() );
+    }
+
+    protected Reader getTestReader()
+        throws Exception
+    {
+        InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(
"test.apt" );
+
+        InputStreamReader reader = new InputStreamReader( is );
+
+        return reader;
     }
 }

Added: maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/resources/test.apt
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/resources/test.apt?view=auto&rev=519550
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/resources/test.apt (added)
+++ maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/resources/test.apt Sat Mar
17 22:08:07 2007
@@ -0,0 +1,16 @@
+ -----
+ Maven: the cute and fluffy build tool.
+ -----
+ Jason van Zyl
+ -----
+
+Maven: the cute and fluffy build tool that's good for the whole family
+
+ Maven will make you laugh; Maven will make you jump for joy; Maven will
+ make you put that dirty little tool called Ant in the litter box with
+ the cat treats where it belongs!
+
+* Say Goodbye the build time stains!
+
+ Maven helps you get rid of those <hard to get rid of> build stains. Wash with Maven
+ and go!

Propchange: maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/resources/test.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/trunk/doxia-modules/doxia-module-latex/src/test/resources/test.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message