Jrst-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
June 2012
- 4 participants
- 37 discussions
Author: tchemit
Date: 2012-06-30 01:56:47 +0200 (Sat, 30 Jun 2012)
New Revision: 730
Url: http://nuiton.org/repositories/revision/jrst/730
Log:
add svn properties
Modified:
trunk/docutils/LICENSE.txt
trunk/docutils/README.txt
trunk/docutils/changelog.txt
trunk/docutils/pom.xml
trunk/doxia-module-jrst-legacy/src/license/THIRD-PARTY.properties
trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java
trunk/doxia-module-jrst-legacy/src/site/apt/devel.apt
trunk/doxia-module-jrst-legacy/src/site/apt/index.apt
trunk/doxia-module-jrst-legacy/src/site/en/apt/devel.apt
trunk/doxia-module-jrst-legacy/src/site/en/apt/index.apt
trunk/doxia-module-jrst-legacy/src/site/site_en.xml
trunk/doxia-module-jrst-legacy/src/site/site_fr.xml
trunk/doxia-module-jrst-legacy/src/test/java/org/nuiton/jrst/JrstParserTest.java
trunk/doxia-module-jrst-legacy/src/test/resources/test.rst
trunk/jrst-doc/src/site/en/rst/devel/developerDocDocutils.rst
trunk/jrst-doc/src/site/en/rst/devel/developerDocJRSTParser.rst
trunk/jrst-doc/src/site/en/rst/user/functionality.rst
trunk/jrst-doc/src/site/resources/schemas/diagrammeClassDocutils.dia
trunk/jrst-doc/src/site/resources/schemas/diagrammeClassDocutils.png
trunk/jrst-doc/src/site/resources/schemas/diagrammeClassJRSTParser.png
trunk/jrst-doc/src/site/resources/schemas/diagrammeGenerationDocutils.dia
trunk/jrst-doc/src/site/resources/schemas/diagrammeGenerationDocutils.png
trunk/jrst-doc/src/site/resources/schemas/diagrammeGenerationJRSTParser.dia
trunk/jrst-doc/src/site/resources/schemas/diagrammeGenerationJRSTParser.png
trunk/jrst-doc/src/site/resources/schemas/diagrammeSequenceDocutils.dia
trunk/jrst-doc/src/site/resources/schemas/diagrammeSequenceDocutils.png
trunk/jrst-doc/src/site/resources/schemas/diagrammeSequenceJRSTParser.png
trunk/jrst-doc/src/site/rst/devel/docDevDocutils.rst
trunk/jrst-doc/src/site/rst/devel/docDevJRSTParser.rst
trunk/jrst-doc/src/site/rst/user/fonctionnalites.rst
trunk/jrst-site-util/LICENSE.txt
trunk/jrst-site-util/README.txt
trunk/jrst-site-util/changelog.txt
trunk/jrst-site-util/pom.xml
trunk/jrst-site-util/src/license/THIRD-PARTY.properties
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/ReflectUtil.java
trunk/jrst-site-util/src/main/plexus/components.xml
trunk/jrst-site-util/src/main/resources/META-INF/maven/RstAggregation.vm
trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties
trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties
trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties
trunk/jrst-site-util/src/site/apt/devel.apt
trunk/jrst-site-util/src/site/apt/index.apt
trunk/jrst-site-util/src/site/en/apt/devel.apt
trunk/jrst-site-util/src/site/en/apt/index.apt
trunk/jrst-site-util/src/site/site_en.xml
trunk/jrst-site-util/src/site/site_fr.xml
trunk/jrst/src/main/java/org/nuiton/jrst/JRSTResourceResolver.java
trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategy.java
trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyDocutils.java
trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyJRSTReader.java
trunk/jrst/src/main/java/org/nuiton/jrst/JRSTUserAgent.java
trunk/jrst/src/main/java/org/nuiton/jrst/legacy/AdvancedReader.java
trunk/jrst/src/main/java/org/nuiton/jrst/legacy/JRSTLexer.java
trunk/jrst/src/main/java/org/nuiton/jrst/legacy/JRSTReader.java
trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/ContentDirective.java
trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/DateDirective.java
trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/ImageDirective.java
trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/SectnumDirective.java
trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTCommandModel.java
trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTView.jaxx
trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTViewHandler.java
trunk/jrst/src/main/java/org/nuiton/jrst/ui/XslPanel.jaxx
trunk/jrst/src/test/java/org/nuiton/jrst/JRSTAbstractTest.java
trunk/jrst/src/test/java/org/nuiton/jrst/bugs/AdmonitionTest.java
trunk/jrst/src/test/java/org/nuiton/jrst/bugs/ErrorsTest.java
trunk/jrst/src/test/java/org/nuiton/jrst/bugs/OptionTest.java
trunk/jrst/src/test/resources/bugs/testAdminitionInList1787.rst
trunk/jrst/src/test/resources/bugs/testDisplayErrors.rst
trunk/jrst/src/test/resources/bugs/testOptionArgumentSize1788.rst
trunk/jrst/src/test/resources/docDeveloppeur.rst
trunk/jrst/src/test/resources/schemas/diagrammeClass.png
trunk/jrst/src/test/resources/schemas/diagrammeGeneration.png
trunk/jrst/src/test/resources/schemas/diagrammeSequence.png
trunk/jrst/src/test/resources/schemas/presentationXSL.png
trunk/jrst/src/test/resources/test5.rst
trunk/src/site/resources/images/logos/jrst-logo.png
trunk/src/site/resources/images/logos/restructuredtext-logo.png
Property changes on: trunk/docutils/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/docutils/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/docutils/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/docutils/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/doxia-module-jrst-legacy/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java
===================================================================
--- trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
* #%L
* JRst :: Doxia module
*
- * $Id: JrstParser.java 685 2012-05-29 15:37:18Z jpages $
- * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/doxia-module-j… $
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2009 - 2010 CodeLutin
* %%
@@ -34,7 +34,7 @@
* specified doxia Sink.
*
* @author <a href="mailto:chatellier@codelutin.com">Eric Chatellier</a>
- * @version $Id: JrstParser.java 685 2012-05-29 15:37:18Z jpages $
+ * @version $Id$
* @since 0.9.0
*/
@Component(role = Parser.class, hint = AbstractJrstParser.JRST_PARSER_ID,
Property changes on: trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/doxia-module-jrst-legacy/src/site/apt/devel.apt
===================================================================
--- trunk/doxia-module-jrst-legacy/src/site/apt/devel.apt 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/doxia-module-jrst-legacy/src/site/apt/devel.apt 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
~~ #%L
~~ JRst :: Doxia module
~~
-~~ $Id: devel.apt 608 2011-08-18 09:25:35Z tchemit $
-~~ $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/doxia-module-j… $
+~~ $Id$
+~~ $HeadURL$
~~ %%
~~ Copyright (C) 2009 - 2010 CodeLutin
~~ %%
Property changes on: trunk/doxia-module-jrst-legacy/src/site/apt/devel.apt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/doxia-module-jrst-legacy/src/site/apt/index.apt
===================================================================
--- trunk/doxia-module-jrst-legacy/src/site/apt/index.apt 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/doxia-module-jrst-legacy/src/site/apt/index.apt 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
~~ #%L
~~ JRst :: Doxia module
~~
-~~ $Id: index.apt 608 2011-08-18 09:25:35Z tchemit $
-~~ $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/doxia-module-j… $
+~~ $Id$
+~~ $HeadURL$
~~ %%
~~ Copyright (C) 2009 - 2010 CodeLutin
~~ %%
Property changes on: trunk/doxia-module-jrst-legacy/src/site/apt/index.apt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/doxia-module-jrst-legacy/src/site/en/apt/devel.apt
===================================================================
--- trunk/doxia-module-jrst-legacy/src/site/en/apt/devel.apt 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/doxia-module-jrst-legacy/src/site/en/apt/devel.apt 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
~~ #%L
~~ JRst :: Doxia module
~~
-~~ $Id: devel.apt 608 2011-08-18 09:25:35Z tchemit $
-~~ $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/doxia-module-j… $
+~~ $Id$
+~~ $HeadURL$
~~ %%
~~ Copyright (C) 2009 - 2010 CodeLutin
~~ %%
Property changes on: trunk/doxia-module-jrst-legacy/src/site/en/apt/devel.apt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/doxia-module-jrst-legacy/src/site/en/apt/index.apt
===================================================================
--- trunk/doxia-module-jrst-legacy/src/site/en/apt/index.apt 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/doxia-module-jrst-legacy/src/site/en/apt/index.apt 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
~~ #%L
~~ JRst :: Doxia module
~~
-~~ $Id: index.apt 608 2011-08-18 09:25:35Z tchemit $
-~~ $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/doxia-module-j… $
+~~ $Id$
+~~ $HeadURL$
~~ %%
~~ Copyright (C) 2009 - 2010 CodeLutin
~~ %%
Property changes on: trunk/doxia-module-jrst-legacy/src/site/en/apt/index.apt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/doxia-module-jrst-legacy/src/site/site_en.xml
===================================================================
--- trunk/doxia-module-jrst-legacy/src/site/site_en.xml 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/doxia-module-jrst-legacy/src/site/site_en.xml 2012-06-29 23:56:47 UTC (rev 730)
@@ -3,8 +3,8 @@
#%L
JRst :: Doxia module
- $Id: site_en.xml 679 2012-05-29 08:02:04Z jpages $
- $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/doxia-module-j… $
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2009 - 2010 CodeLutin
%%
Property changes on: trunk/doxia-module-jrst-legacy/src/site/site_en.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/doxia-module-jrst-legacy/src/site/site_fr.xml
===================================================================
--- trunk/doxia-module-jrst-legacy/src/site/site_fr.xml 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/doxia-module-jrst-legacy/src/site/site_fr.xml 2012-06-29 23:56:47 UTC (rev 730)
@@ -3,8 +3,8 @@
#%L
JRst :: Doxia module
- $Id: site_fr.xml 679 2012-05-29 08:02:04Z jpages $
- $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/doxia-module-j… $
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2009 - 2010 CodeLutin
%%
Property changes on: trunk/doxia-module-jrst-legacy/src/site/site_fr.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/doxia-module-jrst-legacy/src/test/java/org/nuiton/jrst/JrstParserTest.java
===================================================================
--- trunk/doxia-module-jrst-legacy/src/test/java/org/nuiton/jrst/JrstParserTest.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/doxia-module-jrst-legacy/src/test/java/org/nuiton/jrst/JrstParserTest.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
* #%L
* JRst :: Doxia module
*
- * $Id: JrstParserTest.java 675 2012-05-25 09:30:55Z sletellier $
- * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/doxia-module-j… $
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2009 - 2010 CodeLutin
* %%
Property changes on: trunk/doxia-module-jrst-legacy/src/test/java/org/nuiton/jrst/JrstParserTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/doxia-module-jrst-legacy/src/test/resources/test.rst
===================================================================
--- trunk/doxia-module-jrst-legacy/src/test/resources/test.rst 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/doxia-module-jrst-legacy/src/test/resources/test.rst 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
.. * #%L
.. * JRst :: Doxia module
.. *
-.. * $Id: test.rst 608 2011-08-18 09:25:35Z tchemit $
-.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/doxia-module-j… $
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2009 - 2010 CodeLutin
.. * %%
Property changes on: trunk/doxia-module-jrst-legacy/src/test/resources/test.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTResourceResolver.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategy.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategy.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategy.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * JRst :: Api
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.jrst;
import org.dom4j.Document;
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategy.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyDocutils.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyDocutils.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyDocutils.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * JRst :: Api
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.jrst;
import org.apache.commons.logging.Log;
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyDocutils.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyJRSTReader.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyJRSTReader.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyJRSTReader.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * JRst :: Api
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.jrst;
import org.codehaus.plexus.component.annotations.Component;
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyJRSTReader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTUserAgent.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/AdvancedReader.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/legacy/AdvancedReader.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/legacy/AdvancedReader.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
* #%L
* JRst :: Api
*
- * $Id: AdvancedReader.java 601 2011-06-09 16:31:45Z kcardineaud $
- * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst/src/main/… $
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2004 - 2010 CodeLutin
* %%
@@ -68,10 +68,10 @@
* Created: 27 oct. 06 00:24:57
*
* @author poussin
- * @version $Revision: 601 $
+ * @version $Revision$
*
- * Last update: $Date: 2011-06-09 18:31:45 +0200 (jeu. 09 juin 2011) $
- * by : $Author: kcardineaud $
+ * Last update: $Date$
+ * by : $Author$
*/
public class AdvancedReader {
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/AdvancedReader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/JRSTLexer.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/legacy/JRSTLexer.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/legacy/JRSTLexer.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
* #%L
* JRst :: Api
*
- * $Id: JRSTLexer.java 623 2011-10-28 14:10:56Z sletellier $
- * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst/src/main/… $
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2004 - 2010 CodeLutin
* %%
@@ -57,10 +57,10 @@
* Created: 28 oct. 06 00:44:20
*
* @author poussin, letellier
- * @version $Revision: 623 $
+ * @version $Revision$
*
- * Last update: $Date: 2011-10-28 16:10:56 +0200 (ven. 28 oct. 2011) $
- * by : $Author: sletellier $
+ * Last update: $Date$
+ * by : $Author$
*/
public class JRSTLexer {
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/JRSTLexer.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/JRSTReader.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/legacy/JRSTReader.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/legacy/JRSTReader.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
* #%L
* JRst :: Api
*
- * $Id: JRSTReader.java 638 2011-12-23 10:35:21Z jruchaud $
- * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst/src/main/… $
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2004 - 2010 CodeLutin
* %%
@@ -29,10 +29,10 @@
* Created: 27 oct. 06 00:15:34
*
* @author poussin
- * @version $Revision: 638 $
+ * @version $Revision$
*
- * Last update: $Date: 2011-12-23 11:35:21 +0100 (ven. 23 déc. 2011) $
- * by : $Author: jruchaud $
+ * Last update: $Date$
+ * by : $Author$
*/
package org.nuiton.jrst.legacy;
@@ -357,10 +357,10 @@
* Created: 27 oct. 06 00:15:34
*
* @author poussin, letellier
- * @version $Revision: 638 $
+ * @version $Revision$
*
- * Last update: $Date: 2011-12-23 11:35:21 +0100 (ven. 23 déc. 2011) $
- * by : $Author: jruchaud $
+ * Last update: $Date$
+ * by : $Author$
*/
public class JRSTReader {
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/JRSTReader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/ContentDirective.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/ContentDirective.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/ContentDirective.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
* #%L
* JRst :: Api
*
- * $Id: ContentDirective.java 512 2010-11-22 14:47:17Z tchemit $
- * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst/src/main/… $
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2004 - 2010 CodeLutin
* %%
@@ -34,10 +34,10 @@
* ContentDirective
*
* @author poussin
- * @version $Revision: 512 $
+ * @version $Revision$
*
- * Last update : $Date: 2010-11-22 15:47:17 +0100 (lun. 22 nov. 2010) $
- * By : $Author: tchemit $
+ * Last update : $Date$
+ * By : $Author$
*/
public class ContentDirective implements JRSTDirective {
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/ContentDirective.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/DateDirective.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/DateDirective.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/DateDirective.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
* #%L
* JRst :: Api
*
- * $Id: DateDirective.java 512 2010-11-22 14:47:17Z tchemit $
- * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst/src/main/… $
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2004 - 2010 CodeLutin
* %%
@@ -40,10 +40,10 @@
* Created: 4 nov. 06 13:29:25
*
* @author poussin
- * @version $Revision: 512 $
+ * @version $Revision$
*
- * Last update: $Date: 2010-11-22 15:47:17 +0100 (lun. 22 nov. 2010) $
- * by : $Author: tchemit $
+ * Last update: $Date$
+ * by : $Author$
*/
public class DateDirective implements JRSTDirective {
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/DateDirective.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/ImageDirective.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/ImageDirective.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/ImageDirective.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
* #%L
* JRst :: Api
*
- * $Id: ImageDirective.java 549 2011-03-07 16:23:50Z echatellier $
- * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst/src/main/… $
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2004 - 2010 CodeLutin
* %%
@@ -43,10 +43,10 @@
* Created: 4 nov. 06 12:52:02
*
* @author poussin
- * @version $Revision: 549 $
+ * @version $Revision$
*
- * Last update: $Date: 2011-03-07 17:23:50 +0100 (lun. 07 mars 2011) $
- * by : $Author: echatellier $
+ * Last update: $Date$
+ * by : $Author$
*/
public class ImageDirective implements JRSTDirective {
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/ImageDirective.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/SectnumDirective.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/SectnumDirective.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/SectnumDirective.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
* #%L
* JRst :: Api
*
- * $Id: SectnumDirective.java 512 2010-11-22 14:47:17Z tchemit $
- * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst/src/main/… $
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2004 - 2010 CodeLutin
* %%
@@ -34,10 +34,10 @@
* SectnumDirective.
*
* @author poussin
- * @version $Revision: 512 $
+ * @version $Revision$
*
- * Last update : $Date: 2010-11-22 15:47:17 +0100 (lun. 22 nov. 2010) $
- * By : $Author: tchemit $
+ * Last update : $Date$
+ * By : $Author$
*/
public class SectnumDirective implements JRSTDirective {
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/legacy/directive/SectnumDirective.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTCommandModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTViewHandler.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/main/java/org/nuiton/jrst/ui/XslPanel.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/test/java/org/nuiton/jrst/JRSTAbstractTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/test/java/org/nuiton/jrst/bugs/AdmonitionTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/test/java/org/nuiton/jrst/bugs/ErrorsTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/test/java/org/nuiton/jrst/bugs/OptionTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/test/resources/bugs/testAdminitionInList1787.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/test/resources/bugs/testDisplayErrors.rst
===================================================================
--- trunk/jrst/src/test/resources/bugs/testDisplayErrors.rst 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/test/resources/bugs/testDisplayErrors.rst 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
.. * #%L
.. * JRst :: Api
.. *
-.. * $Id: testDisplayErrors.rst 608 2011-08-18 09:25:35Z jpages $
-.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst/src/test/… $
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2004 - 2011 CodeLutin
.. * %%
Property changes on: trunk/jrst/src/test/resources/bugs/testDisplayErrors.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/test/resources/bugs/testOptionArgumentSize1788.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst/src/test/resources/docDeveloppeur.rst
===================================================================
--- trunk/jrst/src/test/resources/docDeveloppeur.rst 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/test/resources/docDeveloppeur.rst 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
.. * #%L
.. * JRst :: Documentation
.. *
-.. * $Id: docDeveloppeur.rst 668 2012-05-21 07:17:23Z jpages $
-.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/s… $
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2009 - 2010 CodeLutin
.. * %%
Property changes on: trunk/jrst/src/test/resources/docDeveloppeur.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst/src/test/resources/schemas/diagrammeClass.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst/src/test/resources/schemas/diagrammeGeneration.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst/src/test/resources/schemas/diagrammeSequence.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst/src/test/resources/schemas/presentationXSL.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/jrst/src/test/resources/test5.rst
===================================================================
--- trunk/jrst/src/test/resources/test5.rst 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst/src/test/resources/test5.rst 2012-06-29 23:56:47 UTC (rev 730)
@@ -29,8 +29,8 @@
:Author: David Goodger
:Contact: goodger(a)python.org
-:Date: $Date: 2008-08-25 13:07:53 +0000 (Mon, 25 Aug 2008) $
-:Revision: $Revision: 5637 $
+:Date: $Date$
+:Revision: $Revision$
:Copyright: This document has been placed in the public domain.
I would like to acknowledge the people who have made a direct impact
Property changes on: trunk/jrst/src/test/resources/test5.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst-doc/src/site/en/rst/devel/developerDocDocutils.rst
===================================================================
--- trunk/jrst-doc/src/site/en/rst/devel/developerDocDocutils.rst 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-doc/src/site/en/rst/devel/developerDocDocutils.rst 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
.. * #%L
.. * JRst :: Documentation
.. *
-.. * $Id: developerDoc.rst 691 2012-05-31 08:49:47Z jpages $
-.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/s… $
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2009 - 2010 CodeLutin
.. * %%
Property changes on: trunk/jrst-doc/src/site/en/rst/devel/developerDocDocutils.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst-doc/src/site/en/rst/devel/developerDocJRSTParser.rst
===================================================================
--- trunk/jrst-doc/src/site/en/rst/devel/developerDocJRSTParser.rst 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-doc/src/site/en/rst/devel/developerDocJRSTParser.rst 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
.. * #%L
.. * JRst :: Documentation
.. *
-.. * $Id: developerDoc.rst 512 2010-11-22 14:47:17Z tchemit $
-.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/s… $
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2009 - 2010 CodeLutin
.. * %%
Property changes on: trunk/jrst-doc/src/site/en/rst/devel/developerDocJRSTParser.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst-doc/src/site/en/rst/user/functionality.rst
===================================================================
--- trunk/jrst-doc/src/site/en/rst/user/functionality.rst 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-doc/src/site/en/rst/user/functionality.rst 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
.. * #%L
.. * JRst :: Documentation
.. *
-.. * $Id: functionality.rst 512 2010-11-22 14:47:17Z tchemit $
-.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/s… $
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2009 - 2010 CodeLutin
.. * %%
Property changes on: trunk/jrst-doc/src/site/en/rst/user/functionality.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst-doc/src/site/resources/schemas/diagrammeClassDocutils.dia
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-doc/src/site/resources/schemas/diagrammeClassDocutils.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-doc/src/site/resources/schemas/diagrammeClassJRSTParser.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-doc/src/site/resources/schemas/diagrammeGenerationDocutils.dia
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-doc/src/site/resources/schemas/diagrammeGenerationDocutils.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-doc/src/site/resources/schemas/diagrammeGenerationJRSTParser.dia
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-doc/src/site/resources/schemas/diagrammeGenerationJRSTParser.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-doc/src/site/resources/schemas/diagrammeSequenceDocutils.dia
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-doc/src/site/resources/schemas/diagrammeSequenceDocutils.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-doc/src/site/resources/schemas/diagrammeSequenceJRSTParser.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-doc/src/site/rst/devel/docDevDocutils.rst
===================================================================
--- trunk/jrst-doc/src/site/rst/devel/docDevDocutils.rst 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-doc/src/site/rst/devel/docDevDocutils.rst 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
.. * #%L
.. * JRst :: Documentation
.. *
-.. * $Id: docDeveloppeur.rst 691 2012-05-31 08:49:47Z jpages $
-.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/s… $
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2009 - 2010 CodeLutin
.. * %%
Property changes on: trunk/jrst-doc/src/site/rst/devel/docDevDocutils.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst-doc/src/site/rst/devel/docDevJRSTParser.rst
===================================================================
--- trunk/jrst-doc/src/site/rst/devel/docDevJRSTParser.rst 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-doc/src/site/rst/devel/docDevJRSTParser.rst 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
.. * #%L
.. * JRst :: Documentation
.. *
-.. * $Id: docDeveloppeur.rst 512 2010-11-22 14:47:17Z tchemit $
-.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/s… $
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2009 - 2010 CodeLutin
.. * %%
Property changes on: trunk/jrst-doc/src/site/rst/devel/docDevJRSTParser.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst-doc/src/site/rst/user/fonctionnalites.rst
===================================================================
--- trunk/jrst-doc/src/site/rst/user/fonctionnalites.rst 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-doc/src/site/rst/user/fonctionnalites.rst 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,8 +2,8 @@
.. * #%L
.. * JRst :: Documentation
.. *
-.. * $Id: fonctionnalites.rst 512 2010-11-22 14:47:17Z tchemit $
-.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/s… $
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2009 - 2010 CodeLutin
.. * %%
Property changes on: trunk/jrst-doc/src/site/rst/user/fonctionnalites.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/jrst-site-util/LICENSE.txt
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-site-util/README.txt
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-site-util/changelog.txt
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-site-util/pom.xml
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Property changes on: trunk/jrst-site-util/src/license/THIRD-PARTY.properties
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -1,8 +1,8 @@
/*
* #%L
* JRst :: Site util
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2012 CodeLutin
* %%
Property changes on: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -1,8 +1,8 @@
/*
* #%L
* JRst :: Site util
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2012 CodeLutin
* %%
Property changes on: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,7 +2,7 @@
* #%L
* JRst :: Site util
* $Id$
- * $HeadURL:$
+ * $HeadURL$
* %%
* Copyright (C) 2012 CodeLutin
* %%
Property changes on: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/ReflectUtil.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/ReflectUtil.java 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/ReflectUtil.java 2012-06-29 23:56:47 UTC (rev 730)
@@ -3,7 +3,7 @@
* Maven Nuiton Skin
*
* $Id$
- * $HeadURL: http://svn.nuiton.org/svn/maven-nuiton-skin/trunk/src/main/java/org/nuiton/… $
+ * $HeadURL$
* %%
* Copyright (C) 2006 - 2011 CodeLutin
* %%
Property changes on: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/ReflectUtil.java
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/main/plexus/components.xml
===================================================================
--- trunk/jrst-site-util/src/main/plexus/components.xml 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/main/plexus/components.xml 2012-06-29 23:56:47 UTC (rev 730)
@@ -4,7 +4,7 @@
Maven Nuiton Skin
$Id$
- $HeadURL: http://svn.nuiton.org/svn/maven-nuiton-skin/trunk/src/main/resources/META-I… $
+ $HeadURL$
%%
Copyright (C) 2006 - 2011 CodeLutin
%%
Property changes on: trunk/jrst-site-util/src/main/plexus/components.xml
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/main/resources/META-INF/maven/RstAggregation.vm
===================================================================
--- trunk/jrst-site-util/src/main/resources/META-INF/maven/RstAggregation.vm 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/main/resources/META-INF/maven/RstAggregation.vm 2012-06-29 23:56:47 UTC (rev 730)
@@ -3,7 +3,7 @@
.. * JRst :: Documentation
.. *
.. * $Id$
-.. * $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/jrst-doc/src/site/rst/index.rst $
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2009 - 2010 CodeLutin
.. * %%
Property changes on: trunk/jrst-site-util/src/main/resources/META-INF/maven/RstAggregation.vm
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties
===================================================================
--- trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,7 +2,7 @@
# #%L
# JRst :: Site util
# $Id$
-# $HeadURL:$
+# $HeadURL$
# %%
# Copyright (C) 2012 CodeLutin
# %%
Property changes on: trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties
===================================================================
--- trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,7 +2,7 @@
# #%L
# JRst :: Site util
# $Id$
-# $HeadURL:$
+# $HeadURL$
# %%
# Copyright (C) 2012 CodeLutin
# %%
Property changes on: trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties
===================================================================
--- trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties 2012-06-29 23:56:47 UTC (rev 730)
@@ -2,7 +2,7 @@
# #%L
# JRst :: Site util
# $Id$
-# $HeadURL:$
+# $HeadURL$
# %%
# Copyright (C) 2012 CodeLutin
# %%
Property changes on: trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/site/apt/devel.apt
===================================================================
--- trunk/jrst-site-util/src/site/apt/devel.apt 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/site/apt/devel.apt 2012-06-29 23:56:47 UTC (rev 730)
@@ -3,7 +3,7 @@
~~ JRst :: Doxia module
~~
~~ $Id$
-~~ $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/apt/devel.a… $
+~~ $HeadURL$
~~ %%
~~ Copyright (C) 2009 - 2010 CodeLutin
~~ %%
Property changes on: trunk/jrst-site-util/src/site/apt/devel.apt
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/site/apt/index.apt
===================================================================
--- trunk/jrst-site-util/src/site/apt/index.apt 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/site/apt/index.apt 2012-06-29 23:56:47 UTC (rev 730)
@@ -3,7 +3,7 @@
~~ JRst :: Doxia module
~~
~~ $Id$
-~~ $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/apt/index.a… $
+~~ $HeadURL$
~~ %%
~~ Copyright (C) 2009 - 2010 CodeLutin
~~ %%
Property changes on: trunk/jrst-site-util/src/site/apt/index.apt
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/site/en/apt/devel.apt
===================================================================
--- trunk/jrst-site-util/src/site/en/apt/devel.apt 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/site/en/apt/devel.apt 2012-06-29 23:56:47 UTC (rev 730)
@@ -3,7 +3,7 @@
~~ JRst :: Doxia module
~~
~~ $Id$
-~~ $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/en/apt/deve… $
+~~ $HeadURL$
~~ %%
~~ Copyright (C) 2009 - 2010 CodeLutin
~~ %%
Property changes on: trunk/jrst-site-util/src/site/en/apt/devel.apt
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/site/en/apt/index.apt
===================================================================
--- trunk/jrst-site-util/src/site/en/apt/index.apt 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/site/en/apt/index.apt 2012-06-29 23:56:47 UTC (rev 730)
@@ -3,7 +3,7 @@
~~ JRst :: Doxia module
~~
~~ $Id$
-~~ $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/en/apt/inde… $
+~~ $HeadURL$
~~ %%
~~ Copyright (C) 2009 - 2010 CodeLutin
~~ %%
Property changes on: trunk/jrst-site-util/src/site/en/apt/index.apt
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/site/site_en.xml
===================================================================
--- trunk/jrst-site-util/src/site/site_en.xml 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/site/site_en.xml 2012-06-29 23:56:47 UTC (rev 730)
@@ -4,7 +4,7 @@
JRst :: Doxia module
$Id$
- $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/site_en.xml $
+ $HeadURL$
%%
Copyright (C) 2009 - 2010 CodeLutin
%%
Property changes on: trunk/jrst-site-util/src/site/site_en.xml
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/jrst-site-util/src/site/site_fr.xml
===================================================================
--- trunk/jrst-site-util/src/site/site_fr.xml 2012-06-29 23:50:40 UTC (rev 729)
+++ trunk/jrst-site-util/src/site/site_fr.xml 2012-06-29 23:56:47 UTC (rev 730)
@@ -4,7 +4,7 @@
JRst :: Doxia module
$Id$
- $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/site_fr.xml $
+ $HeadURL$
%%
Copyright (C) 2009 - 2010 CodeLutin
%%
Property changes on: trunk/jrst-site-util/src/site/site_fr.xml
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/logos/jrst-logo.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/logos/restructuredtext-logo.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
r729 - in trunk: . jrst-site-util/src/main/java/org/nuiton/jrst jrst-site-util/src/main/resources
by tchemit@users.nuiton.org 29 Jun '12
by tchemit@users.nuiton.org 29 Jun '12
29 Jun '12
Author: tchemit
Date: 2012-06-30 01:50:40 +0200 (Sat, 30 Jun 2012)
New Revision: 729
Url: http://nuiton.org/repositories/revision/jrst/729
Log:
optimize dependencies
Modified:
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties
trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties
trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties
trunk/pom.xml
Modified: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java 2012-06-29 23:36:45 UTC (rev 728)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java 2012-06-29 23:50:40 UTC (rev 729)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * JRst :: Site util
+ * $Id:$
+ * $HeadURL:$
+ * %%
+ * Copyright (C) 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.jrst;
import org.apache.maven.doxia.logging.Log;
Modified: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 23:36:45 UTC (rev 728)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 23:50:40 UTC (rev 729)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * JRst :: Site util
+ * $Id:$
+ * $HeadURL:$
+ * %%
+ * Copyright (C) 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.jrst;
import org.apache.maven.doxia.module.site.AbstractSiteModule;
Modified: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-29 23:36:45 UTC (rev 728)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-29 23:50:40 UTC (rev 729)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * JRst :: Site util
+ * $Id$
+ * $HeadURL:$
+ * %%
+ * Copyright (C) 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.jrst;
import org.apache.commons.io.FileUtils;
Modified: trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties
===================================================================
--- trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties 2012-06-29 23:36:45 UTC (rev 728)
+++ trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties 2012-06-29 23:50:40 UTC (rev 729)
@@ -1 +1,24 @@
+###
+# #%L
+# JRst :: Site util
+# $Id$
+# $HeadURL:$
+# %%
+# Copyright (C) 2012 CodeLutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Lesser Public License for more details.
+#
+# You should have received a copy of the GNU General Lesser Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/lgpl-3.0.html>.
+# #L%
+###
content=Table of content
Modified: trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties
===================================================================
--- trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties 2012-06-29 23:36:45 UTC (rev 728)
+++ trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties 2012-06-29 23:50:40 UTC (rev 729)
@@ -1,3 +1,26 @@
+###
+# #%L
+# JRst :: Site util
+# $Id$
+# $HeadURL:$
+# %%
+# Copyright (C) 2012 CodeLutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Lesser Public License for more details.
+#
+# You should have received a copy of the GNU General Lesser Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/lgpl-3.0.html>.
+# #L%
+###
# NOTE:
# This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It
# must be provided nevertheless such that a request for locale "en" will not errorneously pick up the bundle for the
Modified: trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties
===================================================================
--- trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties 2012-06-29 23:36:45 UTC (rev 728)
+++ trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties 2012-06-29 23:50:40 UTC (rev 729)
@@ -1 +1,24 @@
+###
+# #%L
+# JRst :: Site util
+# $Id$
+# $HeadURL:$
+# %%
+# Copyright (C) 2012 CodeLutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Lesser Public License for more details.
+#
+# You should have received a copy of the GNU General Lesser Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/lgpl-3.0.html>.
+# #L%
+###
content=Sommaire
\ No newline at end of file
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-06-29 23:36:45 UTC (rev 728)
+++ trunk/pom.xml 2012-06-29 23:50:40 UTC (rev 729)
@@ -301,12 +301,24 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-velocity</artifactId>
<version>1.1.7</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-i18n</artifactId>
<version>1.0-beta-7</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
1
0
Author: tchemit
Date: 2012-06-30 01:36:45 +0200 (Sat, 30 Jun 2012)
New Revision: 728
Url: http://nuiton.org/repositories/revision/jrst/728
Log:
optimize dependencies
Modified:
trunk/jrst-site-util/pom.xml
trunk/pom.xml
Modified: trunk/jrst-site-util/pom.xml
===================================================================
--- trunk/jrst-site-util/pom.xml 2012-06-29 23:28:12 UTC (rev 727)
+++ trunk/jrst-site-util/pom.xml 2012-06-29 23:36:45 UTC (rev 728)
@@ -96,11 +96,6 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-06-29 23:28:12 UTC (rev 727)
+++ trunk/pom.xml 2012-06-29 23:36:45 UTC (rev 728)
@@ -280,13 +280,6 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- <version>1.0-alpha-30</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-30</version>
<scope>provided</scope>
1
0
r727 - in trunk: doxia-module-jrst/src/license doxia-module-jrst-legacy/src/license jrst-site-util/src/license
by tchemit@users.nuiton.org 29 Jun '12
by tchemit@users.nuiton.org 29 Jun '12
29 Jun '12
Author: tchemit
Date: 2012-06-30 01:28:12 +0200 (Sat, 30 Jun 2012)
New Revision: 727
Url: http://nuiton.org/repositories/revision/jrst/727
Log:
optimize third parties
Modified:
trunk/doxia-module-jrst-legacy/src/license/THIRD-PARTY.properties
trunk/doxia-module-jrst/src/license/THIRD-PARTY.properties
trunk/jrst-site-util/src/license/THIRD-PARTY.properties
Modified: trunk/doxia-module-jrst/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/doxia-module-jrst/src/license/THIRD-PARTY.properties 2012-06-29 23:21:25 UTC (rev 726)
+++ trunk/doxia-module-jrst/src/license/THIRD-PARTY.properties 2012-06-29 23:28:12 UTC (rev 727)
@@ -8,8 +8,10 @@
# - Bouncy Castle License
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
+# - GNU General Public License - Version 2 with the class path exception
# - GNU Lesser General Public License (LGPL), version 2.1
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LGPL)
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
# - Lesser General Public License (LPGL) v 2.1
@@ -25,9 +27,13 @@
# Please fill the missing licenses for dependencies :
#
#
-#Fri May 25 10:28:45 CEST 2012
+#Sat Jun 30 01:25:16 CEST 2012
com.ibm.icu--icu4j--2.6.1=X License (http\://icu-project.org/repos/icu/icu4j/trunk/main/shared/licenses/license.html)
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
dom4j--dom4j--1.6.1=BSD
jdom--jdom--1.0=The Apache Software License, Version 2.0
org.codehaus.plexus--plexus-classworlds--1.2-alpha-9=http\://classworlds.co…
+org.codehaus.plexus--plexus-i18n--1.0-beta-7=The Apache Software License, Version 2.0
+org.codehaus.plexus--plexus-velocity--1.1.7=The Apache Software License, Version 2.0
+oro--oro--2.0.8=The Apache Software License, Version 2.0
+velocity--velocity-dep--1.4=The Apache Software License, Version 2.0
Modified: trunk/doxia-module-jrst-legacy/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/doxia-module-jrst-legacy/src/license/THIRD-PARTY.properties 2012-06-29 23:21:25 UTC (rev 726)
+++ trunk/doxia-module-jrst-legacy/src/license/THIRD-PARTY.properties 2012-06-29 23:28:12 UTC (rev 727)
@@ -8,8 +8,10 @@
# - Bouncy Castle License
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
+# - GNU General Public License - Version 2 with the class path exception
# - GNU Lesser General Public License (LGPL), version 2.1
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LGPL)
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
# - Lesser General Public License (LPGL) v 2.1
@@ -17,7 +19,6 @@
# - Mozilla Public License
# - Mozilla Public License Version 1.0
# - The Apache Software License, Version 2.0
-# - The Jython License
# - The Werken Company License
# - X License (http://icu-project.org/repos/icu/icu4j/trunk/main/shared/licenses/license.h…)
# - http://classworlds.codehaus.org/license.html
@@ -25,9 +26,13 @@
# Please fill the missing licenses for dependencies :
#
#
-#Fri May 25 10:28:45 CEST 2012
+#Sat Jun 30 01:25:17 CEST 2012
com.ibm.icu--icu4j--2.6.1=X License (http\://icu-project.org/repos/icu/icu4j/trunk/main/shared/licenses/license.html)
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
dom4j--dom4j--1.6.1=BSD
jdom--jdom--1.0=The Apache Software License, Version 2.0
org.codehaus.plexus--plexus-classworlds--1.2-alpha-9=http\://classworlds.co…
+org.codehaus.plexus--plexus-i18n--1.0-beta-7=The Apache Software License, Version 2.0
+org.codehaus.plexus--plexus-velocity--1.1.7=The Apache Software License, Version 2.0
+oro--oro--2.0.8=The Apache Software License, Version 2.0
+velocity--velocity-dep--1.4=The Apache Software License, Version 2.0
Modified: trunk/jrst-site-util/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/jrst-site-util/src/license/THIRD-PARTY.properties 2012-06-29 23:21:25 UTC (rev 726)
+++ trunk/jrst-site-util/src/license/THIRD-PARTY.properties 2012-06-29 23:28:12 UTC (rev 727)
@@ -8,14 +8,17 @@
# - Bouncy Castle License
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
+# - GNU General Public License - Version 2 with the class path exception
# - GNU Lesser General Public License (LGPL), version 2.1
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LGPL)
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
# - Lesser General Public License (LPGL) v 2.1
# - MIT License
# - Mozilla Public License
# - Mozilla Public License Version 1.0
+# - Public Domain
# - The Apache Software License, Version 2.0
# - The Jython License
# - The Werken Company License
@@ -25,9 +28,13 @@
# Please fill the missing licenses for dependencies :
#
#
-#Fri May 25 10:28:45 CEST 2012
+#Sat Jun 30 01:22:43 CEST 2012
com.ibm.icu--icu4j--2.6.1=X License (http\://icu-project.org/repos/icu/icu4j/trunk/main/shared/licenses/license.html)
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
dom4j--dom4j--1.6.1=BSD
jdom--jdom--1.0=The Apache Software License, Version 2.0
org.codehaus.plexus--plexus-classworlds--1.2-alpha-9=http\://classworlds.co…
+org.codehaus.plexus--plexus-i18n--1.0-beta-7=The Apache Software License, Version 2.0
+org.codehaus.plexus--plexus-velocity--1.1.7=The Apache Software License, Version 2.0
+oro--oro--2.0.8=The Apache Software License, Version 2.0
+velocity--velocity-dep--1.4=The Apache Software License, Version 2.0
1
0
29 Jun '12
Author: tchemit
Date: 2012-06-30 01:21:25 +0200 (Sat, 30 Jun 2012)
New Revision: 726
Url: http://nuiton.org/repositories/revision/jrst/726
Log:
fixes #2151: Introduce strategies of transform rst to xml (legacy, docutils)
fixes #2139: Improve RST generation mecanism
Added:
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java
trunk/jrst-site-util/src/main/plexus/
trunk/jrst-site-util/src/main/plexus/components.xml
trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategy.java
trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyDocutils.java
trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyJRSTReader.java
Removed:
trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstSiteModule.java
trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteModule.java
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstDoxiaTool.java
trunk/jrst-site-util/src/main/resources/META-INF/plexus/components.xml
Modified:
trunk/doxia-module-jrst-legacy/pom.xml
trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java
trunk/doxia-module-jrst/pom.xml
trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstParser.java
trunk/jrst-site-util/pom.xml
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
trunk/jrst/pom.xml
trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java
trunk/pom.xml
Modified: trunk/doxia-module-jrst/pom.xml
===================================================================
--- trunk/doxia-module-jrst/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/doxia-module-jrst/pom.xml 2012-06-29 23:21:25 UTC (rev 726)
@@ -84,28 +84,12 @@
</dependency>
<dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-site-renderer</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-doxia-tools</artifactId>
- </dependency>
-
- <dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <!--<scope>runtime</scope>-->
- </dependency>
-
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
@@ -115,11 +99,6 @@
<artifactId>plexus-component-annotations</artifactId>
</dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- </dependency>
-
</dependencies>
<!-- ************************************************************* -->
Modified: trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstParser.java
===================================================================
--- trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstParser.java 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstParser.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -25,17 +25,10 @@
package org.nuiton.jrst;
-import org.apache.maven.doxia.module.xdoc.XdocParser;
-import org.apache.maven.doxia.parser.ParseException;
import org.apache.maven.doxia.parser.Parser;
-import org.apache.maven.doxia.sink.Sink;
import org.codehaus.plexus.component.annotations.Component;
-import org.dom4j.Document;
+import org.codehaus.plexus.component.annotations.Requirement;
-import java.io.File;
-import java.io.Reader;
-import java.io.StringReader;
-
/**
* Parse an RST model, transform it into xdoc model and emit events into the
* specified doxia Sink.
@@ -48,30 +41,14 @@
description = "Parse an RST model (using python + docutils), " +
"transform it into xdoc model and emit events " +
"into the specified doxia Sink.")
-public class JrstParser extends XdocParser {
+public class JrstParser extends AbstractJrstParser {
- @Override
- public void parse(Reader source, Sink sink) throws ParseException {
+ @Requirement(optional = false, hint = "docutils")
+ protected JRSTToXmlStrategy jrstStrategy;
- try {
- // Write the source in a file to use it with JRST
- File sourceFile = JrstDoxiaTool.prepareSourceFile(getLog(), source);
-
- // Generation of the xml file
- Document doc = JRST.generateDocutils(sourceFile);
-
- // Application of xsl stylesheets
- doc = JRST.generateXml(doc, JRST.TYPE_XDOC);
-
- // Give xsl result to XDoc parser
- Reader reader = new StringReader(doc.asXML());
- super.parse(reader, sink);
- } catch (Exception e) {
- throw new ParseException("Can't parse rst file", e);
- } finally {
-
- JrstDoxiaTool.clear();
- }
-
+ @Override
+ public JRSTToXmlStrategy getStrategy() {
+ return jrstStrategy;
}
+
}
Deleted: trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteModule.java
===================================================================
--- trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -1,56 +0,0 @@
-/*
- * #%L
- * JRst :: Doxia module
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-
-package org.nuiton.jrst;
-
-import org.apache.maven.doxia.module.site.AbstractSiteModule;
-import org.apache.maven.doxia.module.site.SiteModule;
-import org.codehaus.plexus.component.annotations.Component;
-
-/**
- * JrstSiteModule.
- *
- * @author jpages (pages(a)codelutin.com)
- * @version $Id$
- * @since 2.0
- */
-@Component(role = SiteModule.class, hint = JrstDoxiaTool.JRST_PARSER_ID,
- description = "Jrst doxia site mdule using python + docutils for rst.")
-public class JrstSiteModule extends AbstractSiteModule {
- @Override
- public String getSourceDirectory() {
- return "rst";
- }
-
- @Override
- public String getExtension() {
- return "rst";
- }
-
- @Override
- public String getParserId() {
- return JrstDoxiaTool.JRST_PARSER_ID;
- }
-}
Modified: trunk/doxia-module-jrst-legacy/pom.xml
===================================================================
--- trunk/doxia-module-jrst-legacy/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/doxia-module-jrst-legacy/pom.xml 2012-06-29 23:21:25 UTC (rev 726)
@@ -96,12 +96,6 @@
</dependency>
<dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <!--<scope>runtime</scope>-->
- </dependency>
-
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
@@ -111,11 +105,6 @@
<artifactId>plexus-component-annotations</artifactId>
</dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- </dependency>
-
</dependencies>
<!-- ************************************************************* -->
Modified: trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java
===================================================================
--- trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -25,17 +25,10 @@
package org.nuiton.jrst;
-import org.apache.maven.doxia.module.xdoc.XdocParser;
-import org.apache.maven.doxia.parser.ParseException;
import org.apache.maven.doxia.parser.Parser;
-import org.apache.maven.doxia.sink.Sink;
import org.codehaus.plexus.component.annotations.Component;
-import org.dom4j.Document;
+import org.codehaus.plexus.component.annotations.Requirement;
-import java.io.File;
-import java.io.Reader;
-import java.io.StringReader;
-
/**
* Parse an RST model, transform it into xdoc model and emit events into the
* specified doxia Sink.
@@ -44,36 +37,18 @@
* @version $Id: JrstParser.java 685 2012-05-29 15:37:18Z jpages $
* @since 0.9.0
*/
-@Component(role = Parser.class, hint = JrstDoxiaTool.JRST_PARSER_ID,
+@Component(role = Parser.class, hint = AbstractJrstParser.JRST_PARSER_ID,
description = "Parse an RST model (using jrst java api), " +
"transform it into xdoc model and emit events into" +
" the specified doxia Sink.")
-public class JrstParser extends XdocParser {
+public class JrstParser extends AbstractJrstParser {
- @Override
- public void parse(Reader source, Sink sink) throws ParseException {
+ @Requirement(optional = false, hint = "legacy")
+ protected JRSTToXmlStrategy jrstStrategy;
- try {
- // Write the source in a file to use it with JRST
- File sourceFile = JrstDoxiaTool.prepareSourceFile(getLog(), source);
-// File sourceFile = File.createTempFile("source", ".rst");
-// FileWriter fileWriter = new FileWriter(sourceFile);
-// IOUtil.copy(source, fileWriter);
-
- // Simple generation of the xml file
- Document doc = JRST.generateSimpleDoc(sourceFile, JRST.UTF_8);
-
- // Application of xsl stylesheets
- doc = JRST.generateXml(doc, JRST.TYPE_XDOC);
-
- // Give xsl result to XDoc parser
- Reader reader = new StringReader(doc.asXML());
- super.parse(reader, sink);
- } catch (Exception e) {
- throw new ParseException("Can't parse rst file", e);
- } finally {
- JrstDoxiaTool.clear();
- }
-
+ @Override
+ public JRSTToXmlStrategy getStrategy() {
+ return jrstStrategy;
}
+
}
Deleted: trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstSiteModule.java
===================================================================
--- trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -1,58 +0,0 @@
-/*
- * #%L
- * JRst :: Doxia module
- *
- * $Id: JrstSiteModule.java 608 2011-08-18 09:25:35Z tchemit $
- * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/doxia-module-j… $
- * %%
- * Copyright (C) 2009 - 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-
-package org.nuiton.jrst;
-
-import org.apache.maven.doxia.module.site.AbstractSiteModule;
-import org.apache.maven.doxia.module.site.SiteModule;
-import org.codehaus.plexus.component.annotations.Component;
-
-/**
- * JrstSiteModule.
- *
- * @author <a href="mailto:chatellier@codelutin.com">Eric Chatellier</a>
- * @version $Id: JrstSiteModule.java 608 2011-08-18 09:25:35Z tchemit $
- * @since 0.9.0
- */
-@Component(role = SiteModule.class, hint = JrstDoxiaTool.JRST_PARSER_ID,
- description = "Jrst doxia site mdule using jrst for rst.")
-public class JrstSiteModule
- extends AbstractSiteModule {
-
- @Override
- public String getSourceDirectory() {
- return "rst";
- }
-
- @Override
- public String getExtension() {
- return "rst";
- }
-
- @Override
- public String getParserId() {
- return JrstDoxiaTool.JRST_PARSER_ID;
- }
-}
Modified: trunk/jrst/pom.xml
===================================================================
--- trunk/jrst/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/jrst/pom.xml 2012-06-29 23:21:25 UTC (rev 726)
@@ -82,21 +82,10 @@
<dependency>
<groupId>org.nuiton.jaxx</groupId>
- <artifactId>jaxx-validator</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.nuiton.jaxx</groupId>
<artifactId>jaxx-widgets</artifactId>
</dependency>
- <!-- swing widgets -->
<dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-widgets</artifactId>
- </dependency>
-
- <dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
@@ -131,6 +120,12 @@
</dependency>
<dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<scope>runtime</scope>
@@ -280,6 +275,19 @@
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
<pluginManagement>
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -24,26 +24,6 @@
*/
package org.nuiton.jrst;
-import java.awt.GraphicsDevice;
-import java.awt.GraphicsEnvironment;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.TransformerException;
import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -62,17 +42,38 @@
import org.python.util.PythonInterpreter;
import org.xhtmlrenderer.pdf.ITextRenderer;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.TransformerException;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
/**
* FIXME: 'JRST --help' doesn't work, but 'JRST --help toto' work :( FIXME:
* 'JRST -c' doesn't work, but 'JRST -c toto'
- *
+ * <p/>
* Created: 3 nov. 06 20:56:00
*
* @author poussin
* @version $Revision$
- *
- * Last update: $Date$
- * by : $Author$
+ * <p/>
+ * Last update: $Date$
+ * by : $Author$
*/
public class JRST {
@@ -156,13 +157,10 @@
/** XML output format type */
public static final String TYPE_XML = "xml";
- /**
- * key, Out type; value: chain of XSL file to provide wanted file for output
- */
+ /** key, Out type; value: chain of XSL file to provide wanted file for output */
protected static Map<String, String> stylesheets;
- /**
- * Mime type associated with type
- */
+
+ /** Mime type associated with type */
protected static Map<String, String> mimeType;
static {
@@ -197,7 +195,7 @@
* @param args main args
* @throws Exception
*/
- public static void main(String[] args) throws Exception {
+ public static void main(String... args) throws Exception {
I18n.init(new ClassPathI18nInitializer(), Locale.UK);
@@ -233,7 +231,7 @@
}
private static void askOption() throws SecurityException,
- NoSuchMethodException, IOException {
+ NoSuchMethodException, IOException {
try {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
@@ -254,7 +252,7 @@
* @throws NoSuchMethodException
*/
protected static void askOptionGraph() throws SecurityException,
- NoSuchMethodException {
+ NoSuchMethodException {
JRSTView jrstView = new JRSTView();
jrstView.pack();
jrstView.setVisible(true);
@@ -264,30 +262,33 @@
* Transforms a Restructured Text (ReST) file to another type ( html, xdoc, pdf, etc... )
*
* @param outputType The type of the output file ( html, xdoc, pdf, etc... )
- * @param fileIn The restructured text input file (rst)
- * @param fileOut The output file
- * @param overwrite The rule to overwrite file (NEVER, IFNEWER or ALLTIME )
+ * @param fileIn The restructured text input file (rst)
+ * @param fileOut The output file
+ * @param overwrite The rule to overwrite file (NEVER, IFNEWER or ALLTIME )
* @throws Exception
*/
public static void generate(String outputType, File fileIn,
- File fileOut, Overwrite overwrite, boolean simpleGeneration) throws Exception {
+ File fileOut, Overwrite overwrite,
+ boolean simpleGeneration) throws Exception {
if (fileOut != null
- && fileOut.exists()
- && (overwrite == Overwrite.NEVER || (overwrite == Overwrite.IFNEWER && FileUtils
+ && fileOut.exists()
+ && (overwrite == Overwrite.NEVER || (overwrite == Overwrite.IFNEWER && FileUtils
.isFileNewer(fileIn, fileOut)))) {
log.info("Don't generate file " + fileOut
- + ", because already exists");
+ + ", because already exists");
} else {
Document doc;
+ JRSTToXmlStrategy strategy;
if (simpleGeneration) {
- doc = generateSimpleDoc(fileIn, UTF_8);
+ strategy = new JRSTToXmlStrategyJRSTReader();
} else {
- // Transformation to XML
- doc = generateDocutils(fileIn);
+ strategy = new JRSTToXmlStrategyDocutils();
}
+ doc = strategy.generateRstToXml(fileIn, UTF_8);
+
// Application of xsl stylesheets
doc = generateXml(doc, outputType);
@@ -301,9 +302,37 @@
}
/**
+ * Transforms a Restructured Text (ReST) file to pdf
+ *
+ * @param fileIn The restructured text input file (rst)
+ * @param fileOut The output file
+ * @param overwrite The rule to overwrite file (NEVER, IFNEWER or ALLTIME )
+ * @throws Exception
+ */
+ public static void generatePdf(File fileIn, File fileOut, Overwrite overwrite,
+ Document doc) throws Exception {
+ if (fileOut != null
+ && fileOut.exists()
+ && (overwrite == Overwrite.NEVER || (overwrite == Overwrite.IFNEWER && FileUtils
+ .isFileNewer(fileIn, fileOut)))) {
+
+ log.info("Don't generate file " + fileOut
+ + ", because already exists");
+ } else {
+
+ // Application of xsl stylesheets
+ doc = generateXml(doc, "pdf");
+
+ // generation PDF
+ generatePdf(doc, fileIn, fileOut);
+
+ }
+ }
+
+ /**
* Transforms a restructured text file to a XML file using JRST parser (used with option --simple)
*
- * @param fileIn Input restructured text file (.rst)
+ * @param fileIn Input restructured text file (.rst)
* @param encoding Output file encoding
* @return A document which contains XML code
* @throws Exception
@@ -320,11 +349,12 @@
/**
* Transforms a restructured text file to a XML file using Jython interpreter to execute DocUtils scripts.
*
- * @param in Input restructured text file (.rst)
+ * @param in Input restructured text file (.rst)
+ * @param encoding Output file encoding
* @return A document which contains XML code
* @throws Exception
*/
- public static Document generateDocutils(File in) throws Exception {
+ public static Document generateDocutils(File in, String encoding) throws Exception {
ByteArrayOutputStream out = null;
@@ -361,19 +391,19 @@
// Execution of the docutils script to transform rst to xml
String commandExec = String.format("__run__.exec_docutils('%s', '%s', '%s')",
- docutilsPath, TYPE_XML, filePath);
+ docutilsPath, TYPE_XML, filePath);
interp.exec(commandExec);
// Cleans the python interpreter to avoid problems if they are multiple execution of this method
interp.cleanup();
// Transforms the output stream to a document
- String xmlString = new String(out.toByteArray(), UTF_8);
+ String xmlString = new String(out.toByteArray(), encoding);
Document doc = null;
try {
doc = DocumentHelper.parseText(xmlString);
- } catch (DocumentException e) {
+ } catch (DocumentException e) {
log.error("Error during the creation of the document", e);
}
@@ -388,7 +418,7 @@
/**
* Applies XSL stylesheet(s) to a XML document
*
- * @param doc A document which contains XML code
+ * @param doc A document which contains XML code
* @param xslListOrOutType String which describes transformations to apply to the XML document
* @return A document which contains XML transformed by XSL stylesheets
* @throws IOException
@@ -415,7 +445,7 @@
}
if (stylesheet == null) {
throw new FileNotFoundException("Can't find stylesheet: "
- + xsl);
+ + xsl);
}
// add entity resolver
@@ -430,7 +460,7 @@
/**
* Writes the XML content generated in a file
*
- * @param doc Document which contains XML code
+ * @param doc Document which contains XML code
* @param fileOut Output file
* @throws IOException
*/
@@ -447,7 +477,7 @@
// write generated document
writer.write(doc.asXML());
- }catch (Exception eee) {
+ } catch (Exception eee) {
log.error("Failed to write file", eee);
} finally {
if (writer != null) {
@@ -459,8 +489,8 @@
/**
* Generates PDF file with IText with an HTML document
*
- * @param result Document which contains HTML code
- * @param fileIn ReST file used to build resources path
+ * @param result Document which contains HTML code
+ * @param fileIn ReST file used to build resources path
* @param fileOut PDF Output file
* @throws Exception
*/
Added: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategy.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategy.java (rev 0)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategy.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -0,0 +1,16 @@
+package org.nuiton.jrst;
+
+import org.dom4j.Document;
+
+import java.io.File;
+
+/**
+ * To transform a jrst file to an xml format.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0.1
+ */
+public interface JRSTToXmlStrategy {
+
+ Document generateRstToXml(File in, String encoding) throws Exception;
+}
Added: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyDocutils.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyDocutils.java (rev 0)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyDocutils.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -0,0 +1,105 @@
+package org.nuiton.jrst;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codehaus.plexus.component.annotations.Component;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.nuiton.jrst.legacy.JRSTReader;
+import org.python.util.PythonInterpreter;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.net.URL;
+
+/**
+ * Old mecanism to transform rst file to xml format using {@link JRSTReader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0.1
+ */
+@Component(role = JRSTToXmlStrategy.class, hint = "docutils",
+ description = "Transform a RST model (using jython + docutils), " +
+ "to a xml format.")
+
+public class JRSTToXmlStrategyDocutils implements JRSTToXmlStrategy {
+
+ private static final String DOCUTILS_LAUNCHER = "__run__.py";
+
+ private static final String IMPORT_SCRIPT = "import __run__";
+
+ private static final String WINDOWS_NAME = "win";
+
+ private static final String OS_NAME = "os.name";
+
+ private static final String BANG = "!";
+
+ private static final String FILE_URI_PREFIX = "file:";
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(JRSTToXmlStrategyDocutils.class);
+
+ @Override
+ public Document generateRstToXml(File in, String encoding) throws Exception {
+ ByteArrayOutputStream out = null;
+
+ try {
+ // Transformation to XML
+ out = new ByteArrayOutputStream();
+
+ // Transformation of the __run__ URL into a path that python will use
+ // For example the URL is :
+ // jar:file:/home/user/.m2/repository/org/nuiton/jrst/docutils/1.6-SNAPSHOT/docutils-1.6-SNAPSHOT.jar!/__run__.py
+ // and it becomes :
+ // /home/user/.m2/repository/org/nuiton/jrst/docutils/1.6-SNAPSHOT/docutils-1.6-SNAPSHOT.jar/
+ URL resource = JRST.class.getResource("/" + DOCUTILS_LAUNCHER);
+ String docutilsPath = resource.getPath()
+ .replaceAll(DOCUTILS_LAUNCHER, "");
+
+ docutilsPath = docutilsPath.replaceAll(BANG, "");
+ docutilsPath = docutilsPath.replaceAll(FILE_URI_PREFIX, "");
+
+ // Import of the main script to use docutils ( __run__ )
+ PythonInterpreter interp = new PythonInterpreter();
+ String commandImport = IMPORT_SCRIPT;
+ interp.exec(commandImport);
+
+ // If the OS is windows, escapes the backslashs in the filepath
+ String filePath = in.getAbsolutePath();
+ String property = System.getProperty(OS_NAME).toLowerCase();
+ if (property.contains(WINDOWS_NAME)) {
+ filePath = filePath.replaceAll("\\\\", "\\\\\\\\");
+ }
+
+ // Sets an output stream in the python interpreter and executes the code
+ interp.setOut(out);
+
+ // Execution of the docutils script to transform rst to xml
+ String commandExec = String.format("__run__.exec_docutils('%s', '%s', '%s')",
+ docutilsPath, JRST.TYPE_XML, filePath);
+ interp.exec(commandExec);
+
+ // Cleans the python interpreter to avoid problems if they are multiple execution of this method
+ interp.cleanup();
+
+ // Transforms the output stream to a document
+ String xmlString = new String(out.toByteArray(), encoding);
+
+ Document doc = null;
+ try {
+ doc = DocumentHelper.parseText(xmlString);
+ } catch (DocumentException e) {
+ log.error("Error during the creation of the document", e);
+ }
+ out.close();
+
+ return doc;
+ } finally {
+ if (out != null) {
+ out.close();
+ }
+ }
+ }
+}
Added: trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyJRSTReader.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyJRSTReader.java (rev 0)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/JRSTToXmlStrategyJRSTReader.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -0,0 +1,32 @@
+package org.nuiton.jrst;
+
+import org.codehaus.plexus.component.annotations.Component;
+import org.dom4j.Document;
+import org.nuiton.jrst.legacy.JRSTReader;
+
+import java.io.File;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URL;
+
+/**
+ * Old mecanism to transform rst file to xml format using {@link JRSTReader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0.1
+ */
+@Component(role = JRSTToXmlStrategy.class, hint = "legacy",
+ description = "Transform a RST model (using jrst java api), " +
+ "to a xml format.")
+public class JRSTToXmlStrategyJRSTReader implements JRSTToXmlStrategy {
+
+ @Override
+ public Document generateRstToXml(File fileIn, String encoding) throws Exception {
+ URL url = fileIn.toURI().toURL();
+ Reader in = new InputStreamReader(url.openStream(), encoding);
+
+ // parse rst file
+ JRSTReader jrst = new JRSTReader();
+ return jrst.read(in);
+ }
+}
Modified: trunk/jrst-site-util/pom.xml
===================================================================
--- trunk/jrst-site-util/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/jrst-site-util/pom.xml 2012-06-29 23:21:25 UTC (rev 726)
@@ -56,25 +56,37 @@
</dependency>
<dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-module-xdoc</artifactId>
+ <artifactId>doxia-logging-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-decoration-model</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-sink-api</artifactId>
+ <artifactId>doxia-module-xdoc</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-core</artifactId>
- <scope>compile</scope>
+ <artifactId>doxia-sink-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-core</artifactId>
- <type>test-jar</type>
</dependency>
<dependency>
@@ -83,25 +95,23 @@
</dependency>
<dependency>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-doxia-tools</artifactId>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
</dependency>
<dependency>
- <groupId>jaxen</groupId>
- <artifactId>jaxen</artifactId>
- <scope>runtime</scope>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
</dependency>
<dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <!--<scope>runtime</scope>-->
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-i18n</artifactId>
</dependency>
<dependency>
@@ -114,6 +124,44 @@
<artifactId>plexus-utils</artifactId>
</dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <!--<scope>runtime</scope>-->
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
</dependencies>
<name>JRst :: Site util</name>
@@ -134,4 +182,33 @@
</developer>
</developers>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <executions>
+ <execution>
+ <id>generate</id>
+ <goals>
+ <goal>generate-metadata</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>merge</id>
+ <goals>
+ <goal>merge-metadata</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>${basedir}/src/main/plexus/components.xml</descriptor>
+ <descriptor>${project.build.directory}/components.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Added: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java (rev 0)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/AbstractJrstParser.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -0,0 +1,115 @@
+package org.nuiton.jrst;
+
+import org.apache.maven.doxia.logging.Log;
+import org.apache.maven.doxia.module.xdoc.XdocParser;
+import org.apache.maven.doxia.parser.ParseException;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.render.RenderingContext;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.IOUtil;
+import org.dom4j.Document;
+import org.nuiton.util.FileUtil;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+
+/**
+ * Abstract Jrst doxia parser.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0.1
+ */
+public abstract class AbstractJrstParser extends XdocParser {
+
+ public static final String JRST_PARSER_ID = "jrst";
+
+ public abstract JRSTToXmlStrategy getStrategy();
+
+ protected RenderingContext renderingContext;
+
+ protected MavenProject mavenProject;
+
+ protected boolean verbose;
+
+ @Override
+ public void parse(Reader source, Sink sink) throws ParseException {
+
+ try {
+ // Write the source in a file to use it with JRST
+ File sourceFile = prepareSourceFile(getLog(), source);
+
+ // Generation of the xml file
+// Document doc = JRST.generateRstToXml(sourceFile);
+ Document doc = getStrategy().generateRstToXml(sourceFile, JRST.UTF_8);
+
+ // Application of xsl stylesheets
+ doc = JRST.generateXml(doc, JRST.TYPE_XDOC);
+
+ // Give xsl result to XDoc parser
+ Reader reader = new StringReader(doc.asXML());
+ super.parse(reader, sink);
+ } catch (Exception e) {
+ throw new ParseException("Can't parse rst file", e);
+ } finally {
+
+ clear();
+ }
+ }
+
+ public void setRenderingContext(RenderingContext renderingContext) {
+ this.renderingContext = renderingContext;
+ }
+
+ public void setMavenProject(MavenProject mavenProject) {
+ this.mavenProject = mavenProject;
+ }
+
+ public void setVerbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+
+ protected File prepareSourceFile(Log log, Reader source) throws IOException {
+
+ File sourceFile;
+
+ if (mavenProject == null) {
+ sourceFile = File.createTempFile("source", "rst");
+
+ } else {
+ File temporayDirectory = new File(
+ mavenProject.getBasedir(),
+ "target" + File.separator + "generated-jrst");
+
+ sourceFile = new File(temporayDirectory, renderingContext.getInputName());
+
+ FileUtil.createDirectoryIfNecessary(sourceFile.getParentFile());
+
+// // Write the source in a file to use it with JRST
+// sourceFile = File.createTempFile(renderingContext.getInputName(), ".rst",
+// temporayDirectory);
+ }
+
+ if (verbose) {
+ log.info("Copy " + renderingContext.getInputName() +
+ " to " + sourceFile);
+ }
+ FileWriter fileWriter = new FileWriter(sourceFile);
+ try {
+ IOUtil.copy(source, fileWriter);
+ } finally {
+ fileWriter.close();
+ }
+
+ return sourceFile;
+ }
+
+ public void clear() {
+ renderingContext = null;
+ mavenProject = null;
+ verbose = false;
+ }
+
+}
Deleted: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstDoxiaTool.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstDoxiaTool.java 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstDoxiaTool.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -1,83 +0,0 @@
-package org.nuiton.jrst;
-
-import org.apache.maven.doxia.logging.Log;
-import org.apache.maven.doxia.sink.render.RenderingContext;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.util.IOUtil;
-import org.nuiton.util.FileUtil;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Reader;
-
-/**
- * Jrst tool used for some
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.1
- */
-public class JrstDoxiaTool {
-
- public static final String JRST_PARSER_ID = "jrst";
-
- protected static RenderingContext renderingContext;
-
- protected static MavenProject mavenProject;
-
- protected static boolean verbose;
-
- public static void setRenderingContext(RenderingContext renderingContext) {
- JrstDoxiaTool.renderingContext = renderingContext;
- }
-
- public static void setMavenProject(MavenProject mavenProject) {
- JrstDoxiaTool.mavenProject = mavenProject;
- }
-
- public static void setVerbose(boolean verbose) {
- JrstDoxiaTool.verbose = verbose;
- }
-
- public static File prepareSourceFile(Log log,
- Reader source) throws IOException {
-
- File sourceFile;
-
- if (JrstDoxiaTool.mavenProject == null) {
- sourceFile = File.createTempFile("source", "rst");
-
- } else {
- File temporayDirectory = new File(
- JrstDoxiaTool.mavenProject.getBasedir(),
- "target" + File.separator + "generated-jrst");
-
- sourceFile = new File(temporayDirectory, JrstDoxiaTool.renderingContext.getInputName());
-
- FileUtil.createDirectoryIfNecessary(sourceFile.getParentFile());
-
-// // Write the source in a file to use it with JRST
-// sourceFile = File.createTempFile(renderingContext.getInputName(), ".rst",
-// temporayDirectory);
- }
-
- if (JrstDoxiaTool.verbose) {
- log.info("Copy " + JrstDoxiaTool.renderingContext.getInputName() +
- " to " + sourceFile);
- }
- FileWriter fileWriter = new FileWriter(sourceFile);
- try {
- IOUtil.copy(source, fileWriter);
- } finally {
- fileWriter.close();
- }
-
- return sourceFile;
- }
-
- public static void clear() {
- renderingContext = null;
- mavenProject = null;
- verbose = false;
- }
-}
Added: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java (rev 0)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -0,0 +1,31 @@
+package org.nuiton.jrst;
+
+import org.apache.maven.doxia.module.site.AbstractSiteModule;
+import org.apache.maven.doxia.module.site.SiteModule;
+import org.codehaus.plexus.component.annotations.Component;
+
+/**
+ * The jrst site module.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0.1
+ */
+@Component(role = SiteModule.class, hint = AbstractJrstParser.JRST_PARSER_ID,
+ description = "Jrst doxia site mdule using jrst for rst.")
+public class JrstSiteModule extends AbstractSiteModule {
+
+ @Override
+ public String getSourceDirectory() {
+ return "rst";
+ }
+
+ @Override
+ public String getExtension() {
+ return "rst";
+ }
+
+ @Override
+ public String getParserId() {
+ return AbstractJrstParser.JRST_PARSER_ID;
+ }
+}
Modified: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-29 23:21:25 UTC (rev 726)
@@ -2,6 +2,7 @@
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
+import org.apache.maven.doxia.parser.Parser;
import org.apache.maven.doxia.sink.render.RenderingContext;
import org.apache.maven.doxia.site.decoration.DecorationModel;
import org.apache.maven.doxia.site.decoration.Menu;
@@ -16,8 +17,10 @@
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;
import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.i18n.I18N;
import org.codehaus.plexus.velocity.VelocityComponent;
+import org.dom4j.Document;
import java.io.File;
import java.io.FileNotFoundException;
@@ -39,8 +42,7 @@
*
* @author jpages <pages(a)codelutin.com>
* @author tchemit <chemit(a)codelutin.com>
- * @version $Id$
- * @since 1.0
+ * @since 2.0
*/
@Component(role = Renderer.class, hint = "default")
public class JrstSiteRenderer extends DefaultSiteRenderer {
@@ -62,6 +64,9 @@
protected boolean verbose;
+ @Requirement(role = Parser.class, hint = "jrst", optional = true)
+ protected AbstractJrstParser jrstParser;
+
@Override
public void render(Collection<DocumentRenderer> documents,
SiteRenderingContext siteRenderingContext,
@@ -121,13 +126,13 @@
SiteRenderingContext context)
throws RendererException, FileNotFoundException, UnsupportedEncodingException {
- if (JrstDoxiaTool.JRST_PARSER_ID.equals(renderingContext.getParserId())) {
+ if (AbstractJrstParser.JRST_PARSER_ID.equals(renderingContext.getParserId())) {
// let's keep the current rendering context into the JrstParser
// to be able to have the document name to parse
- JrstDoxiaTool.setRenderingContext(renderingContext);
- JrstDoxiaTool.setMavenProject(mavenProject);
- JrstDoxiaTool.setVerbose(verbose);
+ jrstParser.setRenderingContext(renderingContext);
+ jrstParser.setMavenProject(mavenProject);
+ jrstParser.setVerbose(verbose);
}
super.renderDocument(writer, renderingContext, context);
@@ -197,8 +202,11 @@
// Define the output file
File fileOut = new File(outputDirectory, pdfFilename);
+ Document doc = jrstParser.getStrategy().generateRstToXml(
+ fileOut, inputEncoding);
+
// Generate the pdf file
- JRST.generate("pdf", pdfDoc, fileOut, JRST.Overwrite.ALLTIME, false);
+ JRST.generatePdf(pdfDoc, fileOut, JRST.Overwrite.ALLTIME, doc);
}
} catch (Exception e) {
Copied: trunk/jrst-site-util/src/main/plexus/components.xml (from rev 724, trunk/jrst-site-util/src/main/resources/META-INF/plexus/components.xml)
===================================================================
--- trunk/jrst-site-util/src/main/plexus/components.xml (rev 0)
+++ trunk/jrst-site-util/src/main/plexus/components.xml 2012-06-29 23:21:25 UTC (rev 726)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ Maven Nuiton Skin
+
+ $Id$
+ $HeadURL: http://svn.nuiton.org/svn/maven-nuiton-skin/trunk/src/main/resources/META-I… $
+ %%
+ Copyright (C) 2006 - 2011 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+
+<component-set>
+ <components>
+ <component>
+ <role>org.apache.maven.doxia.siterenderer.Renderer</role>
+ <role-hint>default</role-hint>
+ <implementation>org.nuiton.jrst.JrstSiteRenderer</implementation>
+ <requirements>
+ <!--requirement>
+ <role>org.apache.maven.doxia.parser.Parser</role>
+ <field-name>jrstParser</field-name>
+ <role-hint>jrst</role-hint>
+ </requirement-->
+ <requirement>
+ <role>org.apache.maven.doxia.tools.SiteTool</role>
+ <field-name>siteTool</field-name>
+ <role-hint>default</role-hint>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.velocity.VelocityComponent</role>
+ <field-name>velocity</field-name>
+ <role-hint>doxia-default</role-hint>
+ </requirement>
+ <requirement>
+ <role>org.apache.maven.doxia.module.site.manager.SiteModuleManager</role>
+ <field-name>siteModuleManager</field-name>
+ </requirement>
+ <requirement>
+ <role>org.apache.maven.doxia.Doxia</role>
+ <field-name>doxia</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.i18n.I18N</role>
+ <field-name>i18n</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ </components>
+</component-set>
Property changes on: trunk/jrst-site-util/src/main/plexus/components.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Deleted: trunk/jrst-site-util/src/main/resources/META-INF/plexus/components.xml
===================================================================
--- trunk/jrst-site-util/src/main/resources/META-INF/plexus/components.xml 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/jrst-site-util/src/main/resources/META-INF/plexus/components.xml 2012-06-29 23:21:25 UTC (rev 726)
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- #%L
- Maven Nuiton Skin
-
- $Id$
- $HeadURL: http://svn.nuiton.org/svn/maven-nuiton-skin/trunk/src/main/resources/META-I… $
- %%
- Copyright (C) 2006 - 2011 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-<component-set>
- <components>
- <component>
- <role>org.apache.maven.doxia.siterenderer.Renderer</role>
- <role-hint>default</role-hint>
- <implementation>org.nuiton.jrst.JrstSiteRenderer</implementation>
- <requirements>
- <requirement>
- <role>org.apache.maven.doxia.tools.SiteTool</role>
- <field-name>siteTool</field-name>
- <role-hint>default</role-hint>
- </requirement>
- <requirement>
- <role>org.codehaus.plexus.velocity.VelocityComponent</role>
- <field-name>velocity</field-name>
- <role-hint>doxia-default</role-hint>
- </requirement>
- <requirement>
- <role>org.apache.maven.doxia.module.site.manager.SiteModuleManager</role>
- <field-name>siteModuleManager</field-name>
- </requirement>
- <requirement>
- <role>org.apache.maven.doxia.Doxia</role>
- <field-name>doxia</field-name>
- </requirement>
- <requirement>
- <role>org.codehaus.plexus.i18n.I18N</role>
- <field-name>i18n</field-name>
- </requirement>
- </requirements>
- </component>
- </components>
-</component-set>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
+++ trunk/pom.xml 2012-06-29 23:21:25 UTC (rev 726)
@@ -233,6 +233,12 @@
<dependency>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
@@ -261,6 +267,57 @@
<dependency>
<groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-logging-api</artifactId>
+ <version>${doxiaVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-decoration-model</artifactId>
+ <version>1.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ <version>1.0-alpha-30</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ <version>1.0-alpha-30</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.5</version>
+ </dependency>
+
+ <dependency>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.4</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <version>1.1.7</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-i18n</artifactId>
+ <version>1.0-beta-7</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-core</artifactId>
<type>test-jar</type>
<version>${doxiaVersion}</version>
1
0
r725 - in trunk: . docutils doxia-module-jrst doxia-module-jrst-legacy jrst jrst-doc jrst-site-util maven-jrst-plugin
by tchemit@users.nuiton.org 29 Jun '12
by tchemit@users.nuiton.org 29 Jun '12
29 Jun '12
Author: tchemit
Date: 2012-06-29 22:13:54 +0200 (Fri, 29 Jun 2012)
New Revision: 725
Url: http://nuiton.org/repositories/revision/jrst/725
Log:
change to version 2.0.1-SNAPSHOT
Modified:
trunk/docutils/pom.xml
trunk/doxia-module-jrst-legacy/pom.xml
trunk/doxia-module-jrst/pom.xml
trunk/jrst-doc/pom.xml
trunk/jrst-site-util/pom.xml
trunk/jrst/pom.xml
trunk/maven-jrst-plugin/pom.xml
trunk/pom.xml
Modified: trunk/docutils/pom.xml
===================================================================
(Binary files differ)
Modified: trunk/doxia-module-jrst/pom.xml
===================================================================
--- trunk/doxia-module-jrst/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
+++ trunk/doxia-module-jrst/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
@@ -34,7 +34,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>jrst</artifactId>
- <version>2.1-SNAPSHOT</version>
+ <version>2.0.1-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.jrst</groupId>
Modified: trunk/doxia-module-jrst-legacy/pom.xml
===================================================================
--- trunk/doxia-module-jrst-legacy/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
+++ trunk/doxia-module-jrst-legacy/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
@@ -32,7 +32,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>jrst</artifactId>
- <version>2.1-SNAPSHOT</version>
+ <version>2.0.1-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.jrst</groupId>
Modified: trunk/jrst/pom.xml
===================================================================
--- trunk/jrst/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
+++ trunk/jrst/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
@@ -32,7 +32,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>jrst</artifactId>
- <version>2.1-SNAPSHOT</version>
+ <version>2.0.1-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.jrst</groupId>
Modified: trunk/jrst-doc/pom.xml
===================================================================
--- trunk/jrst-doc/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
+++ trunk/jrst-doc/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
@@ -32,7 +32,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>jrst</artifactId>
- <version>2.1-SNAPSHOT</version>
+ <version>2.0.1-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.jrst</groupId>
Modified: trunk/jrst-site-util/pom.xml
===================================================================
--- trunk/jrst-site-util/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
+++ trunk/jrst-site-util/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
@@ -34,7 +34,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>jrst</artifactId>
- <version>2.1-SNAPSHOT</version>
+ <version>2.0.1-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.jrst</groupId>
Modified: trunk/maven-jrst-plugin/pom.xml
===================================================================
--- trunk/maven-jrst-plugin/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
+++ trunk/maven-jrst-plugin/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
@@ -35,7 +35,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>jrst</artifactId>
- <version>1.6-SNAPSHOT</version>
+ <version>2.0.1-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.jrst</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
+++ trunk/pom.xml 2012-06-29 20:13:54 UTC (rev 725)
@@ -36,7 +36,7 @@
</parent>
<artifactId>jrst</artifactId>
- <version>2.1-SNAPSHOT</version>
+ <version>2.0.1-SNAPSHOT</version>
<modules>
<module>docutils</module>
1
0
Author: tchemit
Date: 2012-06-29 22:05:59 +0200 (Fri, 29 Jun 2012)
New Revision: 724
Url: http://nuiton.org/repositories/revision/jrst/724
Log:
fixes Evolution #2130: New GUI for JRST with Jaxx
fixes Evolution #2139: Improve RST generation mecanism
Added:
trunk/jrst-site-util/
trunk/jrst-site-util/LICENSE.txt
trunk/jrst-site-util/README.txt
trunk/jrst-site-util/changelog.txt
trunk/jrst-site-util/pom.xml
trunk/jrst-site-util/src/
trunk/jrst-site-util/src/license/
trunk/jrst-site-util/src/license/THIRD-PARTY.properties
trunk/jrst-site-util/src/main/
trunk/jrst-site-util/src/main/java/
trunk/jrst-site-util/src/main/java/org/
trunk/jrst-site-util/src/main/java/org/nuiton/
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstDoxiaTool.java
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
trunk/jrst-site-util/src/main/java/org/nuiton/jrst/ReflectUtil.java
trunk/jrst-site-util/src/main/resources/
trunk/jrst-site-util/src/main/resources/META-INF/
trunk/jrst-site-util/src/main/resources/META-INF/maven/
trunk/jrst-site-util/src/main/resources/META-INF/maven/RstAggregation.vm
trunk/jrst-site-util/src/main/resources/META-INF/plexus/
trunk/jrst-site-util/src/main/resources/META-INF/plexus/components.xml
trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties
trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties
trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties
trunk/jrst-site-util/src/site/
trunk/jrst-site-util/src/site/apt/
trunk/jrst-site-util/src/site/apt/devel.apt
trunk/jrst-site-util/src/site/apt/index.apt
trunk/jrst-site-util/src/site/en/
trunk/jrst-site-util/src/site/en/apt/
trunk/jrst-site-util/src/site/en/apt/devel.apt
trunk/jrst-site-util/src/site/en/apt/index.apt
trunk/jrst-site-util/src/site/site_en.xml
trunk/jrst-site-util/src/site/site_fr.xml
trunk/jrst-site-util/src/test/
trunk/jrst-site-util/src/test/java/
trunk/jrst-site-util/src/test/java/org/
trunk/jrst-site-util/src/test/java/org/nuiton/
trunk/jrst-site-util/src/test/java/org/nuiton/jrst/
trunk/jrst-site-util/src/test/resources/
Removed:
trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/ReflectUtil.java
trunk/doxia-module-jrst/src/main/resources/META-INF/
Modified:
trunk/docutils/pom.xml
trunk/doxia-module-jrst-legacy/pom.xml
trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java
trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstSiteModule.java
trunk/doxia-module-jrst/pom.xml
trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstParser.java
trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteModule.java
trunk/doxia-module-jrst/src/test/java/org/nuiton/jrst/JrstParserTest.java
trunk/jrst-doc/pom.xml
trunk/jrst/pom.xml
trunk/pom.xml
Modified: trunk/docutils/pom.xml
===================================================================
(Binary files differ)
Modified: trunk/doxia-module-jrst/pom.xml
===================================================================
--- trunk/doxia-module-jrst/pom.xml 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/doxia-module-jrst/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
@@ -2,11 +2,8 @@
<!--
#%L
JRst :: Doxia module
-
- $Id$
- $HeadURL$
%%
- Copyright (C) 2009 - 2010 CodeLutin
+ Copyright (C) 2012 CodeLutin, Chemit tony
%%
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -24,7 +21,9 @@
#L%
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -57,6 +56,12 @@
</dependency>
<dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>jrst-site-util</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-xdoc</artifactId>
</dependency>
@@ -107,6 +112,11 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-annotations</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
@@ -122,17 +132,6 @@
<developers>
<developer>
- <name>Eric Chatellier</name>
- <id>echatellier</id>
- <email>chatellier(a)codelutin.com
- </email>
- <organization>CodeLutin</organization>
- <timezone>+2</timezone>
- <roles>
- <role>Développeur</role>
- </roles>
- </developer>
- <developer>
<name>Tony Chemit</name>
<id>tchemit</id>
<email>chemit(a)codelutin.com
@@ -145,27 +144,21 @@
</developer>
</developers>
- <!-- ************************************************************* -->
- <!-- *** Build Settings ****************************************** -->
- <!-- ************************************************************* -->
- <packaging>jar</packaging>
-
<build>
<plugins>
- <!-- Fix me merge descriptor -->
- <!--plugin>
+ <plugin>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-maven-plugin</artifactId>
- <version>1.3.8</version>
+ <artifactId>plexus-component-metadata</artifactId>
<executions>
<execution>
+ <id>generate</id>
<goals>
- <goal>descriptor</goal>
+ <goal>generate-metadata</goal>
</goals>
</execution>
</executions>
- </plugin-->
+ </plugin>
</plugins>
</build>
Modified: trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstParser.java
===================================================================
--- trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstParser.java 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstParser.java 2012-06-29 20:05:59 UTC (rev 724)
@@ -25,26 +25,29 @@
package org.nuiton.jrst;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.Reader;
-import java.io.StringReader;
-
import org.apache.maven.doxia.module.xdoc.XdocParser;
import org.apache.maven.doxia.parser.ParseException;
+import org.apache.maven.doxia.parser.Parser;
import org.apache.maven.doxia.sink.Sink;
-import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.component.annotations.Component;
import org.dom4j.Document;
+import java.io.File;
+import java.io.Reader;
+import java.io.StringReader;
+
/**
* Parse an RST model, transform it into xdoc model and emit events into the
* specified doxia Sink.
- *
+ *
* @author <a href="mailto:chatellier@codelutin.com">Eric Chatellier</a>
* @version $Id$
- * @since 0.9.0
- * @plexus.component role="org.apache.maven.doxia.parser.Parser" role-hint="jrst"
+ * @since 2.0
*/
+@Component(role = Parser.class, hint = "jrst",
+ description = "Parse an RST model (using python + docutils), " +
+ "transform it into xdoc model and emit events " +
+ "into the specified doxia Sink.")
public class JrstParser extends XdocParser {
@Override
@@ -52,10 +55,7 @@
try {
// Write the source in a file to use it with JRST
- File sourceFile = File.createTempFile("source",".rst");
- // sourceFile.deleteOnExit();
- FileWriter fileWriter = new FileWriter(sourceFile);
- IOUtil.copy(source, fileWriter);
+ File sourceFile = JrstDoxiaTool.prepareSourceFile(getLog(), source);
// Generation of the xml file
Document doc = JRST.generateDocutils(sourceFile);
@@ -68,6 +68,9 @@
super.parse(reader, sink);
} catch (Exception e) {
throw new ParseException("Can't parse rst file", e);
+ } finally {
+
+ JrstDoxiaTool.clear();
}
}
Modified: trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteModule.java
===================================================================
--- trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 20:05:59 UTC (rev 724)
@@ -26,17 +26,19 @@
package org.nuiton.jrst;
import org.apache.maven.doxia.module.site.AbstractSiteModule;
+import org.apache.maven.doxia.module.site.SiteModule;
+import org.codehaus.plexus.component.annotations.Component;
/**
* JrstSiteModule.
*
- * @author <a href="mailto:chatellier@codelutin.com">Eric Chatellier</a>
+ * @author jpages (pages(a)codelutin.com)
* @version $Id$
- * @since 0.9.0
- * @plexus.component role="org.apache.maven.doxia.module.site.SiteModule" role-hint="jrst"
+ * @since 2.0
*/
+@Component(role = SiteModule.class, hint = JrstDoxiaTool.JRST_PARSER_ID,
+ description = "Jrst doxia site mdule using python + docutils for rst.")
public class JrstSiteModule extends AbstractSiteModule {
-
@Override
public String getSourceDirectory() {
return "rst";
@@ -49,6 +51,6 @@
@Override
public String getParserId() {
- return "jrst";
+ return JrstDoxiaTool.JRST_PARSER_ID;
}
}
Deleted: trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
===================================================================
--- trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-29 20:05:59 UTC (rev 724)
@@ -1,241 +0,0 @@
-package org.nuiton.jrst;
-
-import java.io.FileNotFoundException;
-import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.Field;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.maven.doxia.sink.render.RenderingContext;
-import org.apache.maven.doxia.site.decoration.DecorationModel;
-import org.apache.maven.doxia.site.decoration.Menu;
-import org.apache.maven.doxia.site.decoration.MenuItem;
-import org.apache.maven.doxia.siterenderer.DefaultSiteRenderer;
-import org.apache.maven.doxia.siterenderer.DocumentRenderer;
-import org.apache.maven.doxia.siterenderer.RendererException;
-import org.apache.maven.doxia.siterenderer.SiteRenderingContext;
-import org.apache.maven.project.MavenProject;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.VelocityEngine;
-import org.apache.velocity.context.Context;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Locale;
-import java.util.Map;
-import org.codehaus.plexus.velocity.VelocityComponent;
-import org.apache.commons.io.FileUtils;
-/**
- * Override of the DefaultSiteRenderer to add pdf generation of the site.
- *
- * @author jpages <j.pages(a)codelutin.com>
- * @version $Id: JrstSiteRenderer.java 663 2012-03-22 09:14:39Z tchemit $
- * @plexus.component role-hint="default" role="org.apache.maven.doxia.siterenderer.Renderer"
- * @since 1.0
- */
-public class JrstSiteRenderer extends DefaultSiteRenderer {
-
-
- static public final String DOC_NAME_EN = "JRST documentation";
- static public final String CONTENT_EN = "Table of content";
- static public final String FILE_NAME_EN = "DocumentationJRST.pdf";
- static public final String DOC_NAME_FR = "Documentation JRST";
- static public final String CONTENT_FR = "Sommaire";
- static public final String FILE_NAME_FR = "DocumentationJRST.pdf";
-
- protected static Log log = LogFactory.getLog(JrstSiteRenderer.class);
-
- /**
- * SiteTool.
- *
- * @component
- */
- public Locale locale;
-
- public MavenProject mavenProject;
-
- public boolean pdfGenerationEnabled;
-
- public HashMap<String, String> map;
-
- public void render(Collection<DocumentRenderer> documents,
- SiteRenderingContext siteRenderingContext,
- File outputDirectory)
- throws RendererException, IOException {
-
- // prepare all common values for a given module
-
- locale = siteRenderingContext.getLocale();
-
- Map<String, ?> templateProperties = siteRenderingContext.getTemplateProperties();
-
- super.render(documents, siteRenderingContext, outputDirectory);
-
- mavenProject = (MavenProject) templateProperties.get("project");
-
- map = new HashMap<String, String>();
-
- pdfGenerationEnabled = getBooleanProperty(
- (String) mavenProject.getProperties().get("pdfGenerationEnabled"));
-
- if (pdfGenerationEnabled) {
- String absolutePath = outputDirectory.getAbsolutePath();
- try {
- renderPdf(documents, siteRenderingContext, absolutePath);
- } catch (Exception e) {
- log.error("Can't find rst resource to generate pdf documentation", e);
- }
- }
- }
-
- public void renderPdf(Collection<DocumentRenderer> documents, SiteRenderingContext siteRenderingContext,
- String outputDirectory)
- throws RendererException, FileNotFoundException, UnsupportedEncodingException
- {
- Context vc = new VelocityContext();
-
- vc.put( "locale", locale );
- vc.put( "supportedLocales", Collections.unmodifiableList(siteRenderingContext.getSiteLocales()) );
-
- try {
- StringWriter sw = new StringWriter();
- Field velocityField = ReflectUtil.getField(DefaultSiteRenderer.class, "velocity");
-
- VelocityComponent velocity = (VelocityComponent)velocityField.get(this);
- VelocityEngine engine = velocity.getEngine();
- String inputEncoding = siteRenderingContext.getInputEncoding();
-
- // Set velocity variables
- String tableOfContent = CONTENT_EN;
- String docName = DOC_NAME_EN;
- String filename = FILE_NAME_EN;
- if (locale.equals(Locale.FRENCH)) {
- tableOfContent = CONTENT_FR;
- docName = DOC_NAME_FR;
- filename = FILE_NAME_FR;
- }
- String titleDecoration = StringUtils.rightPad("", docName.length(), '=');
- vc.put("titleDecoration", titleDecoration);
- vc.put( "docName", docName);
- vc.put( "tableContentName", tableOfContent);
-
- // Build the map of html documents from .rst or .rst.vm files
- File basedir = buildDocMap(documents);
- vc.put("basedir", basedir.getAbsolutePath());
- vc.put("separator", File.separatorChar);
-
- // Build the list of item's href
- DecorationModel decoration = siteRenderingContext.getDecoration();
- List<Menu> menus = decoration.getMenus();
- Collection<String> paths = new LinkedList<String>();
- for (Menu menu : menus) {
- List<MenuItem> items = menu.getItems();
- for (MenuItem item : items) {
- buildListPaths(item, paths, siteRenderingContext);
- }
- }
-
- // Merge of the map of html file and the list of paths
- List<String> documentRefs = mergeListAndMap(paths);
- if (documentRefs.size() > 0) {
- vc.put("documentRefs", documentRefs);
-
- // Aggregate all rst file info one file
- engine.mergeTemplate("/META-INF/maven/RstAggregation.vm", inputEncoding, vc, sw);
- String fileContent = sw.toString();
- String tempFilePath = outputDirectory + File.separatorChar + "pdfDoc.rst";
- File pdfDoc = new File(tempFilePath);
- FileUtils.writeStringToFile(pdfDoc, fileContent, "UTF-8");
- String outputFilePath = outputDirectory + File.separatorChar + filename;
- log.info(outputFilePath);
-
- // Define the output file
- File fileOut = new File(outputFilePath);
- JRST.Overwrite alltime = JRST.Overwrite.ALLTIME;
-
- // Generate the pdf file
- JRST.generate("pdf", pdfDoc, fileOut, alltime, false);
- }
-
- } catch (Exception e) {
- log.error("Can't generate pdf documentation of the project", e);
- }
- }
-
- public File buildDocMap(Collection<DocumentRenderer> documents) {
- File basedir = new File(".");
- for (DocumentRenderer doc : documents) {
- RenderingContext renderingContext = doc.getRenderingContext();
- String inputName = renderingContext.getInputName();
- String relativeDir = renderingContext.getRelativePath();
- if (inputName.endsWith("rst") || inputName.endsWith("rst.vm")) {
- // Change the extension to html
- String[] splitName = inputName.split("\\.");
- String htmlName = splitName[0] + "." + "html";
- String relativePath = "." + File.separator + htmlName;
- log.info("relativePath: " + relativePath);
- // Add in a hashmap
- map.put(relativePath, inputName);
-
- if (relativeDir.equals(".") && inputName.startsWith("index")) {
- basedir = renderingContext.getBasedir();
- }
- }
- }
- return basedir;
- }
-
- public List<String> mergeListAndMap(Collection<String> paths) {
- // Merge the map and the list to obtain a list of rst files we can add in the pdf
- List<String> documentRefs = new LinkedList<String>();
- for (String path: paths) {
- // Seek in the hashmap if the rst file exists to add it in the doc list
- String rstFilename = map.get(path);
- if ( rstFilename != null) {
- documentRefs.add(rstFilename);
- }
- }
- return documentRefs;
- }
-
- public Collection<String> buildListPaths(MenuItem item, Collection<String> paths,
- SiteRenderingContext siteRenderingContext) {
- // add hrefs to paths if they don't start with "http" or ".."
- String href = item.getHref();
- if (!href.startsWith("http") && !href.startsWith("..")) {
- boolean addHref = true;
- for (Locale loc : siteRenderingContext.getSiteLocales()) {
- if (href.startsWith(loc.toString())) {
- addHref = false;
- }
- }
- if (addHref) {
- if(!href.startsWith("./")) {
- href = "./" + href;
- }
- log.info("xml: " + href);
- paths.add(href);
- }
- }
- // If the item has sub-items, we use recursion to add them to paths
- List<MenuItem> subItems = item.getItems();
- if (!subItems.isEmpty()) {
- for (MenuItem subItem : subItems) {
- paths = buildListPaths(subItem, paths, siteRenderingContext);
- }
- }
- return paths;
- }
-
- protected boolean getBooleanProperty(String value) {
- boolean result = StringUtils.isNotEmpty(value) && !"false".equals(value);
- return result;
- }
-
-}
\ No newline at end of file
Deleted: trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/ReflectUtil.java
===================================================================
--- trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/ReflectUtil.java 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/ReflectUtil.java 2012-06-29 20:05:59 UTC (rev 724)
@@ -1,70 +0,0 @@
-/*
- * #%L
- * Maven Nuiton Skin
- *
- * $Id: ReflectUtil.java 641 2011-08-19 15:04:21Z tchemit $
- * $HeadURL: http://svn.nuiton.org/svn/maven-nuiton-skin/trunk/src/main/java/org/nuiton/… $
- * %%
- * Copyright (C) 2006 - 2011 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-package org.nuiton.jrst;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-/**
- * Some usefull methods to obtains none accessible fields and method from
- * some classes.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 1.0.6
- */
-public class ReflectUtil {
-
- public static Method getMethod(Class<?> klass, String methodName, Class<?>[] paramTypes) {
- try {
- Method declaredMethod = klass.getDeclaredMethod(methodName, paramTypes);
- declaredMethod.setAccessible(true);
- return declaredMethod;
- } catch (Exception e) {
- throw new IllegalStateException("Could not get method [" + methodName + "] from parent class :(... ", e);
- }
-
- }
-
- public static Field getField(Class<?> klass, String fieldName) {
- try {
- Field declaredField = klass.getDeclaredField(fieldName);
- declaredField.setAccessible(true);
- return declaredField;
- } catch (Exception e) {
- throw new IllegalStateException("Could not get field [" + fieldName + "] from parent class :(... ", e);
- }
-
- }
-
- public static <O> O invokeMethod(Method m, Object o, Object... params) {
- try {
- O result = (O) m.invoke(o, params);
- return result;
- } catch (Exception e) {
- throw new IllegalStateException("Could not invoke method [" + m.getName() + "] from parent class :(... ", e);
- }
-
- }
-}
Modified: trunk/doxia-module-jrst/src/test/java/org/nuiton/jrst/JrstParserTest.java
===================================================================
--- trunk/doxia-module-jrst/src/test/java/org/nuiton/jrst/JrstParserTest.java 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/doxia-module-jrst/src/test/java/org/nuiton/jrst/JrstParserTest.java 2012-06-29 20:05:59 UTC (rev 724)
@@ -25,13 +25,14 @@
package org.nuiton.jrst;
-import java.io.Reader;
-import java.io.StringWriter;
import org.apache.maven.doxia.AbstractModuleTest;
import org.apache.maven.doxia.module.xdoc.XdocSink;
import org.apache.maven.doxia.parser.Parser;
import org.apache.maven.doxia.sink.Sink;
+import java.io.Reader;
+import java.io.StringWriter;
+
/**
* @author chatellier
* @version $Revision : 1$
@@ -48,24 +49,23 @@
}
public void testParse() throws Exception {
- StringWriter output = null;
Reader reader = null;
try {
- output = new StringWriter();
+ StringWriter output = new StringWriter();
reader = getTestReader("test", "rst");
- Sink sink = new XdocSink(output){};
+ Sink sink = new XdocSink(output) {
+ };
parser.parse(reader, sink);
- assertTrue(output.toString().contains("emphasis"));
- assertTrue(output.toString().contains("This is the first item"));
- assertTrue(output.toString().contains("Title"));
- assertTrue(output.toString().contains("blocks."));
+ String outputResult = output.toString();
+
+ assertTrue(outputResult.contains("emphasis"));
+ assertTrue(outputResult.contains("This is the first item"));
+ assertTrue(outputResult.contains("Title"));
+ assertTrue(outputResult.contains("blocks."));
} finally {
- if (output != null) {
- output.close();
- }
if (reader != null) {
reader.close();
}
@@ -78,7 +78,7 @@
}
@Override
- protected String getOutputDir(){
+ protected String getOutputDir() {
return "parser/";
}
Modified: trunk/doxia-module-jrst-legacy/pom.xml
===================================================================
--- trunk/doxia-module-jrst-legacy/pom.xml 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/doxia-module-jrst-legacy/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
@@ -2,11 +2,8 @@
<!--
#%L
JRst :: Doxia module
-
- $Id$
- $HeadURL$
%%
- Copyright (C) 2009 - 2010 CodeLutin
+ Copyright (C) 2009 - 2012 CodeLutin, Chemit tony
%%
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -63,7 +60,13 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>jrst-site-util</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-xdoc</artifactId>
@@ -105,6 +108,11 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-annotations</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
@@ -151,14 +159,14 @@
<build>
<plugins>
+
<plugin>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-maven-plugin</artifactId>
- <version>1.3.8</version>
+ <artifactId>plexus-component-metadata</artifactId>
<executions>
<execution>
<goals>
- <goal>descriptor</goal>
+ <goal>generate-metadata</goal>
</goals>
</execution>
</executions>
Modified: trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java
===================================================================
--- trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstParser.java 2012-06-29 20:05:59 UTC (rev 724)
@@ -25,28 +25,29 @@
package org.nuiton.jrst;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.Reader;
-import java.io.StringReader;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.maven.doxia.module.xdoc.XdocParser;
import org.apache.maven.doxia.parser.ParseException;
+import org.apache.maven.doxia.parser.Parser;
import org.apache.maven.doxia.sink.Sink;
-import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.component.annotations.Component;
import org.dom4j.Document;
+import java.io.File;
+import java.io.Reader;
+import java.io.StringReader;
+
/**
* Parse an RST model, transform it into xdoc model and emit events into the
* specified doxia Sink.
- *
+ *
* @author <a href="mailto:chatellier@codelutin.com">Eric Chatellier</a>
* @version $Id: JrstParser.java 685 2012-05-29 15:37:18Z jpages $
* @since 0.9.0
- * @plexus.component role="org.apache.maven.doxia.parser.Parser" role-hint="jrst"
*/
+@Component(role = Parser.class, hint = JrstDoxiaTool.JRST_PARSER_ID,
+ description = "Parse an RST model (using jrst java api), " +
+ "transform it into xdoc model and emit events into" +
+ " the specified doxia Sink.")
public class JrstParser extends XdocParser {
@Override
@@ -54,9 +55,10 @@
try {
// Write the source in a file to use it with JRST
- File sourceFile = File.createTempFile("source",".rst");
- FileWriter fileWriter = new FileWriter(sourceFile);
- IOUtil.copy(source, fileWriter);
+ File sourceFile = JrstDoxiaTool.prepareSourceFile(getLog(), source);
+// File sourceFile = File.createTempFile("source", ".rst");
+// FileWriter fileWriter = new FileWriter(sourceFile);
+// IOUtil.copy(source, fileWriter);
// Simple generation of the xml file
Document doc = JRST.generateSimpleDoc(sourceFile, JRST.UTF_8);
@@ -69,6 +71,8 @@
super.parse(reader, sink);
} catch (Exception e) {
throw new ParseException("Can't parse rst file", e);
+ } finally {
+ JrstDoxiaTool.clear();
}
}
Modified: trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstSiteModule.java
===================================================================
--- trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/doxia-module-jrst-legacy/src/main/java/org/nuiton/jrst/JrstSiteModule.java 2012-06-29 20:05:59 UTC (rev 724)
@@ -26,6 +26,8 @@
package org.nuiton.jrst;
import org.apache.maven.doxia.module.site.AbstractSiteModule;
+import org.apache.maven.doxia.module.site.SiteModule;
+import org.codehaus.plexus.component.annotations.Component;
/**
* JrstSiteModule.
@@ -33,9 +35,11 @@
* @author <a href="mailto:chatellier@codelutin.com">Eric Chatellier</a>
* @version $Id: JrstSiteModule.java 608 2011-08-18 09:25:35Z tchemit $
* @since 0.9.0
- * @plexus.component role="org.apache.maven.doxia.module.site.SiteModule" role-hint="jrst"
*/
-public class JrstSiteModule extends AbstractSiteModule {
+@Component(role = SiteModule.class, hint = JrstDoxiaTool.JRST_PARSER_ID,
+ description = "Jrst doxia site mdule using jrst for rst.")
+public class JrstSiteModule
+ extends AbstractSiteModule {
@Override
public String getSourceDirectory() {
@@ -49,6 +53,6 @@
@Override
public String getParserId() {
- return "jrst";
+ return JrstDoxiaTool.JRST_PARSER_ID;
}
}
Modified: trunk/jrst/pom.xml
===================================================================
--- trunk/jrst/pom.xml 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/jrst/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
@@ -2,11 +2,8 @@
<!--
#%L
JRst :: Api
-
- $Id$
- $HeadURL$
%%
- Copyright (C) 2004 - 2011 CodeLutin, Chatellier Eric
+ Copyright (C) 2004 - 2012 CodeLutin, Chatellier Eric, Chemit tony
%%
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
Modified: trunk/jrst-doc/pom.xml
===================================================================
--- trunk/jrst-doc/pom.xml 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/jrst-doc/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
@@ -2,11 +2,8 @@
<!--
#%L
JRst :: Documentation
-
- $Id$
- $HeadURL$
%%
- Copyright (C) 2009 - 2010 CodeLutin
+ Copyright (C) 2009 - 2010 CodeLutin, Chemit tony
%%
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
Property changes on: trunk/jrst-site-util
___________________________________________________________________
Added: svn:ignore
+ target
*.ipr
*.iws
*.iml
.idea
.project
.classpath
.settings
Added: trunk/jrst-site-util/LICENSE.txt
===================================================================
--- trunk/jrst-site-util/LICENSE.txt (rev 0)
+++ trunk/jrst-site-util/LICENSE.txt 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Property changes on: trunk/jrst-site-util/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/README.txt
===================================================================
--- trunk/jrst-site-util/README.txt (rev 0)
+++ trunk/jrst-site-util/README.txt 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,21 @@
+Doxia Module JRst
+=================
+
+Configuration
+-------------
+
+To use it, put it in your pom.xml :
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>doxia-module-jrst</artifactId>
+ <version>${doxia-module-jrst.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+That it ! Then run "mvn site".
Property changes on: trunk/jrst-site-util/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/changelog.txt
===================================================================
--- trunk/jrst-site-util/changelog.txt (rev 0)
+++ trunk/jrst-site-util/changelog.txt 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,15 @@
+doxia-module-jrst (1.6.0)
+
+ * JrstParser use now JRST.java methods to generate the site
+
+doxia-module-jrst (1.1.0) ?
+
+ * migrate to nuiton
+
+doxia-module-jrst (1.0.1) chemit 20090511
+
+ * Bump versions (lutinproject 3.5.4, jrst 0.8.6)
+
+doxia-module-jrst (1.0.0) chemit
+
+ * Initial release
\ No newline at end of file
Property changes on: trunk/jrst-site-util/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/pom.xml
===================================================================
--- trunk/jrst-site-util/pom.xml (rev 0)
+++ trunk/jrst-site-util/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ JRst :: Site util
+ %%
+ Copyright (C) 2012 CodeLutin, Chemit tony
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.nuiton</groupId>
+ <artifactId>jrst</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.nuiton.jrst</groupId>
+ <artifactId>jrst-site-util</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>jrst</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ <!-- There is a pb with xalan -->
+ <exclusions>
+ <exclusion>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-module-xdoc</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-sink-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-core</artifactId>
+ <type>test-jar</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-site-renderer</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-doxia-tools</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <!--<scope>runtime</scope>-->
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-annotations</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <name>JRst :: Site util</name>
+ <description>JRst aven site utils used by any jrst doxia module</description>
+ <inceptionYear>2012</inceptionYear>
+
+ <developers>
+ <developer>
+ <name>Tony Chemit</name>
+ <id>tchemit</id>
+ <email>chemit(a)codelutin.com
+ </email>
+ <organization>CodeLutin</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ </developers>
+
+</project>
Property changes on: trunk/jrst-site-util/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/jrst-site-util/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/jrst-site-util/src/license/THIRD-PARTY.properties 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,33 @@
+# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache License
+# - BSD License
+# - BSD style
+# - Bouncy Castle Licence
+# - Bouncy Castle License
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+# - Common Public License Version 1.0
+# - GNU Lesser General Public License (LGPL), version 2.1
+# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LGPL) v 3.0
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
+# - MIT License
+# - Mozilla Public License
+# - Mozilla Public License Version 1.0
+# - The Apache Software License, Version 2.0
+# - The Jython License
+# - The Werken Company License
+# - X License (http://icu-project.org/repos/icu/icu4j/trunk/main/shared/licenses/license.h…)
+# - http://classworlds.codehaus.org/license.html
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Fri May 25 10:28:45 CEST 2012
+com.ibm.icu--icu4j--2.6.1=X License (http\://icu-project.org/repos/icu/icu4j/trunk/main/shared/licenses/license.html)
+commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
+dom4j--dom4j--1.6.1=BSD
+jdom--jdom--1.0=The Apache Software License, Version 2.0
+org.codehaus.plexus--plexus-classworlds--1.2-alpha-9=http\://classworlds.codehaus.org/license.html
Property changes on: trunk/jrst-site-util/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstDoxiaTool.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstDoxiaTool.java (rev 0)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstDoxiaTool.java 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,83 @@
+package org.nuiton.jrst;
+
+import org.apache.maven.doxia.logging.Log;
+import org.apache.maven.doxia.sink.render.RenderingContext;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.IOUtil;
+import org.nuiton.util.FileUtil;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Reader;
+
+/**
+ * Jrst tool used for some
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.1
+ */
+public class JrstDoxiaTool {
+
+ public static final String JRST_PARSER_ID = "jrst";
+
+ protected static RenderingContext renderingContext;
+
+ protected static MavenProject mavenProject;
+
+ protected static boolean verbose;
+
+ public static void setRenderingContext(RenderingContext renderingContext) {
+ JrstDoxiaTool.renderingContext = renderingContext;
+ }
+
+ public static void setMavenProject(MavenProject mavenProject) {
+ JrstDoxiaTool.mavenProject = mavenProject;
+ }
+
+ public static void setVerbose(boolean verbose) {
+ JrstDoxiaTool.verbose = verbose;
+ }
+
+ public static File prepareSourceFile(Log log,
+ Reader source) throws IOException {
+
+ File sourceFile;
+
+ if (JrstDoxiaTool.mavenProject == null) {
+ sourceFile = File.createTempFile("source", "rst");
+
+ } else {
+ File temporayDirectory = new File(
+ JrstDoxiaTool.mavenProject.getBasedir(),
+ "target" + File.separator + "generated-jrst");
+
+ sourceFile = new File(temporayDirectory, JrstDoxiaTool.renderingContext.getInputName());
+
+ FileUtil.createDirectoryIfNecessary(sourceFile.getParentFile());
+
+// // Write the source in a file to use it with JRST
+// sourceFile = File.createTempFile(renderingContext.getInputName(), ".rst",
+// temporayDirectory);
+ }
+
+ if (JrstDoxiaTool.verbose) {
+ log.info("Copy " + JrstDoxiaTool.renderingContext.getInputName() +
+ " to " + sourceFile);
+ }
+ FileWriter fileWriter = new FileWriter(sourceFile);
+ try {
+ IOUtil.copy(source, fileWriter);
+ } finally {
+ fileWriter.close();
+ }
+
+ return sourceFile;
+ }
+
+ public static void clear() {
+ renderingContext = null;
+ mavenProject = null;
+ verbose = false;
+ }
+}
Added: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java (rev 0)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,288 @@
+package org.nuiton.jrst;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.maven.doxia.sink.render.RenderingContext;
+import org.apache.maven.doxia.site.decoration.DecorationModel;
+import org.apache.maven.doxia.site.decoration.Menu;
+import org.apache.maven.doxia.site.decoration.MenuItem;
+import org.apache.maven.doxia.siterenderer.DefaultSiteRenderer;
+import org.apache.maven.doxia.siterenderer.DocumentRenderer;
+import org.apache.maven.doxia.siterenderer.Renderer;
+import org.apache.maven.doxia.siterenderer.RendererException;
+import org.apache.maven.doxia.siterenderer.SiteRenderingContext;
+import org.apache.maven.project.MavenProject;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.context.Context;
+import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.i18n.I18N;
+import org.codehaus.plexus.velocity.VelocityComponent;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.lang.reflect.Field;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * Override of the DefaultSiteRenderer to add pdf generation of the site.
+ *
+ * @author jpages <pages(a)codelutin.com>
+ * @author tchemit <chemit(a)codelutin.com>
+ * @version $Id$
+ * @since 1.0
+ */
+@Component(role = Renderer.class, hint = "default")
+public class JrstSiteRenderer extends DefaultSiteRenderer {
+
+ public static final String DEFAULT_PDF_FILENAME = "site";
+
+ /** All locales used to render sites. */
+ protected List<Locale> locales;
+
+ /** Current locale used to render. */
+ protected Locale locale;
+
+ /** Current maven project to render. */
+ protected MavenProject mavenProject;
+
+ protected boolean pdfGenerationEnabled;
+
+ protected Map<String, String> map;
+
+ protected boolean verbose;
+
+ @Override
+ public void render(Collection<DocumentRenderer> documents,
+ SiteRenderingContext siteRenderingContext,
+ File outputDirectory)
+ throws RendererException, IOException {
+
+ // prepare all common values for a given module
+
+ locale = siteRenderingContext.getLocale();
+
+ locales = Collections.unmodifiableList(siteRenderingContext.getSiteLocales());
+
+ Map<String, ?> templateProperties = siteRenderingContext.getTemplateProperties();
+
+ mavenProject = (MavenProject) templateProperties.get("project");
+
+ verbose = getBooleanProperty("site.verbose") ||
+ getLogger().isDebugEnabled();
+
+ map = new HashMap<String, String>();
+
+ pdfGenerationEnabled = getBooleanProperty("pdfGenerationEnabled");
+
+ super.render(documents, siteRenderingContext, outputDirectory);
+
+ if (pdfGenerationEnabled) {
+
+ if (verbose) {
+ getLogger().info("Will generate the site pdf.");
+ }
+
+ // get pdfFilename
+ String pdfFilename = getStringProperty("pdfFilename");
+ if (StringUtils.isBlank(pdfFilename)) {
+ pdfFilename = DEFAULT_PDF_FILENAME;
+ }
+
+ if (!locales.isEmpty() && !locale.equals(locales.get(0))) {
+ // not default locale, prefix with locale country.
+ pdfFilename += "_" + locale.getCountry();
+ }
+ pdfFilename += ".pdf";
+
+ try {
+ renderPdf(documents, siteRenderingContext,
+ outputDirectory,
+ pdfFilename);
+ } catch (Exception e) {
+ getLogger().error("Can't find rst resource to generate pdf documentation", e);
+ }
+ }
+ }
+
+ @Override
+ public void renderDocument(Writer writer,
+ RenderingContext renderingContext,
+ SiteRenderingContext context)
+ throws RendererException, FileNotFoundException, UnsupportedEncodingException {
+
+ if (JrstDoxiaTool.JRST_PARSER_ID.equals(renderingContext.getParserId())) {
+
+ // let's keep the current rendering context into the JrstParser
+ // to be able to have the document name to parse
+ JrstDoxiaTool.setRenderingContext(renderingContext);
+ JrstDoxiaTool.setMavenProject(mavenProject);
+ JrstDoxiaTool.setVerbose(verbose);
+
+ }
+ super.renderDocument(writer, renderingContext, context);
+ }
+
+ public void renderPdf(Collection<DocumentRenderer> documents,
+ SiteRenderingContext siteRenderingContext,
+ File outputDirectory, String pdfFilename)
+ throws RendererException, FileNotFoundException, UnsupportedEncodingException {
+ Context vc = new VelocityContext();
+
+ if (getLogger().isInfoEnabled()) {
+ getLogger().info("Generate Site Pdf: " + pdfFilename);
+ }
+ vc.put("locale", locale);
+ vc.put("supportedLocales", locales);
+
+ try {
+ StringWriter sw = new StringWriter();
+ Field velocityField = ReflectUtil.getField(DefaultSiteRenderer.class, "velocity");
+
+ VelocityComponent velocity = (VelocityComponent) velocityField.get(this);
+ VelocityEngine engine = velocity.getEngine();
+
+ Field i18nField = ReflectUtil.getField(DefaultSiteRenderer.class, "i18n");
+
+ I18N i18n = (I18N) i18nField.get(this);
+
+ String inputEncoding = siteRenderingContext.getInputEncoding();
+
+ // Set velocity variables
+ String tableOfContent = i18n.getString("jrst-site-renderer", locale, "content");
+ String docName = mavenProject.getName();
+ String titleDecoration = StringUtils.rightPad("", docName.length(), '=');
+ vc.put("titleDecoration", titleDecoration);
+ vc.put("docName", docName);
+ vc.put("tableContentName", tableOfContent);
+
+ // Build the map of html documents from .rst or .rst.vm files
+ File basedir = buildDocMap(documents);
+ vc.put("basedir", basedir.getAbsolutePath());
+ vc.put("separator", File.separatorChar);
+
+ // Build the list of item's href
+ DecorationModel decoration = siteRenderingContext.getDecoration();
+ List<Menu> menus = decoration.getMenus();
+ Collection<String> paths = new LinkedList<String>();
+ for (Menu menu : menus) {
+ List<MenuItem> items = menu.getItems();
+ for (MenuItem item : items) {
+ buildListPaths(item, paths, siteRenderingContext);
+ }
+ }
+
+ // Merge of the map of html file and the list of paths
+ List<String> documentRefs = mergeListAndMap(paths);
+ if (documentRefs.size() > 0) {
+ vc.put("documentRefs", documentRefs);
+
+ // Aggregate all rst file info one file
+ //TODO tchemit-2012-06-29 : use a property
+ engine.mergeTemplate("/META-INF/maven/RstAggregation.vm", inputEncoding, vc, sw);
+ String fileContent = sw.toString();
+ File pdfDoc = new File(outputDirectory, "pdfDoc.rst");
+ FileUtils.writeStringToFile(pdfDoc, fileContent, inputEncoding);
+
+ // Define the output file
+ File fileOut = new File(outputDirectory, pdfFilename);
+
+ // Generate the pdf file
+ JRST.generate("pdf", pdfDoc, fileOut, JRST.Overwrite.ALLTIME, false);
+ }
+
+ } catch (Exception e) {
+ getLogger().error("Can't generate pdf documentation of the project", e);
+ }
+ }
+
+ public File buildDocMap(Collection<DocumentRenderer> documents) {
+ File basedir = new File(".");
+ for (DocumentRenderer doc : documents) {
+ RenderingContext renderingContext = doc.getRenderingContext();
+ String inputName = renderingContext.getInputName();
+ String relativeDir = renderingContext.getRelativePath();
+ if (inputName.endsWith("rst") || inputName.endsWith("rst.vm")) {
+ // Change the extension to html
+ String[] splitName = inputName.split("\\.");
+ String htmlName = splitName[0] + "." + "html";
+ String relativePath = "." + File.separator + htmlName;
+ if (getLogger().isInfoEnabled()) {
+ getLogger().info("relativePath: " + relativePath);
+ }
+ // Add in a hashmap
+ map.put(relativePath, inputName);
+
+ if (relativeDir.equals(".") && inputName.startsWith("index")) {
+ basedir = renderingContext.getBasedir();
+ }
+ }
+ }
+ return basedir;
+ }
+
+ public List<String> mergeListAndMap(Collection<String> paths) {
+ // Merge the map and the list to obtain a list of rst files we can add in the pdf
+ List<String> documentRefs = new LinkedList<String>();
+ for (String path : paths) {
+ // Seek in the hashmap if the rst file exists to add it in the doc list
+ String rstFilename = map.get(path);
+ if (rstFilename != null) {
+ documentRefs.add(rstFilename);
+ }
+ }
+ return documentRefs;
+ }
+
+ public Collection<String> buildListPaths(MenuItem item, Collection<String> paths,
+ SiteRenderingContext siteRenderingContext) {
+ // add hrefs to paths if they don't start with "http" or ".."
+ String href = item.getHref();
+ if (!href.startsWith("http") && !href.startsWith("..")) {
+ boolean addHref = true;
+ for (Locale loc : siteRenderingContext.getSiteLocales()) {
+ if (href.startsWith(loc.toString())) {
+ addHref = false;
+ }
+ }
+ if (addHref) {
+ if (!href.startsWith("./")) {
+ href = "./" + href;
+ }
+ if (getLogger().isInfoEnabled()) {
+ getLogger().info("xml: " + href);
+ }
+ paths.add(href);
+ }
+ }
+ // If the item has sub-items, we use recursion to add them to paths
+ List<MenuItem> subItems = item.getItems();
+ if (!subItems.isEmpty()) {
+ for (MenuItem subItem : subItems) {
+ paths = buildListPaths(subItem, paths, siteRenderingContext);
+ }
+ }
+ return paths;
+ }
+
+ protected String getStringProperty(String propertyName) {
+ String value = String.valueOf(mavenProject.getModel().getProperties().get(propertyName));
+ return value;
+ }
+
+ protected boolean getBooleanProperty(String propertyName) {
+ boolean result = "true".equals(getStringProperty(propertyName));
+ return result;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/ReflectUtil.java
===================================================================
--- trunk/jrst-site-util/src/main/java/org/nuiton/jrst/ReflectUtil.java (rev 0)
+++ trunk/jrst-site-util/src/main/java/org/nuiton/jrst/ReflectUtil.java 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,70 @@
+/*
+ * #%L
+ * Maven Nuiton Skin
+ *
+ * $Id$
+ * $HeadURL: http://svn.nuiton.org/svn/maven-nuiton-skin/trunk/src/main/java/org/nuiton/… $
+ * %%
+ * Copyright (C) 2006 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+package org.nuiton.jrst;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+/**
+ * Some usefull methods to obtains none accessible fields and method from
+ * some classes.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0.6
+ */
+public class ReflectUtil {
+
+ public static Method getMethod(Class<?> klass, String methodName, Class<?>[] paramTypes) {
+ try {
+ Method declaredMethod = klass.getDeclaredMethod(methodName, paramTypes);
+ declaredMethod.setAccessible(true);
+ return declaredMethod;
+ } catch (Exception e) {
+ throw new IllegalStateException("Could not get method [" + methodName + "] from parent class :(... ", e);
+ }
+
+ }
+
+ public static Field getField(Class<?> klass, String fieldName) {
+ try {
+ Field declaredField = klass.getDeclaredField(fieldName);
+ declaredField.setAccessible(true);
+ return declaredField;
+ } catch (Exception e) {
+ throw new IllegalStateException("Could not get field [" + fieldName + "] from parent class :(... ", e);
+ }
+
+ }
+
+ public static <O> O invokeMethod(Method m, Object o, Object... params) {
+ try {
+ O result = (O) m.invoke(o, params);
+ return result;
+ } catch (Exception e) {
+ throw new IllegalStateException("Could not invoke method [" + m.getName() + "] from parent class :(... ", e);
+ }
+
+ }
+}
Property changes on: trunk/jrst-site-util/src/main/java/org/nuiton/jrst/ReflectUtil.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/main/resources/META-INF/maven/RstAggregation.vm
===================================================================
--- trunk/jrst-site-util/src/main/resources/META-INF/maven/RstAggregation.vm (rev 0)
+++ trunk/jrst-site-util/src/main/resources/META-INF/maven/RstAggregation.vm 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,35 @@
+.. -
+.. * #%L
+.. * JRst :: Documentation
+.. *
+.. * $Id$
+.. * $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/jrst-doc/src/site/rst/index.rst $
+.. * %%
+.. * Copyright (C) 2009 - 2010 CodeLutin
+.. * %%
+.. * This program is free software: you can redistribute it and/or modify
+.. * it under the terms of the GNU Lesser General Public License as
+.. * published by the Free Software Foundation, either version 3 of the
+.. * License, or (at your option) any later version.
+.. *
+.. * This program is distributed in the hope that it will be useful,
+.. * but WITHOUT ANY WARRANTY; without even the implied warranty of
+.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.. * GNU General Lesser Public License for more details.
+.. *
+.. * You should have received a copy of the GNU General Lesser Public
+.. * License along with this program. If not, see
+.. * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+.. * #L%
+.. -
+
+$titleDecoration
+$docName
+$titleDecoration
+
+.. contents:: $tableContentName
+
+
+#foreach($ref in $documentRefs)
+.. include:: $basedir$separator$ref
+#end
\ No newline at end of file
Property changes on: trunk/jrst-site-util/src/main/resources/META-INF/maven/RstAggregation.vm
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/main/resources/META-INF/plexus/components.xml
===================================================================
--- trunk/jrst-site-util/src/main/resources/META-INF/plexus/components.xml (rev 0)
+++ trunk/jrst-site-util/src/main/resources/META-INF/plexus/components.xml 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ Maven Nuiton Skin
+
+ $Id$
+ $HeadURL: http://svn.nuiton.org/svn/maven-nuiton-skin/trunk/src/main/resources/META-I… $
+ %%
+ Copyright (C) 2006 - 2011 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+
+<component-set>
+ <components>
+ <component>
+ <role>org.apache.maven.doxia.siterenderer.Renderer</role>
+ <role-hint>default</role-hint>
+ <implementation>org.nuiton.jrst.JrstSiteRenderer</implementation>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.doxia.tools.SiteTool</role>
+ <field-name>siteTool</field-name>
+ <role-hint>default</role-hint>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.velocity.VelocityComponent</role>
+ <field-name>velocity</field-name>
+ <role-hint>doxia-default</role-hint>
+ </requirement>
+ <requirement>
+ <role>org.apache.maven.doxia.module.site.manager.SiteModuleManager</role>
+ <field-name>siteModuleManager</field-name>
+ </requirement>
+ <requirement>
+ <role>org.apache.maven.doxia.Doxia</role>
+ <field-name>doxia</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.i18n.I18N</role>
+ <field-name>i18n</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ </components>
+</component-set>
Property changes on: trunk/jrst-site-util/src/main/resources/META-INF/plexus/components.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties
===================================================================
--- trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties (rev 0)
+++ trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1 @@
+content=Table of content
Property changes on: trunk/jrst-site-util/src/main/resources/jrst-site-renderer.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties
===================================================================
--- trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties (rev 0)
+++ trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,6 @@
+# NOTE:
+# This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It
+# must be provided nevertheless such that a request for locale "en" will not errorneously pick up the bundle for the
+# JVM's default locale (which need not be "en"). See the method javadoc about
+# ResourceBundle.getBundle(String, Locale, ClassLoader)
+# for a full description of the lookup strategy.
\ No newline at end of file
Property changes on: trunk/jrst-site-util/src/main/resources/jrst-site-renderer_en.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties
===================================================================
--- trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties (rev 0)
+++ trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1 @@
+content=Sommaire
\ No newline at end of file
Property changes on: trunk/jrst-site-util/src/main/resources/jrst-site-renderer_fr.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/site/apt/devel.apt
===================================================================
--- trunk/jrst-site-util/src/site/apt/devel.apt (rev 0)
+++ trunk/jrst-site-util/src/site/apt/devel.apt 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,35 @@
+~~~
+~~ #%L
+~~ JRst :: Doxia module
+~~
+~~ $Id$
+~~ $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/apt/devel.a… $
+~~ %%
+~~ Copyright (C) 2009 - 2010 CodeLutin
+~~ %%
+~~ This program is free software: you can redistribute it and/or modify
+~~ it under the terms of the GNU Lesser General Public License as
+~~ published by the Free Software Foundation, either version 3 of the
+~~ License, or (at your option) any later version.
+~~
+~~ This program is distributed in the hope that it will be useful,
+~~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+~~ GNU General Lesser Public License for more details.
+~~
+~~ You should have received a copy of the GNU General Lesser Public
+~~ License along with this program. If not, see
+~~ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+~~ #L%
+~~~
+
+ -------------
+ Documentation
+ -------------
+
+Documentation
+
+ JRst doxia module, is inherited from {{{http://maven.apache.org/doxia/doxia-1.0.x/doxia-modules/doxia-module-xdoc/index.html}doxia-module-xdoc}}.
+
+ It just intercept xdoc parser call, transform RST into xdoc, and
+ then send generated xdoc to XDoc parser.
\ No newline at end of file
Property changes on: trunk/jrst-site-util/src/site/apt/devel.apt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/site/apt/index.apt
===================================================================
--- trunk/jrst-site-util/src/site/apt/index.apt (rev 0)
+++ trunk/jrst-site-util/src/site/apt/index.apt 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,47 @@
+~~~
+~~ #%L
+~~ JRst :: Doxia module
+~~
+~~ $Id$
+~~ $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/apt/index.a… $
+~~ %%
+~~ Copyright (C) 2009 - 2010 CodeLutin
+~~ %%
+~~ This program is free software: you can redistribute it and/or modify
+~~ it under the terms of the GNU Lesser General Public License as
+~~ published by the Free Software Foundation, either version 3 of the
+~~ License, or (at your option) any later version.
+~~
+~~ This program is distributed in the hope that it will be useful,
+~~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+~~ GNU General Lesser Public License for more details.
+~~
+~~ You should have received a copy of the GNU General Lesser Public
+~~ License along with this program. If not, see
+~~ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+~~ #L%
+~~~
+
+ -----------------
+ Doxia Module JRst
+ -----------------
+
+Configuration
+
+--------------------------------------------------
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.0</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.nuiton.jrst</groupId>
+ <artifactId>doxia-module-jrst</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+--------------------------------------------------
+
+ Ensuite vous avez plus qu'à lancer la commande mvn site
\ No newline at end of file
Property changes on: trunk/jrst-site-util/src/site/apt/index.apt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/site/en/apt/devel.apt
===================================================================
--- trunk/jrst-site-util/src/site/en/apt/devel.apt (rev 0)
+++ trunk/jrst-site-util/src/site/en/apt/devel.apt 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,35 @@
+~~~
+~~ #%L
+~~ JRst :: Doxia module
+~~
+~~ $Id$
+~~ $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/en/apt/deve… $
+~~ %%
+~~ Copyright (C) 2009 - 2010 CodeLutin
+~~ %%
+~~ This program is free software: you can redistribute it and/or modify
+~~ it under the terms of the GNU Lesser General Public License as
+~~ published by the Free Software Foundation, either version 3 of the
+~~ License, or (at your option) any later version.
+~~
+~~ This program is distributed in the hope that it will be useful,
+~~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+~~ GNU General Lesser Public License for more details.
+~~
+~~ You should have received a copy of the GNU General Lesser Public
+~~ License along with this program. If not, see
+~~ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+~~ #L%
+~~~
+
+ -------------
+ Documentation
+ -------------
+
+Documentation
+
+ JRst doxia module, is inherited from {{{http://maven.apache.org/doxia/doxia-1.0.x/doxia-modules/doxia-module-xdoc/index.html}doxia-module-xdoc}}.
+
+ It just intercept xdoc parser call, transform RST into xdoc, and
+ then send generated xdoc to XDoc parser.
\ No newline at end of file
Property changes on: trunk/jrst-site-util/src/site/en/apt/devel.apt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/site/en/apt/index.apt
===================================================================
--- trunk/jrst-site-util/src/site/en/apt/index.apt (rev 0)
+++ trunk/jrst-site-util/src/site/en/apt/index.apt 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,52 @@
+~~~
+~~ #%L
+~~ JRst :: Doxia module
+~~
+~~ $Id$
+~~ $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/en/apt/inde… $
+~~ %%
+~~ Copyright (C) 2009 - 2010 CodeLutin
+~~ %%
+~~ This program is free software: you can redistribute it and/or modify
+~~ it under the terms of the GNU Lesser General Public License as
+~~ published by the Free Software Foundation, either version 3 of the
+~~ License, or (at your option) any later version.
+~~
+~~ This program is distributed in the hope that it will be useful,
+~~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+~~ GNU General Lesser Public License for more details.
+~~
+~~ You should have received a copy of the GNU General Lesser Public
+~~ License along with this program. If not, see
+~~ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+~~ #L%
+~~~
+
+ -----------------
+ Doxia Module JRst
+ -----------------
+
+Configuration
+
+--------------------------------------------------
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.0</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>doxia-module-jrst</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+--------------------------------------------------
+
+ That it ! Then run "mvn site".
+
+
+Warning
+
+ This version only works with doxia-1.0.x (provided by maven-site-plugin-2.0).
\ No newline at end of file
Property changes on: trunk/jrst-site-util/src/site/en/apt/index.apt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/site/site_en.xml
===================================================================
--- trunk/jrst-site-util/src/site/site_en.xml (rev 0)
+++ trunk/jrst-site-util/src/site/site_en.xml 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ JRst :: Doxia module
+
+ $Id$
+ $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/site_en.xml $
+ %%
+ Copyright (C) 2009 - 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+
+<project name="${project.name}">
+
+ <bannerLeft>
+ <name>${project.name}</name>
+ <href>/</href>
+ </bannerLeft>
+
+ <body>
+
+ <breadcrumbs>
+ <item name="${project.name}" href="index.html"/>
+ </breadcrumbs>
+
+ <links>
+ <item name="[fr" href="../index.html"/>
+ <item name="en]" href="index.html"/>
+ </links>
+
+ <menu name="Project Parent">
+ <item name="JRst" href="../../en/index.html"/>
+ </menu>
+
+ <menu name="User">
+ <item href="/index.html" name="About"/>
+ </menu>
+
+ <menu name="Developer">
+ <item href="/devel.html" name="Documentation"/>
+ </menu>
+
+ <menu name="Community">
+ <item name="Bugtracker" href="http://nuiton.org/projects/jrst/issues"/>
+ <item name="Roadmap" href="http://nuiton.org/projects/roadmap/jrst"/>
+ <item name="Downloads" href="http://nuiton.org/projects/jrst/files"/>
+ <item name="Continuous integration"
+ href="http://hudson.nuiton.org/hudson/job/jrst"/>
+ <item name="Code analysis"
+ href="http://sonar.nuiton.org/sonar/project/index/org.nuiton:jrst"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ <footer>
+
+ <script type="text/javascript"
+ src="http://maven-site.nuiton.org/public/js/maven-site-nuiton.org.js">
+ </script>
+
+ <div id='projectMetas'
+ projectversion='${project.version}'
+ platform='${project.platform}'
+ projectid='${project.projectId}'
+ scm='${project.scm.connection}'
+ scmwebeditorenabled='${project.scmwebeditorEnabled}'
+ scmwebeditorurl='${project.scmwebeditorUrl}'
+ siteSourcesType='${project.siteSourcesType}'
+ piwikEnabled='${project.piwikEnabled}'
+ piwikId='${project.piwikId}'>
+ </div>
+ </footer>
+
+ </body>
+</project>
Property changes on: trunk/jrst-site-util/src/site/site_en.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/jrst-site-util/src/site/site_fr.xml
===================================================================
--- trunk/jrst-site-util/src/site/site_fr.xml (rev 0)
+++ trunk/jrst-site-util/src/site/site_fr.xml 2012-06-29 20:05:59 UTC (rev 724)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ JRst :: Doxia module
+
+ $Id$
+ $HeadURL: http://svn.nuiton.org/svn/jrst/trunk/doxia-module-jrst/src/site/site_fr.xml $
+ %%
+ Copyright (C) 2009 - 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+
+<project name="${project.name}">
+
+ <bannerLeft>
+ <name>${project.name}</name>
+ <href>/</href>
+ </bannerLeft>
+
+ <body>
+
+ <breadcrumbs>
+ <item name="${project.name}" href="${project.url}"/>
+ </breadcrumbs>
+
+ <links>
+ <item name="[fr" href="index.html"/>
+ <item name="en]" href="en/index.html"/>
+ </links>
+
+ <menu ref="parent"/>
+
+ <menu name="Utilisateur">
+ <item href="/index.html" name="A propos"/>
+ </menu>
+
+ <menu name="Developpeur">
+ <item href="/devel.html" name="Documentation"/>
+ </menu>
+
+ <menu name="Communauté">
+ <item name="Suivi des bugs"
+ href="http://nuiton.org/projects/jrst/issues"/>
+ <item name="Roadmap" href="http://nuiton.org/projects/roadmap/jrst"/>
+ <item name="Téléchargements"
+ href="http://nuiton.org/projects/jrst/files"/>
+ <item name="Intégration continue"
+ href="http://hudson.nuiton.org/hudson/job/jrst"/>
+ <item name="Analyse du code"
+ href="http://sonar.nuiton.org/sonar/project/index/org.nuiton:jrst"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ <footer>
+
+ <script type="text/javascript"
+ src="http://maven-site.nuiton.org/public/js/maven-site-nuiton.org.js">
+ </script>
+
+ <div id='projectMetas'
+ projectversion='${project.version}'
+ platform='${project.platform}'
+ projectid='${project.projectId}'
+ scm='${project.scm.connection}'
+ scmwebeditorenabled='${project.scmwebeditorEnabled}'
+ scmwebeditorurl='${project.scmwebeditorUrl}'
+ siteSourcesType='${project.siteSourcesType}'
+ piwikEnabled='${project.piwikEnabled}'
+ piwikId='${project.piwikId}'>
+ </div>
+ </footer>
+
+ </body>
+</project>
Property changes on: trunk/jrst-site-util/src/site/site_fr.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-06-19 14:33:14 UTC (rev 723)
+++ trunk/pom.xml 2012-06-29 20:05:59 UTC (rev 724)
@@ -2,9 +2,6 @@
<!--
#%L
JRst
-
- $Id$
- $HeadURL$
%%
Copyright (C) 2004 - 2011 CodeLutin, Chatellier Eric
%%
@@ -23,7 +20,9 @@
<http://www.gnu.org/licenses/lgpl-3.0.html>.
#L%
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -33,7 +32,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmineAndCentral</artifactId>
- <version>3.3.1</version>
+ <version>3.3.3</version>
</parent>
<artifactId>jrst</artifactId>
@@ -44,6 +43,7 @@
<module>jrst</module>
<!-- Evolution #35: Suppression du module "maven-jrst-plugin" -->
<!--<module>maven-jrst-plugin</module>-->
+ <module>jrst-site-util</module>
<module>doxia-module-jrst</module>
<module>doxia-module-jrst-legacy</module>
<module>jrst-doc</module>
@@ -67,7 +67,7 @@
<dependency>
<groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
+ <artifactId>helper-maven-plugin</artifactId>
<version>${helperPluginVersion}</version>
<exclusions>
<exclusion>
@@ -155,6 +155,12 @@
</dependency>
<dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-annotations</artifactId>
+ <version>1.5.5</version>
+ </dependency>
+
+ <dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.3</version>
@@ -290,7 +296,7 @@
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
- </dependency>
+ </dependency>
<!-- jaxx dependencies -->
@@ -392,7 +398,7 @@
<doxiaVersion>1.3</doxiaVersion>
<doxiaSitetoolsVersion>1.2</doxiaSitetoolsVersion>
- <nuitonUtilsVersion>2.4.8</nuitonUtilsVersion>
+ <nuitonUtilsVersion>2.5</nuitonUtilsVersion>
<nuitonI18nVersion>2.4.1</nuitonI18nVersion>
<xalanVersion>2.7.1</xalanVersion>
<jaxxVersion>2.5-SNAPSHOT</jaxxVersion>
@@ -416,6 +422,12 @@
<version>${jaxxVersion}</version>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <version>1.5.5</version>
+ </plugin>
+
</plugins>
</pluginManagement>
@@ -493,6 +505,4 @@
</profiles>
-
-
</project>
1
0
r723 - in trunk: doxia-module-jrst/src/main/java/org/nuiton/jrst doxia-module-jrst/src/main/resources/META-INF/maven jrst-doc/src/site/rst/user
by jpages@users.nuiton.org 19 Jun '12
by jpages@users.nuiton.org 19 Jun '12
19 Jun '12
Author: jpages
Date: 2012-06-19 16:33:14 +0200 (Tue, 19 Jun 2012)
New Revision: 723
Url: http://nuiton.org/repositories/revision/jrst/723
Log:
Suite de la g?\195?\169n?\195?\169ration dans doxia-module-jrst de la doc en pdf (pas termin?\195?\169 encore)
Attention : dans certains projets, les ressources ne sont pas r?\195?\169cup?\195?\169r?\195?\169es o?\195?\185 il faut, ce qui cause des erreurs.
Modified:
trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
trunk/doxia-module-jrst/src/main/resources/META-INF/maven/RstAggregation.vm
trunk/jrst-doc/src/site/rst/user/presentationRST.rst
Modified: trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
===================================================================
--- trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-18 16:34:48 UTC (rev 722)
+++ trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-19 14:33:14 UTC (rev 723)
@@ -5,7 +5,7 @@
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.util.Collections;
-import java.util.Iterator;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
@@ -56,12 +56,14 @@
*
* @component
*/
- private Locale locale;
+ public Locale locale;
- private MavenProject mavenProject;
+ public MavenProject mavenProject;
- private boolean pdfGenerationEnabled;
+ public boolean pdfGenerationEnabled;
+ public HashMap<String, String> map;
+
public void render(Collection<DocumentRenderer> documents,
SiteRenderingContext siteRenderingContext,
File outputDirectory)
@@ -77,10 +79,11 @@
mavenProject = (MavenProject) templateProperties.get("project");
- pdfGenerationEnabled = true;
- /* getBooleanProperty(
- (String) mavenProject.getProperties().get("pdfGenerationEnabled")); */
+ map = new HashMap<String, String>();
+ pdfGenerationEnabled = getBooleanProperty(
+ (String) mavenProject.getProperties().get("pdfGenerationEnabled"));
+
if (pdfGenerationEnabled) {
String absolutePath = outputDirectory.getAbsolutePath();
try {
@@ -113,16 +116,20 @@
String docName = DOC_NAME_EN;
String filename = FILE_NAME_EN;
if (locale.equals(Locale.FRENCH)) {
+ tableOfContent = CONTENT_FR;
docName = DOC_NAME_FR;
- tableOfContent = CONTENT_FR;
filename = FILE_NAME_FR;
}
-
String titleDecoration = StringUtils.rightPad("", docName.length(), '=');
vc.put("titleDecoration", titleDecoration);
vc.put( "docName", docName);
vc.put( "tableContentName", tableOfContent);
+ // Build the map of html documents from .rst or .rst.vm files
+ File basedir = buildDocMap(documents);
+ vc.put("basedir", basedir.getAbsolutePath());
+ vc.put("separator", File.separatorChar);
+
// Build the list of item's href
DecorationModel decoration = siteRenderingContext.getDecoration();
List<Menu> menus = decoration.getMenus();
@@ -134,31 +141,8 @@
}
}
- // Build the map of html documents from .rst or .rst.vm files
- //HashMap<String, String> map = new HashMap<String, String>();
- LinkedList<String> htmlFiles = new LinkedList<String>();
- Iterator<DocumentRenderer> iterator = documents.iterator();
- while (iterator.hasNext()) {
- DocumentRenderer doc = iterator.next();
- RenderingContext renderingContext = doc.getRenderingContext();
- String inputName = renderingContext.getInputName();
- if (inputName.endsWith("rst") || inputName.endsWith("rst.vm")) {
- String[] splitName = inputName.split("\\.");
- String htmlName = splitName[0] + "." + "html";
- htmlFiles.add(htmlName);
- }
- }
-
// Merge of the map of html file and the list of paths
- List<String> documentRefs = new LinkedList<String>();
- for (String path: paths) {
- for (String file : htmlFiles) {
- if (file.equals(path)) {
- documentRefs.add(file);
-
- }
- }
- }
+ List<String> documentRefs = mergeListAndMap(paths);
if (documentRefs.size() > 0) {
vc.put("documentRefs", documentRefs);
@@ -169,6 +153,7 @@
File pdfDoc = new File(tempFilePath);
FileUtils.writeStringToFile(pdfDoc, fileContent, "UTF-8");
String outputFilePath = outputDirectory + File.separatorChar + filename;
+ log.info(outputFilePath);
// Define the output file
File fileOut = new File(outputFilePath);
@@ -183,6 +168,42 @@
}
}
+ public File buildDocMap(Collection<DocumentRenderer> documents) {
+ File basedir = new File(".");
+ for (DocumentRenderer doc : documents) {
+ RenderingContext renderingContext = doc.getRenderingContext();
+ String inputName = renderingContext.getInputName();
+ String relativeDir = renderingContext.getRelativePath();
+ if (inputName.endsWith("rst") || inputName.endsWith("rst.vm")) {
+ // Change the extension to html
+ String[] splitName = inputName.split("\\.");
+ String htmlName = splitName[0] + "." + "html";
+ String relativePath = "." + File.separator + htmlName;
+ log.info("relativePath: " + relativePath);
+ // Add in a hashmap
+ map.put(relativePath, inputName);
+
+ if (relativeDir.equals(".") && inputName.startsWith("index")) {
+ basedir = renderingContext.getBasedir();
+ }
+ }
+ }
+ return basedir;
+ }
+
+ public List<String> mergeListAndMap(Collection<String> paths) {
+ // Merge the map and the list to obtain a list of rst files we can add in the pdf
+ List<String> documentRefs = new LinkedList<String>();
+ for (String path: paths) {
+ // Seek in the hashmap if the rst file exists to add it in the doc list
+ String rstFilename = map.get(path);
+ if ( rstFilename != null) {
+ documentRefs.add(rstFilename);
+ }
+ }
+ return documentRefs;
+ }
+
public Collection<String> buildListPaths(MenuItem item, Collection<String> paths,
SiteRenderingContext siteRenderingContext) {
// add hrefs to paths if they don't start with "http" or ".."
@@ -195,6 +216,10 @@
}
}
if (addHref) {
+ if(!href.startsWith("./")) {
+ href = "./" + href;
+ }
+ log.info("xml: " + href);
paths.add(href);
}
}
Modified: trunk/doxia-module-jrst/src/main/resources/META-INF/maven/RstAggregation.vm
===================================================================
--- trunk/doxia-module-jrst/src/main/resources/META-INF/maven/RstAggregation.vm 2012-06-18 16:34:48 UTC (rev 722)
+++ trunk/doxia-module-jrst/src/main/resources/META-INF/maven/RstAggregation.vm 2012-06-19 14:33:14 UTC (rev 723)
@@ -30,6 +30,6 @@
.. contents:: $tableContentName
-#foreach($document in $documents)
-.. include:: $documentRefs
+#foreach($ref in $documentRefs)
+.. include:: $basedir$separator$ref
#end
\ No newline at end of file
Modified: trunk/jrst-doc/src/site/rst/user/presentationRST.rst
===================================================================
--- trunk/jrst-doc/src/site/rst/user/presentationRST.rst 2012-06-18 16:34:48 UTC (rev 722)
+++ trunk/jrst-doc/src/site/rst/user/presentationRST.rst 2012-06-19 14:33:14 UTC (rev 723)
@@ -43,7 +43,7 @@
Structure
----------
+=========
Pour commencer, il me semble que "Structured Text" n'est pas tout à fait la
bonne appellation. Nous devrions plutôt le nommer "Relaxed Text" qui contient
@@ -77,7 +77,7 @@
__ http://docutils.sourceforge.net/docs/rst/quickref.html#paragraphs
Styles de texte
----------------
+===============
(quickref__)
@@ -106,7 +106,7 @@
__ http://docutils.sourceforge.net/docs/rst/quickref.html#escaping
Listes
-------
+======
Il y a trois types de listes: **numérotées**, **avec puces** et
de **définitions**. Dans chaque cas, nous pouvons avoir autant
@@ -220,7 +220,7 @@
Les lignes vides ne sont pas autorisées entre le terme et la définition.
Préformatage
-------------
+============
(quickref__)
__ http://docutils.sourceforge.net/docs/rst/quickref.html#literal-blocks
@@ -253,7 +253,7 @@
le paragraphe "::" est ignoré.
Sections
---------
+========
(quickref__)
__ http://docutils.sourceforge.net/docs/rst/quickref.html#section-structure
@@ -331,7 +331,7 @@
Images
-------
+======
(quickref__)
__ http://docutils.sourceforge.net/docs/rst/quickref.html#directives
@@ -364,7 +364,7 @@
Et ensuite ?
-------------
+============
Cette introduction montre les possibilités les plus courantes de reStructuredText,
mais il y en a bien d'autres à explorer. Le manuel de référence utilisateur
1
0
r722 - in trunk: docutils/src/main/resources/docutils doxia-module-jrst/src/main/java/org/nuiton/jrst doxia-module-jrst/src/main/resources/META-INF/maven jrst/src/main/java/org/nuiton/jrst jrst/src/test/java/org/nuiton/jrst
by jpages@users.nuiton.org 18 Jun '12
by jpages@users.nuiton.org 18 Jun '12
18 Jun '12
Author: jpages
Date: 2012-06-18 18:34:48 +0200 (Mon, 18 Jun 2012)
New Revision: 722
Url: http://nuiton.org/repositories/revision/jrst/722
Log:
Suite du d?\195?\169veloppement de la g?\195?\169n?\195?\169ration pdf dans le module doxia
Modified:
trunk/docutils/src/main/resources/docutils/__run__.py
trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/ReflectUtil.java
trunk/doxia-module-jrst/src/main/resources/META-INF/maven/RstAggregation.vm
trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java
trunk/jrst/src/test/java/org/nuiton/jrst/JRSTTest.java
Modified: trunk/docutils/src/main/resources/docutils/__run__.py
===================================================================
--- trunk/docutils/src/main/resources/docutils/__run__.py 2012-06-14 17:35:04 UTC (rev 721)
+++ trunk/docutils/src/main/resources/docutils/__run__.py 2012-06-18 16:34:48 UTC (rev 722)
@@ -36,7 +36,7 @@
__builtin__.__dict__["openlegacy"] = __builtin__.__dict__["open"]
__builtin__.__dict__["open"] = jaropen
-def exec_docutils (docutilsPath, typeOutput, fileList):
+def exec_docutils (docutilsPath, typeOutput, fileIn):
# Initalization before using Docutils
init_docutils(docutilsPath)
@@ -55,7 +55,6 @@
listType = ["xml", "html", "odt", "latex", "man", "s5", "xetex"]
if typeOutput in listType:
from docutils.core import publish_file
- for fileIn in fileList:
- publish_file( source_path=fileIn, writer_name=typeOutput )
+ publish_file( source_path=fileIn, writer_name=typeOutput )
else:
print "Wrong output format"
Modified: trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java
===================================================================
--- trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-14 17:35:04 UTC (rev 721)
+++ trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/JrstSiteRenderer.java 2012-06-18 16:34:48 UTC (rev 722)
@@ -1,36 +1,36 @@
package org.nuiton.jrst;
import java.io.FileNotFoundException;
-import java.io.Reader;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.maven.doxia.sink.render.RenderingContext;
+import org.apache.maven.doxia.site.decoration.DecorationModel;
+import org.apache.maven.doxia.site.decoration.Menu;
+import org.apache.maven.doxia.site.decoration.MenuItem;
import org.apache.maven.doxia.siterenderer.DefaultSiteRenderer;
import org.apache.maven.doxia.siterenderer.DocumentRenderer;
import org.apache.maven.doxia.siterenderer.RendererException;
import org.apache.maven.doxia.siterenderer.SiteRenderingContext;
-import org.apache.maven.doxia.siterenderer.sink.SiteRendererSink;
-import org.apache.maven.doxia.tools.SiteTool;
import org.apache.maven.project.MavenProject;
+import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;
import java.io.File;
import java.io.IOException;
-import java.io.Writer;
-import java.lang.reflect.Method;
import java.util.Collection;
-import java.util.List;
import java.util.Locale;
import java.util.Map;
-import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.velocity.SiteResourceLoader;
import org.codehaus.plexus.velocity.VelocityComponent;
-
+import org.apache.commons.io.FileUtils;
/**
* Override of the DefaultSiteRenderer to add pdf generation of the site.
*
@@ -41,6 +41,14 @@
*/
public class JrstSiteRenderer extends DefaultSiteRenderer {
+
+ static public final String DOC_NAME_EN = "JRST documentation";
+ static public final String CONTENT_EN = "Table of content";
+ static public final String FILE_NAME_EN = "DocumentationJRST.pdf";
+ static public final String DOC_NAME_FR = "Documentation JRST";
+ static public final String CONTENT_FR = "Sommaire";
+ static public final String FILE_NAME_FR = "DocumentationJRST.pdf";
+
protected static Log log = LogFactory.getLog(JrstSiteRenderer.class);
/**
@@ -48,52 +56,12 @@
*
* @component
*/
- protected SiteTool siteTool;
-
- // this method is the private one from super class
- protected Method createContextMethod;
-
- // this method is the private one from super class
- protected Method writeTemplateMethod;
-
- private String siteSourcesType;
-
- private List<Locale> locales;
-
private Locale locale;
private MavenProject mavenProject;
private boolean pdfGenerationEnabled;
- protected Method getWriteTemplateMethod() {
- if (writeTemplateMethod == null) {
- writeTemplateMethod = ReflectUtil.getMethod(
- getClass().getSuperclass(),
- "writeTemplate",
- new Class<?>[]{
- Writer.class,
- Context.class,
- SiteRenderingContext.class
- });
- }
- getLogger();
- return writeTemplateMethod;
- }
-
- protected Method getCreateContextMethod() {
- if (createContextMethod == null) {
- createContextMethod = ReflectUtil.getMethod(
- getClass().getSuperclass(),
- "createContext",
- new Class<?>[]{
- SiteRendererSink.class,
- SiteRenderingContext.class}
- );
- }
- return createContextMethod;
- }
-
public void render(Collection<DocumentRenderer> documents,
SiteRenderingContext siteRenderingContext,
File outputDirectory)
@@ -105,76 +73,141 @@
Map<String, ?> templateProperties = siteRenderingContext.getTemplateProperties();
+ super.render(documents, siteRenderingContext, outputDirectory);
+
mavenProject = (MavenProject) templateProperties.get("project");
- pdfGenerationEnabled = getBooleanProperty(
- (String) mavenProject.getProperties().get("pdfGenerationEnabled"));
+ pdfGenerationEnabled = true;
+ /* getBooleanProperty(
+ (String) mavenProject.getProperties().get("pdfGenerationEnabled")); */
if (pdfGenerationEnabled) {
- File file = new File("./main/resources/META-INF/maven/");
- String documentName = "RstAggregation";
- RenderingContext renderingContext = new RenderingContext(file, documentName);
- renderDocument(documents, renderingContext, siteRenderingContext);
+ String absolutePath = outputDirectory.getAbsolutePath();
+ try {
+ renderPdf(documents, siteRenderingContext, absolutePath);
+ } catch (Exception e) {
+ log.error("Can't find rst resource to generate pdf documentation", e);
+ }
}
- super.render(documents, siteRenderingContext, outputDirectory);
}
- /** {@inheritDoc} */
- public void renderDocument(Collection<DocumentRenderer> documents, RenderingContext renderingContext, SiteRenderingContext context)
+ public void renderPdf(Collection<DocumentRenderer> documents, SiteRenderingContext siteRenderingContext,
+ String outputDirectory)
throws RendererException, FileNotFoundException, UnsupportedEncodingException
{
- SiteRendererSink sink = new SiteRendererSink( renderingContext );
+ Context vc = new VelocityContext();
- File doc = new File( renderingContext.getBasedir(), renderingContext.getInputName() );
+ vc.put( "locale", locale );
+ vc.put( "supportedLocales", Collections.unmodifiableList(siteRenderingContext.getSiteLocales()) );
- Reader reader = null;
try {
- String resource = doc.getAbsolutePath();
+ StringWriter sw = new StringWriter();
+ Field velocityField = ReflectUtil.getField(DefaultSiteRenderer.class, "velocity");
- if ( renderingContext.getAttribute( "velocity" ) != null )
- {
- try {
- SiteResourceLoader.setResource(resource);
+ VelocityComponent velocity = (VelocityComponent)velocityField.get(this);
+ VelocityEngine engine = velocity.getEngine();
+ String inputEncoding = siteRenderingContext.getInputEncoding();
- createContextMethod = getCreateContextMethod();
- Context vc = ReflectUtil.invokeMethod(createContextMethod, this, sink, context);
+ // Set velocity variables
+ String tableOfContent = CONTENT_EN;
+ String docName = DOC_NAME_EN;
+ String filename = FILE_NAME_EN;
+ if (locale.equals(Locale.FRENCH)) {
+ docName = DOC_NAME_FR;
+ tableOfContent = CONTENT_FR;
+ filename = FILE_NAME_FR;
+ }
- StringWriter sw = new StringWriter();
- Field velocityField = ReflectUtil.getField(DefaultSiteRenderer.class, "velocity");
+ String titleDecoration = StringUtils.rightPad("", docName.length(), '=');
+ vc.put("titleDecoration", titleDecoration);
+ vc.put( "docName", docName);
+ vc.put( "tableContentName", tableOfContent);
- VelocityComponent velocity = (VelocityComponent)velocityField.get(this);
- VelocityEngine engine = velocity.getEngine();
- String inputEncoding = context.getInputEncoding();
+ // Build the list of item's href
+ DecorationModel decoration = siteRenderingContext.getDecoration();
+ List<Menu> menus = decoration.getMenus();
+ Collection<String> paths = new LinkedList<String>();
+ for (Menu menu : menus) {
+ List<MenuItem> items = menu.getItems();
+ for (MenuItem item : items) {
+ buildListPaths(item, paths, siteRenderingContext);
+ }
+ }
- String chaine = "";
- for (DocumentRenderer document : documents) {
- RenderingContext renderingContextDoc = document.getRenderingContext();
- String inputName = renderingContextDoc.getInputName();
+ // Build the map of html documents from .rst or .rst.vm files
+ //HashMap<String, String> map = new HashMap<String, String>();
+ LinkedList<String> htmlFiles = new LinkedList<String>();
+ Iterator<DocumentRenderer> iterator = documents.iterator();
+ while (iterator.hasNext()) {
+ DocumentRenderer doc = iterator.next();
+ RenderingContext renderingContext = doc.getRenderingContext();
+ String inputName = renderingContext.getInputName();
+ if (inputName.endsWith("rst") || inputName.endsWith("rst.vm")) {
+ String[] splitName = inputName.split("\\.");
+ String htmlName = splitName[0] + "." + "html";
+ htmlFiles.add(htmlName);
+ }
+ }
- chaine += ".. include:: " + inputName + "\n\n";
+ // Merge of the map of html file and the list of paths
+ List<String> documentRefs = new LinkedList<String>();
+ for (String path: paths) {
+ for (String file : htmlFiles) {
+ if (file.equals(path)) {
+ documentRefs.add(file);
+
}
+ }
+ }
+ if (documentRefs.size() > 0) {
+ vc.put("documentRefs", documentRefs);
- vc.put("content", chaine);
+ // Aggregate all rst file info one file
+ engine.mergeTemplate("/META-INF/maven/RstAggregation.vm", inputEncoding, vc, sw);
+ String fileContent = sw.toString();
+ String tempFilePath = outputDirectory + File.separatorChar + "pdfDoc.rst";
+ File pdfDoc = new File(tempFilePath);
+ FileUtils.writeStringToFile(pdfDoc, fileContent, "UTF-8");
+ String outputFilePath = outputDirectory + File.separatorChar + filename;
- engine.mergeTemplate(resource, inputEncoding, vc, sw);
+ // Define the output file
+ File fileOut = new File(outputFilePath);
+ JRST.Overwrite alltime = JRST.Overwrite.ALLTIME;
- } catch ( Exception e ) {
- if (getLogger().isDebugEnabled()) {
- getLogger().error( "Error parsing " + resource + " as a velocity template, using as text.", e );
- } else {
- getLogger().error( "Error parsing " + resource + " as a velocity template, using as text." );
- }
- }
+ // Generate the pdf file
+ JRST.generate("pdf", pdfDoc, fileOut, alltime, false);
}
+
} catch (Exception e) {
- log.error("", e);
- } finally {
- sink.flush();
- sink.close();
- IOUtil.close(reader);
+ log.error("Can't generate pdf documentation of the project", e);
}
}
+ public Collection<String> buildListPaths(MenuItem item, Collection<String> paths,
+ SiteRenderingContext siteRenderingContext) {
+ // add hrefs to paths if they don't start with "http" or ".."
+ String href = item.getHref();
+ if (!href.startsWith("http") && !href.startsWith("..")) {
+ boolean addHref = true;
+ for (Locale loc : siteRenderingContext.getSiteLocales()) {
+ if (href.startsWith(loc.toString())) {
+ addHref = false;
+ }
+ }
+ if (addHref) {
+ paths.add(href);
+ }
+ }
+ // If the item has sub-items, we use recursion to add them to paths
+ List<MenuItem> subItems = item.getItems();
+ if (!subItems.isEmpty()) {
+ for (MenuItem subItem : subItems) {
+ paths = buildListPaths(subItem, paths, siteRenderingContext);
+ }
+ }
+ return paths;
+ }
+
protected boolean getBooleanProperty(String value) {
boolean result = StringUtils.isNotEmpty(value) && !"false".equals(value);
return result;
Modified: trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/ReflectUtil.java
===================================================================
--- trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/ReflectUtil.java 2012-06-14 17:35:04 UTC (rev 721)
+++ trunk/doxia-module-jrst/src/main/java/org/nuiton/jrst/ReflectUtil.java 2012-06-18 16:34:48 UTC (rev 722)
@@ -49,7 +49,7 @@
public static Field getField(Class<?> klass, String fieldName) {
try {
- Field declaredField = klass.getField(fieldName);
+ Field declaredField = klass.getDeclaredField(fieldName);
declaredField.setAccessible(true);
return declaredField;
} catch (Exception e) {
Modified: trunk/doxia-module-jrst/src/main/resources/META-INF/maven/RstAggregation.vm
===================================================================
--- trunk/doxia-module-jrst/src/main/resources/META-INF/maven/RstAggregation.vm 2012-06-14 17:35:04 UTC (rev 721)
+++ trunk/doxia-module-jrst/src/main/resources/META-INF/maven/RstAggregation.vm 2012-06-18 16:34:48 UTC (rev 722)
@@ -23,8 +23,13 @@
.. * #L%
.. -
-===================================
-Parseur reStructuredText_ : le JRst
-===================================
+$titleDecoration
+$docName
+$titleDecoration
-$content
\ No newline at end of file
+.. contents:: $tableContentName
+
+
+#foreach($document in $documents)
+.. include:: $documentRefs
+#end
\ No newline at end of file
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java 2012-06-14 17:35:04 UTC (rev 721)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java 2012-06-18 16:34:48 UTC (rev 722)
@@ -360,7 +360,7 @@
interp.setOut(out);
// Execution of the docutils script to transform rst to xml
- String commandExec = String.format("__run__.exec_docutils('%s', '%s', ['%s'])",
+ String commandExec = String.format("__run__.exec_docutils('%s', '%s', '%s')",
docutilsPath, TYPE_XML, filePath);
interp.exec(commandExec);
@@ -385,68 +385,6 @@
}
}
- public static void generateDocutilsList(List<File> listIn) throws Exception {
-
- ByteArrayOutputStream out = null;
-
- try {
- // Transformation to XML
- out = new ByteArrayOutputStream();
-
- // Transformation of the __run__ URL into a path that python will use
- // For example the URL is :
- // jar:file:/home/user/.m2/repository/org/nuiton/jrst/docutils/1.6-SNAPSHOT/docutils-1.6-SNAPSHOT.jar!/__run__.py
- // and it becomes :
- // /home/user/.m2/repository/org/nuiton/jrst/docutils/1.6-SNAPSHOT/docutils-1.6-SNAPSHOT.jar/
- URL resource = JRST.class.getResource("/" + DOCUTILS_LAUNCHER);
- String docutilsPath = resource.getPath()
- .replaceAll(DOCUTILS_LAUNCHER, "");
-
- docutilsPath = docutilsPath.replaceAll(BANG, "");
- docutilsPath = docutilsPath.replaceAll(FILE_URI_PREFIX, "");
-
- // Import of the main script to use docutils ( __run__ )
- PythonInterpreter interp = new PythonInterpreter();
- String commandImport = IMPORT_SCRIPT;
- interp.exec(commandImport);
-
- /*
- // If the OS is windows, escapes the backslashs in the filepath
- String filePath = in.getAbsolutePath();
- String property = System.getProperty(OS_NAME).toLowerCase();
- if (property.contains(WINDOWS_NAME)) {
- filePath = filePath.replaceAll("\\\\", "\\\\\\\\");
- }
- */
-
- // Sets an output stream in the python interpreter and executes the code
- interp.setOut(out);
-
- // Execution of the docutils script to transform rst to xml
- String commandExec = String.format("__run__.exec_docutils('%s', '%s', [",docutilsPath, TYPE_XML);
-
- for (File aListIn : listIn) {
- commandExec += "'" + aListIn.getAbsolutePath() + "',";
- }
-
- commandExec = commandExec.substring(0,commandExec.lastIndexOf(","));
- commandExec += "])";
- log.info(commandExec);
- interp.exec(commandExec);
-
- // Cleans the python interpreter to avoid problems if they are multiple execution of this method
- interp.cleanup();
-
- // Transforms the output stream to a document
- String xmlString = new String(out.toByteArray(), UTF_8);
- log.info(xmlString);
- } finally {
- if (out != null) {
- out.close();
- }
- }
- }
-
/**
* Applies XSL stylesheet(s) to a XML document
*
Modified: trunk/jrst/src/test/java/org/nuiton/jrst/JRSTTest.java
===================================================================
--- trunk/jrst/src/test/java/org/nuiton/jrst/JRSTTest.java 2012-06-14 17:35:04 UTC (rev 721)
+++ trunk/jrst/src/test/java/org/nuiton/jrst/JRSTTest.java 2012-06-18 16:34:48 UTC (rev 722)
@@ -70,35 +70,6 @@
}
@Test
- public void generateMultipleXml() throws Exception {
-
- File in = getTestFile("test.rst");
- File out = getOutputTestFile("jrst-RstToXml.xml");
-
- List<File> liste = new LinkedList<File>();
- for (int i = 0; i < 1 ; i++) {
- liste.add(in) ;
- }
-
- TimeLog docutilsTimeLog = new TimeLog("Generation");
-
- long start = TimeLog.getTime();
- JRST.generateDocutilsList(liste);
-
- start = docutilsTimeLog.log(start, "generation avec boucle Python");
-
- for (int i = 0; i < 1 ; i++) {
- JRST.generateDocutils(in);
- }
- start = docutilsTimeLog.log(start, "multiple generation normale");
-
- for (int i = 0; i < 1 ; i++) {
- JRST.generateSimpleDoc(in, "UTF-8");
- }
- docutilsTimeLog.log(start, "multiple generation simple");
- }
-
- @Test
public void generateSimpleXml() throws Exception {
File in = getTestFile("test.rst");
1
0
r721 - in trunk: . jrst jrst/src/main/java/org/nuiton/jrst jrst/src/main/java/org/nuiton/jrst/ui
by sletellier@users.nuiton.org 14 Jun '12
by sletellier@users.nuiton.org 14 Jun '12
14 Jun '12
Author: sletellier
Date: 2012-06-14 19:35:04 +0200 (Thu, 14 Jun 2012)
New Revision: 721
Url: http://nuiton.org/repositories/revision/jrst/721
Log:
- up to jaxx 2.5-SNAPSHOT
- clean some code
- use FileEditor
Removed:
trunk/jrst/src/main/java/org/nuiton/jrst/ui/XslPanelHandler.java
Modified:
trunk/jrst/pom.xml
trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java
trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTCommandModel.java
trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTView.jaxx
trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTViewHandler.java
trunk/jrst/src/main/java/org/nuiton/jrst/ui/XslPanel.jaxx
trunk/pom.xml
Modified: trunk/jrst/pom.xml
===================================================================
--- trunk/jrst/pom.xml 2012-06-14 16:10:29 UTC (rev 720)
+++ trunk/jrst/pom.xml 2012-06-14 17:35:04 UTC (rev 721)
@@ -223,7 +223,7 @@
<plugins>
<plugin>
<groupId>org.nuiton.jaxx</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
+ <artifactId>jaxx-maven-plugin</artifactId>
<executions>
<execution>
<goals>
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java 2012-06-14 16:10:29 UTC (rev 720)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/JRST.java 2012-06-14 17:35:04 UTC (rev 721)
@@ -24,7 +24,8 @@
*/
package org.nuiton.jrst;
-import java.awt.*;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -37,14 +38,12 @@
import java.io.Reader;
import java.net.URL;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.TransformerException;
-
import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -55,8 +54,8 @@
import org.nuiton.i18n.init.ClassPathI18nInitializer;
import org.nuiton.jrst.convertisor.DocUtils2RST;
import org.nuiton.jrst.convertisor.DocUtilsVisitor;
-import org.nuiton.jrst.ui.JRSTView;
import org.nuiton.jrst.legacy.JRSTReader;
+import org.nuiton.jrst.ui.JRSTView;
import org.nuiton.util.ApplicationConfig;
import org.nuiton.util.Resource;
import org.nuiton.util.StringUtil;
@@ -205,9 +204,6 @@
if (args.length == 0) {
askOption();
} else {
- if (args == null) {
- System.exit(0);
- }
ApplicationConfig config = JRSTConfig.getConfig(args);
config.doAction(0);
@@ -238,7 +234,6 @@
private static void askOption() throws SecurityException,
NoSuchMethodException, IOException {
- String[] result = null;
try {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
@@ -255,7 +250,6 @@
/**
* Graphical user interface
*
- * @return command as string
* @throws SecurityException
* @throws NoSuchMethodException
*/
@@ -285,7 +279,7 @@
log.info("Don't generate file " + fileOut
+ ", because already exists");
} else {
- Document doc = null;
+ Document doc;
if (simpleGeneration) {
doc = generateSimpleDoc(fileIn, UTF_8);
@@ -431,9 +425,8 @@
// Execution of the docutils script to transform rst to xml
String commandExec = String.format("__run__.exec_docutils('%s', '%s', [",docutilsPath, TYPE_XML);
- Iterator<File> iterator = listIn.iterator();
- while (iterator.hasNext()) {
- commandExec += "'" + iterator.next().getAbsolutePath() + "',";
+ for (File aListIn : listIn) {
+ commandExec += "'" + aListIn.getAbsolutePath() + "',";
}
commandExec = commandExec.substring(0,commandExec.lastIndexOf(","));
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTCommandModel.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTCommandModel.java 2012-06-14 16:10:29 UTC (rev 720)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTCommandModel.java 2012-06-14 17:35:04 UTC (rev 721)
@@ -26,9 +26,9 @@
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
-import java.util.Iterator;
+import java.io.File;
import java.util.List;
-import org.apache.commons.lang3.StringUtils;
+import org.nuiton.util.StringUtil;
import org.python.google.common.collect.Lists;
/**
@@ -43,19 +43,17 @@
protected Boolean simpleMode = Boolean.FALSE;
protected Boolean formatEnabled = Boolean.TRUE;
- protected String saveLocationText;
- protected String openLocationText;
+ protected File saveFile;
+ protected File openFile;
protected String selectedFormat;
- protected List<String> xslList;
+ protected List<File> xslFileList;
protected JRSTView jrstView;
public JRSTCommandModel(JRSTView jrstView) {
this.jrstView = jrstView;
- xslList = Lists.newArrayList();
- saveLocationText = StringUtils.EMPTY;
- openLocationText = StringUtils.EMPTY;
+ xslFileList = Lists.newArrayList();
selectedFormat = "xml";
}
@@ -89,24 +87,24 @@
firePropertyChange("formatEnabled", oldValue, formatEnabled);
}
- public String getSaveLocationText() {
- return saveLocationText;
+ public File getSaveFile() {
+ return saveFile;
}
- public void setSaveLocationText(String saveLocationText) {
- String oldValue = getSaveLocationText();
- this.saveLocationText = saveLocationText;
- firePropertyChange("saveLocationText", oldValue, saveLocationText);
+ public void setSaveFile(File saveFile) {
+ File oldValue = getSaveFile();
+ this.saveFile = saveFile;
+ firePropertyChange("saveFile", oldValue, saveFile);
}
- public String getOpenLocationText() {
- return openLocationText;
+ public File getOpenFile() {
+ return openFile;
}
- public void setOpenLocationText(String openLocationText) {
- String oldValue = getOpenLocationText();
- this.openLocationText = openLocationText;
- firePropertyChange("openLocationText", oldValue, openLocationText);
+ public void setOpenFile(File openFile) {
+ File oldValue = getOpenFile();
+ this.openFile = openFile;
+ firePropertyChange("openFile", oldValue, openFile);
}
public String getSelectedFormat() {
@@ -119,48 +117,42 @@
firePropertyChange("selectedFormat", oldValue, selectedFormat);
}
- public List<String> getXslList() {
- return xslList;
+ public List<File> getXslFileList() {
+ return xslFileList;
}
- public void setXslList(List<String> xslList) {
- List<String> oldValue = getXslList();
- this.xslList = xslList;
- firePropertyChange("xslList", oldValue, xslList);
+ public void setXslFileList(List<File> xslFileList) {
+ List<File> oldValue = getXslFileList();
+ this.xslFileList = xslFileList;
+ firePropertyChange("xslFileList", oldValue, xslFileList);
}
public String getXsls() {
- String xsls = "";
- Iterator<String> iterator = xslList.iterator();
- while (iterator.hasNext()) {
- xsls += iterator.next();
- if (iterator.hasNext()) {
- xsls += ",";
+ String xslAsString = StringUtil.join(getXslFileList(), new StringUtil.ToString<File>() {
+
+ @Override
+ public String toString(File file) {
+ return file.getAbsolutePath();
}
- }
- return xsls;
+ }, ",", true);
+ return xslAsString;
}
- public String getElementXslList(Integer number) {
- if (xslList.size() <= number) {
- xslList.add(StringUtils.EMPTY);
- }
- String text = xslList.get(number);
- return text;
+ public void addXslFile(File xslFile, int index) {
+ List<File> oldValue = getXslFileList();
+ xslFileList.add(index, xslFile);
+ firePropertyChange("xslFileList", oldValue, xslFileList);
}
- public void setElementXslList(Integer number, String text) {
- List<String> oldValue = getXslList();
- if(number == xslList.size()) {
- xslList.add(text);
- } else {
- xslList.set(number, text);
+ public File getXslFile(Integer number) {
+ if (xslFileList.size() <= number) {
+ return null;
}
- firePropertyChange("xslList", oldValue, xslList);
+ return xslFileList.get(number);
}
public int getPanelNumber() {
- return xslList.size();
+ return xslFileList.size();
}
public void addPropertyChangeListener(PropertyChangeListener listener) {
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTView.jaxx
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTView.jaxx 2012-06-14 16:10:29 UTC (rev 720)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTView.jaxx 2012-06-14 17:35:04 UTC (rev 721)
@@ -33,6 +33,7 @@
java.awt.Dimension
org.nuiton.jrst.JRST
org.nuiton.util.Resource
+ jaxx.runtime.swing.editor.FileEditor
</import>
<JRSTViewHandler id='handler' constructorParams='this'/>
@@ -59,39 +60,19 @@
<cell anchor='west'>
<JLabel text='Open'/>
</cell>
- <cell weightx='1' fill='horizontal'>
- <JTextField id='openLocationText'
- text='{model.getOpenLocationText()}'
- onKeyReleased='model.setOpenLocationText(openLocationText.getText())'
- columns='31'/>
+ <cell weightx='1' fill='horizontal' columns='2'>
+ <FileEditor id='openLocation'
+ exts='rst'
+ selectedFile='{model.getOpenFile()}'
+ directoryEnabled='{false}'
+ fileEnabled='{true}'
+ acceptAllFileFilterUsed='{true}'
+ extsDescription='reStructuredText (*.rst)'
+ onActionPerformed='model.setOpenFile(openLocation.getSelectedFile())'/>
</cell>
- <cell>
- <JButton id ='boutonOpenLocation'
- onActionPerformed='handler.doOpenLocation()'
- preferredSize='{new Dimension(30,30)}'
- constructorParams='Resource.getIcon("icone/open.png")'/>
- </cell>
</row>
<row>
<cell anchor='west'>
- <JLabel text='saveAs'/>
- </cell>
- <cell weightx='1' fill='horizontal'>
- <JTextField id='saveLocationText'
- text='{model.getSaveLocationText()}'
- onKeyReleased='model.setSaveLocationText(saveLocationText.getText())'
- columns='31'/>
- </cell>
- <cell>
- <JButton id ='boutonSaveLocation'
- onActionPerformed='handler.doOpenSaveLocation()'
- preferredSize='{new Dimension(30,30)}'
- constructorParams='Resource.getIcon("icone/open.png")'/>
- </cell>
- </row>
-
- <row>
- <cell anchor='west'>
<JRadioButton id='format'
text='Format : '
selected='{model.isFormatEnabled()}'
@@ -104,9 +85,22 @@
onActionPerformed='model.setSelectedFormat((String)formatList.getSelectedItem())'/>
</cell>
</row>
-
<row>
<cell anchor='west'>
+ <JLabel text='saveAs'/>
+ </cell>
+ <cell weightx='1' fill='horizontal' columns='2'>
+ <FileEditor id='saveLocation'
+ exts='{model.getSelectedFormat()}'
+ selectedFile='{model.getSaveFile()}'
+ directoryEnabled='{false}'
+ fileEnabled='{true}'
+ acceptAllFileFilterUsed='{true}'
+ onActionPerformed='model.setSaveFile(saveLocation.getSelectedFile())'/>
+ </cell>
+ </row>
+ <row>
+ <cell anchor='west'>
<JRadioButton id='xslRadio'
text='externalXSL'
selected='{!model.isFormatEnabled()}'
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTViewHandler.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTViewHandler.java 2012-06-14 16:10:29 UTC (rev 720)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/ui/JRSTViewHandler.java 2012-06-14 17:35:04 UTC (rev 721)
@@ -26,11 +26,8 @@
import com.google.common.io.Files;
import java.awt.Color;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
import java.io.File;
import javax.swing.ButtonGroup;
-import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import jaxx.runtime.context.JAXXInitialContext;
@@ -63,37 +60,6 @@
addXslLocation();
}
- public void doOpenLocation() {
- JFileChooser fc = new JFileChooser(System.getProperty("user.home"));
- fc.showOpenDialog(jrstView);
- File file = fc.getSelectedFile();
- if (file != null) {
- JRSTCommandModel model = jrstView.getModel();
- String absolutePath = file.getAbsolutePath();
- model.setOpenLocationText(absolutePath);
- }
- }
-
- public void doOpenSaveLocation() {
- JFileChooser fc = new JFileChooser(System.getProperty("user.home"));
- fc.showSaveDialog(jrstView);
- JRSTCommandModel model = jrstView.getModel();
- File file = fc.getSelectedFile();
- if (file != null) {
- String absolutePath = file.getAbsolutePath();
- if (file.exists()) {
- int choix = askEcraser();
- if (choix == JOptionPane.YES_OPTION) {
- model.setOverwrite(true);
- model.setSaveLocationText(absolutePath);
- } else if (choix == JOptionPane.NO_OPTION)
- doOpenSaveLocation();
- } else {
- model.setSaveLocationText(absolutePath);
- }
- }
- }
-
public int askEcraser() {
return JOptionPane.showConfirmDialog(jrstView, _("overwriteGraph?"));
}
@@ -116,26 +82,14 @@
xslPanel.setModel(model);
xslPanel.setModel(model);
int panelNumber = model.getPanelNumber();
- String xslPath = model.getElementXslList(panelNumber);
- xslPanel.setXslPath(xslPath);
xslPanel.setPanelNumber(panelNumber);
-
- xslPanel.addPropertyChangeListener(XslPanel.PROPERTY_XSL_PATH, new PropertyChangeListener() {
-
- @Override
- public void propertyChange(PropertyChangeEvent evt) {
- XslPanel source = (XslPanel)evt.getSource();
- jrstView.getModel().setElementXslList(source.getPanelNumber(), (String)evt.getNewValue());
- }
- });
-
JPanel xslListPanel = jrstView.getXslListPanel();
xslListPanel.add(xslPanel);
jrstView.pack();
}
public void convert() {
- if (jrstView.getOpenLocationText().getText().equals("")) {
+ if (jrstView.getOpenLocation() == null) {
jrstView.getErrorLbl().setText(_("openEmpty?"));
jrstView.getErrorLbl().setForeground(Color.RED);
jrstView.pack();
@@ -146,17 +100,8 @@
}
public void launchJRST() {
- File fileIn = null;
JRSTCommandModel model = jrstView.getModel();
- if (!model.isOverwrite()) {
- fileIn = new File(model.getOpenLocationText());
- if (fileIn.exists()) {
- int choix = jrstView.getHandler().askEcraser();
- if (choix == JOptionPane.NO_OPTION) {
- fileIn = null;
- }
- }
- }
+ File fileIn = model.getOpenFile();
if (fileIn != null) {
String xslListOrFormat;
@@ -165,28 +110,30 @@
else {
xslListOrFormat = model.getXsls();
}
- String outputFile = "";
- int length = model.getSaveLocationText().length();
- if (length > 0) {
- outputFile = model.getSaveLocationText();
- } else {
+ File outputFile = model.getSaveFile();
+ if (outputFile.exists()) {
+ int choix = jrstView.getHandler().askEcraser();
+ if (choix == JOptionPane.NO_OPTION) {
+ return;
+ }
+ }
+ if (model.getSaveFile() == null) {
// If the user didn't give the output file, we take the input file name with the right extension
// For example, nameExample.rst becomes nameExample.xml
- if (fileIn.isFile()) {
- outputFile = fileIn.getAbsolutePath();
- String ext = Files.getFileExtension(outputFile);
+ if (outputFile.isFile()) {
+ String outputPath = fileIn.getAbsolutePath();
+ String ext = Files.getFileExtension(outputPath);
if (ext.isEmpty()) {
- ext = xslListOrFormat;
- outputFile = outputFile + "." + xslListOrFormat;
+ outputPath = outputPath + "." + xslListOrFormat;
} else {
- outputFile = outputFile.replace("." + ext, "." + xslListOrFormat);
+ outputPath = outputPath.replace("." + ext, "." + xslListOrFormat);
}
+ outputFile = new File(outputPath);
}
}
- File fileOut = new File(outputFile);
try{
- JRST.generate(xslListOrFormat, fileIn, fileOut, JRST.Overwrite.ALLTIME, model.isSimpleMode());
+ JRST.generate(xslListOrFormat, fileIn, outputFile, JRST.Overwrite.ALLTIME, model.isSimpleMode());
} catch (Exception e) {
log.error("Can't generate the document with this configuration", e);
} finally {
Modified: trunk/jrst/src/main/java/org/nuiton/jrst/ui/XslPanel.jaxx
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/ui/XslPanel.jaxx 2012-06-14 16:10:29 UTC (rev 720)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/ui/XslPanel.jaxx 2012-06-14 17:35:04 UTC (rev 721)
@@ -26,35 +26,23 @@
<import>
java.awt.Dimension
org.nuiton.util.Resource
+ jaxx.runtime.swing.editor.FileEditor
</import>
- <XslPanelHandler id='handler' constructorParams='this'/>
- <Integer id='panelNumber' javaBean='null'/>
+ <Integer id='panelNumber' javaBean='0'/>
<JRSTCommandModel id='model' javaBean='getContextValue(JRSTCommandModel.class)'/>
- <String id='xslPath' javaBean='null'/>
- <script><![CDATA[
-
- protected void $afterCompleteSetup() {
- handler.init();
- }
-
- ]]></script>
-
<row>
<cell fill='horizontal' weightx='1'>
- <JTextField id='xslLocationText'
- columns='30'
+ <FileEditor id='xslLocation'
enabled='{!model.isFormatEnabled()}'
- text='{xslPath}'
- onKeyReleased='setXslPath(xslLocationText.getText())'/>
+ exts='xsl'
+ selectedFile='{model.getXslFile(panelNumber)}'
+ directoryEnabled='{false}'
+ fileEnabled='{true}'
+ acceptAllFileFilterUsed='{true}'
+ extsDescription='xsl file (*.xsl)'
+ onActionPerformed='model.addXslFile(xslLocation.getSelectedFile(), panelNumber)'/>
</cell>
- <cell>
- <JButton id='boutonXslLocation'
- enabled='{!model.isFormatEnabled()}'
- preferredSize='{new Dimension(30, 30)}'
- constructorParams='Resource.getIcon("icone/open.png")'
- onActionPerformed='handler.openXslLocation()'/>
- </cell>
</row>
</Table>
\ No newline at end of file
Deleted: trunk/jrst/src/main/java/org/nuiton/jrst/ui/XslPanelHandler.java
===================================================================
--- trunk/jrst/src/main/java/org/nuiton/jrst/ui/XslPanelHandler.java 2012-06-14 16:10:29 UTC (rev 720)
+++ trunk/jrst/src/main/java/org/nuiton/jrst/ui/XslPanelHandler.java 2012-06-14 17:35:04 UTC (rev 721)
@@ -1,57 +0,0 @@
-/*
- * #%L
- * JRst :: Api
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2012 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-package org.nuiton.jrst.ui;
-
-import java.io.File;
-import javax.swing.JFileChooser;
-
-/**
- * Created with IntelliJ IDEA.
- * User: jpages
- * Date: 12/06/12
- * Time: 11:35
- * To change this template use File | Settings | File Templates.
- */
-public class XslPanelHandler {
-
- XslPanel xslPanel;
-
- public XslPanelHandler(XslPanel xslPanel) {
- this.xslPanel = xslPanel;
- }
-
- public void init() {
-
- }
-
- public void openXslLocation() {
- JFileChooser fc = new JFileChooser(System.getProperty("user.home"));
- fc.showOpenDialog(xslPanel);
- File file = fc.getSelectedFile();
- if (file != null) {
- xslPanel.getXslLocationText().setText(file.getAbsolutePath());
- }
- }
-}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-06-14 16:10:29 UTC (rev 720)
+++ trunk/pom.xml 2012-06-14 17:35:04 UTC (rev 721)
@@ -395,7 +395,7 @@
<nuitonUtilsVersion>2.4.8</nuitonUtilsVersion>
<nuitonI18nVersion>2.4.1</nuitonI18nVersion>
<xalanVersion>2.7.1</xalanVersion>
- <jaxxVersion>2.4.2</jaxxVersion>
+ <jaxxVersion>2.5-SNAPSHOT</jaxxVersion>
</properties>
@@ -412,7 +412,7 @@
<plugin>
<groupId>org.nuiton.jaxx</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
+ <artifactId>jaxx-maven-plugin</artifactId>
<version>${jaxxVersion}</version>
</plugin>
1
0