maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r1157376 - in /maven/sandbox/trunk/doxia/doxia-ide/eclipse: plugins/org.apache.maven.doxia.ide.eclipse.common.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/common/ui/DoxiaWrapper.java pom.xml
Date Sat, 13 Aug 2011 13:07:30 GMT
Author: vsiveton
Date: Sat Aug 13 13:07:30 2011
New Revision: 1157376

URL: http://svn.apache.org/viewvc?rev=1157376&view=rev
Log:
o bumped plugins
o switched to 1.6 for latest eclipse (to be reviewed for old Eclipse dist)
o specified javanature and command in the eclipse-plugin
o added a to-eclipse to deploy in a given Eclipse installation
o fixed build with the new Doxia api

Modified:
    maven/sandbox/trunk/doxia/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.common.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/common/ui/DoxiaWrapper.java
    maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml

Modified: maven/sandbox/trunk/doxia/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.common.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/common/ui/DoxiaWrapper.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/doxia/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.common.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/common/ui/DoxiaWrapper.java?rev=1157376&r1=1157375&r2=1157376&view=diff
==============================================================================
--- maven/sandbox/trunk/doxia/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.common.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/common/ui/DoxiaWrapper.java
(original)
+++ maven/sandbox/trunk/doxia/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.common.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/common/ui/DoxiaWrapper.java
Sat Aug 13 13:07:30 2011
@@ -21,18 +21,20 @@ package org.apache.maven.doxia.ide.eclip
 
 import java.io.FileNotFoundException;
 import java.io.FileReader;
+import java.io.OutputStream;
 import java.io.Reader;
 import java.io.StringReader;
 import java.io.StringWriter;
 import java.io.Writer;
 
+import org.apache.commons.io.output.ByteArrayOutputStream;
 import org.apache.maven.doxia.Converter;
 import org.apache.maven.doxia.ConverterException;
 import org.apache.maven.doxia.DefaultConverter;
 import org.apache.maven.doxia.UnsupportedFormatException;
 import org.apache.maven.doxia.parser.ParseException;
 import org.apache.maven.doxia.wrapper.InputReaderWrapper;
-import org.apache.maven.doxia.wrapper.OutputWriterWrapper;
+import org.apache.maven.doxia.wrapper.OutputStreamWrapper;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
 import org.eclipse.core.resources.IFile;
@@ -121,12 +123,12 @@ public class DoxiaWrapper
      */
     private static String convert( Reader reader, IFile file, String format )
     {
-        Writer writer = new StringWriter();
+        OutputStream out = new ByteArrayOutputStream();
         Converter converter = new DefaultConverter();
         try
         {
             InputReaderWrapper input = InputReaderWrapper.valueOf( reader, format, converter.getInputFormats()
);
-            OutputWriterWrapper output = OutputWriterWrapper.valueOf( writer, DEFAULT_OUTPUT,
converter
+            OutputStreamWrapper output = OutputStreamWrapper.valueOf( out, format, file.getCharset(),
converter
                 .getOutputFormats() );
 
             converter.convert( input, output );
@@ -222,7 +224,7 @@ public class DoxiaWrapper
         finally
         {
             IOUtil.close( reader );
-            IOUtil.close( writer );
+            IOUtil.close( out );
         }
 
         try
@@ -237,7 +239,7 @@ public class DoxiaWrapper
             return "CoreException: " + msgCe;
         }
 
-        return writer.toString();
+        return out.toString();
     }
 
     /**

Modified: maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml?rev=1157376&r1=1157375&r2=1157376&view=diff
==============================================================================
--- maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml (original)
+++ maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml Sat Aug 13 13:07:30 2011
@@ -206,32 +206,55 @@ under the License.
       <plugins>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-antrun-plugin</artifactId>
+          <version>1.6</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-clean-plugin</artifactId>
-          <version>2.2</version>
+          <version>2.4.1</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
-          <version>2.0.2</version>
+          <version>2.3.2</version>
           <configuration>
-            <source>1.5</source>
-            <target>1.5</target>
+            <source>1.6</source>
+            <target>1.6</target>
           </configuration>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-jar-plugin</artifactId>
-          <version>2.2</version>
+          <version>2.3.1</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-dependency-plugin</artifactId>
-          <version>2.0</version>
+          <version>2.3</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-eclipse-plugin</artifactId>
-          <version>2.5.1</version>
+          <version>2.6</version>
+          <configuration>
+            <projectNameTemplate>${project.groupId}-${project.artifactId}</projectNameTemplate>
+            <downloadSources>true</downloadSources>
+            <downloadJavadocs>false</downloadJavadocs>
+            <additionalBuildcommands>
+              <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
+              <buildcommand>org.eclipse.pde.ManifestBuilder</buildcommand>
+              <buildcommand>org.eclipse.pde.SchemaBuilder</buildcommand>
+            </additionalBuildcommands>
+            <additionalProjectnatures>
+              <projectnature>org.eclipse.pde.PluginNature</projectnature>
+              <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+            </additionalProjectnatures>
+            <classpathContainers>
+              <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
+              <classpathContainer>org.eclipse.pde.core.requiredPlugins</classpathContainer>
+            </classpathContainers>
+          </configuration>
         </plugin>
         <plugin>
           <groupId>org.apache.felix</groupId>
@@ -387,19 +410,119 @@ under the License.
               <execution>
                 <phase>validate</phase>
                 <configuration>
-                  <tasks>
+                  <target>
                     <subant target="">
                       <property name="download.dir" value="${java.io.tmpdir}"/>
                       <property name="install.dir" value="${java.io.tmpdir}"/>
                       <fileset dir="${basedir}" includes="download-eclipse.xml"/>
                     </subant>
-                  </tasks>
+                  </target>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>to-eclipse</id>
+      <build>
+        <defaultGoal>validate</defaultGoal>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>validate</phase>
+                <configuration>
+                  <target>
+
+                    <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
+
+                    <!-- Same that download-eclipse profile -->
+                    <available file="${install.dir}/plugins" property="eclipse.present"/>
+
+                    <if>
+                      <equals arg1="${eclipse.present}" arg2="true" />
+                      <then>
+                        <echo level="info">Eclipse home: ${install.dir}</echo>
+                      </then>
+                      <else>
+                        <echo level="info">No custom Eclipse home defined, using default
in Tmp dir</echo>
+                        <property name="install.dir" location="${java.io.tmpdir}/eclipse"
relative="true" />
+                        <available file="${install.dir}/plugins" property="eclipse.present"/>
+                        <fail unless="eclipse.present">
+The ${install.dir} doesn't exist. Please run the -Pdownload-eclipse first</fail>
+                      </else>
+                    </if>
+
+                    <available file="${basedir}/plugins" type="dir" property="plugins.present"
/>
+
+                    <if>
+                      <equals arg1="${plugins.present}" arg2="true" />
+                      <then>
+                        <echo message="Copying Doxia IDE to ${install.dir}/plugins..."
/>
+                        <copy todir="${install.dir}/plugins" verbose="true" overwrite="true">
+                          <fileset dir="${basedir}/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/target">
+                            <include name="org.apache.maven.doxia.ide.eclipse.*.jar"/>
+                          </fileset>
+                          <fileset dir="${basedir}/plugins/org.apache.maven.doxia.ide.eclipse.common.ui/target">
+                            <include name="org.apache.maven.doxia.ide.eclipse.*.jar"/>
+                          </fileset>
+                          <fileset dir="${basedir}/plugins/org.apache.maven.doxia.ide.eclipse.confluence.ui/target">
+                            <include name="org.apache.maven.doxia.ide.eclipse.*.jar"/>
+                          </fileset>
+                          <fileset dir="${basedir}/plugins/org.apache.maven.doxia.ide.eclipse.docbook.ui/target">
+                            <include name="org.apache.maven.doxia.ide.eclipse.*.jar"/>
+                          </fileset>
+                          <fileset dir="${basedir}/plugins/org.apache.maven.doxia.ide.eclipse.fml.ui/target">
+                            <include name="org.apache.maven.doxia.ide.eclipse.*.jar"/>
+                          </fileset>
+                          <fileset dir="${basedir}/plugins/org.apache.maven.doxia.ide.eclipse.help/target">
+                            <include name="org.apache.maven.doxia.ide.eclipse.*.jar"/>
+                          </fileset>
+                          <fileset dir="${basedir}/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/target">
+                            <include name="org.apache.maven.doxia.ide.eclipse.*.jar"/>
+                          </fileset>
+                          <fileset dir="${basedir}/plugins/org.apache.maven.doxia.ide.eclipse.xdoc.ui/target">
+                            <include name="org.apache.maven.doxia.ide.eclipse.*.jar"/>
+                          </fileset>
+                          <fileset dir="${basedir}/plugins/org.apache.maven.doxia.ide.eclipse.xhtml.ui/target">
+                            <include name="org.apache.maven.doxia.ide.eclipse.*.jar"/>
+                          </fileset>
+                        </copy>
+                     </then>
+                    </if>
+
+                  </target>
                 </configuration>
                 <goals>
                   <goal>run</goal>
                 </goals>
               </execution>
             </executions>
+            <dependencies>
+              <dependency>
+                <groupId>org.apache.ant</groupId>
+                <artifactId>ant-nodeps</artifactId>
+                <version>1.8.1</version>
+              </dependency>
+              <dependency>
+                <groupId>ant-contrib</groupId>
+                <artifactId>ant-contrib</artifactId>
+                <version>1.0b2</version>
+                <exclusions>
+                  <exclusion>
+                  <groupId>ant</groupId>
+                  <artifactId>ant</artifactId>
+                  </exclusion>
+                </exclusions>
+              </dependency>
+            </dependencies>
           </plugin>
         </plugins>
       </build>



Mime
View raw message