OPENNLP-1069: Add missing docs and automate the inclusion process Now the build downloads the distributables and extract the docs from it. Included a legacy page.
closes apache/opennlp-site#15 Project: http://git-wip-us.apache.org/repos/asf/opennlp-site/repo Commit: http://git-wip-us.apache.org/repos/asf/opennlp-site/commit/08c3208c Tree: http://git-wip-us.apache.org/repos/asf/opennlp-site/tree/08c3208c Diff: http://git-wip-us.apache.org/repos/asf/opennlp-site/diff/08c3208c Branch: refs/heads/master Commit: 08c3208cde58bcdd1ac1838231320ff67df51972 Parents: d74013d Author: William D C M SILVA <[email protected]> Authored: Sat May 20 07:48:01 2017 -0300 Committer: William D C M SILVA <[email protected]> Committed: Sat May 20 07:48:01 2017 -0300 ---------------------------------------------------------------------- pom.xml | 158 +- src/main/docs/1.7.2/manual/css/opennlp-docs.css | 72 - src/main/docs/1.7.2/manual/images/brat.png | Bin 588646 -> 0 bytes src/main/docs/1.7.2/manual/opennlp.html | 5388 ------------------ src/main/jbake/content/docs/index.ad | 2 + src/main/jbake/content/docs/legacy.ad | 64 + 6 files changed, 155 insertions(+), 5529 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/opennlp-site/blob/08c3208c/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index e8c2610..a665c05 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,7 @@ <executions> <execution> <id>default-generate</id> - <phase>generate-resources</phase> + <phase>compile</phase> <goals> <goal>generate</goal> </goals> @@ -85,40 +85,76 @@ <version>3.0.2</version> <executions> <execution> - <id>copy-docs</id> + <id>copy-code-formatter</id> <!-- here the phase you need --> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> - <outputDirectory>${basedir}/target/opennlp-site/docs</outputDirectory> + <outputDirectory>${basedir}/target/opennlp-site/code-formatter</outputDirectory> <resources> <resource> - <directory>src/main/docs</directory> + <directory>src/main/code-formatter</directory> <filtering>false</filtering> </resource> </resources> </configuration> </execution> + </executions> + </plugin> + + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.7</version> + <executions> <execution> - <id>copy-code-formatter</id> - <!-- here the phase you need --> - <phase>validate</phase> - <goals> - <goal>copy-resources</goal> - </goals> + <phase>process-resources</phase> <configuration> - <outputDirectory>${basedir}/target/opennlp-site/code-formatter</outputDirectory> - <resources> - <resource> - <directory>src/main/code-formatter</directory> - <filtering>false</filtering> - </resource> - </resources> + <target> + <ac:for param="folder" xmlns:ac="antlib:net.sf.antcontrib"> + <dirset dir="target/distr/"> + <include name="*"/> + </dirset> + <sequential> + <echo>Copy @{folder} docs</echo> + + <copy todir="target/opennlp-site/docs"> + <fileset dir="@{folder}" casesensitive="yes"> + <include name="**/docs/**/*"/> + <exclude name="**/opennlp-uima-descriptors/**"/> + </fileset> + <mapper type="regexp" from="^.*apache-opennlp-(.*?)/docs/(.*)" to="\1/\2" /> + </copy> + + </sequential> + </ac:for> + + </target> </configuration> + <goals> + <goal>run</goal> + </goals> </execution> </executions> + <dependencies> + <dependency> + <groupId>ant-contrib</groupId> + <artifactId>ant-contrib</artifactId> + <version>1.0b3</version> + <exclusions> + <exclusion> + <groupId>ant</groupId> + <artifactId>ant</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.ant</groupId> + <artifactId>ant-nodeps</artifactId> + <version>1.8.1</version> + </dependency> + </dependencies> </plugin> <plugin> @@ -128,89 +164,73 @@ <executions> <execution> <id>unpack</id> - <phase>package</phase> + <phase>generate-resources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> - <!-- Start of 1.7.2 --> - <artifactItem> - <groupId>org.apache.opennlp</groupId> - <artifactId>opennlp-tools</artifactId> - <version>1.7.2</version> - <type>jar</type> - <classifier>javadoc</classifier> - <overWrite>false</overWrite> - <outputDirectory>${project.build.directory}/opennlp-site/docs/1.7.2/apidocs/opennlp-tools</outputDirectory> - </artifactItem> - <artifactItem> - <groupId>org.apache.opennlp</groupId> - <artifactId>opennlp-brat-annotator</artifactId> - <version>1.7.2</version> - <type>jar</type> - <classifier>javadoc</classifier> - <overWrite>false</overWrite> - <outputDirectory>${project.build.directory}/opennlp-site/docs/1.7.2/apidocs/opennlp-brat-annotator</outputDirectory> - </artifactItem> + <artifactItem> <groupId>org.apache.opennlp</groupId> - <artifactId>opennlp-morfologik-addon</artifactId> - <version>1.7.2</version> - <type>jar</type> - <classifier>javadoc</classifier> + <artifactId>opennlp-distr</artifactId> + <version>1.5.3</version> <overWrite>false</overWrite> - <outputDirectory>${project.build.directory}/opennlp-site/docs/1.7.2/apidocs/opennlp-morfologik-addon</outputDirectory> + <type>zip</type> + <classifier>bin</classifier> + <outputDirectory>${project.build.directory}/distr/1.5.3</outputDirectory> </artifactItem> + <artifactItem> <groupId>org.apache.opennlp</groupId> - <artifactId>opennlp-uima</artifactId> - <version>1.7.2</version> - <type>jar</type> - <classifier>javadoc</classifier> + <artifactId>opennlp-distr</artifactId> + <version>1.6.0</version> <overWrite>false</overWrite> - <outputDirectory>${project.build.directory}/opennlp-site/docs/1.7.2/apidocs/opennlp-uima</outputDirectory> + <type>zip</type> + <classifier>bin</classifier> + <outputDirectory>${project.build.directory}/distr/1.6.0</outputDirectory> </artifactItem> - <!-- End of 1.7.2 --> - <!-- Start of 1.8.0 --> <artifactItem> <groupId>org.apache.opennlp</groupId> - <artifactId>opennlp-tools</artifactId> - <version>1.8.0</version> - <type>jar</type> - <classifier>javadoc</classifier> + <artifactId>opennlp-distr</artifactId> + <version>1.7.0</version> <overWrite>false</overWrite> - <outputDirectory>${project.build.directory}/opennlp-site/docs/1.8.0/apidocs/opennlp-tools</outputDirectory> + <type>zip</type> + <classifier>bin</classifier> + <outputDirectory>${project.build.directory}/distr/1.7.0</outputDirectory> </artifactItem> + <artifactItem> <groupId>org.apache.opennlp</groupId> - <artifactId>opennlp-brat-annotator</artifactId> - <version>1.8.0</version> - <type>jar</type> - <classifier>javadoc</classifier> + <artifactId>opennlp-distr</artifactId> + <version>1.7.1</version> <overWrite>false</overWrite> - <outputDirectory>${project.build.directory}/opennlp-site/docs/1.8.0/apidocs/opennlp-brat-annotator</outputDirectory> + <type>zip</type> + <classifier>bin</classifier> + <outputDirectory>${project.build.directory}/distr/1.7.1</outputDirectory> </artifactItem> + <artifactItem> <groupId>org.apache.opennlp</groupId> - <artifactId>opennlp-morfologik-addon</artifactId> - <version>1.8.0</version> - <type>jar</type> - <classifier>javadoc</classifier> + <artifactId>opennlp-distr</artifactId> + <version>1.7.2</version> <overWrite>false</overWrite> - <outputDirectory>${project.build.directory}/opennlp-site/docs/1.8.0/apidocs/opennlp-morfologik-addon</outputDirectory> + <type>zip</type> + <classifier>bin</classifier> + <outputDirectory>${project.build.directory}/distr/1.7.2</outputDirectory> </artifactItem> + <artifactItem> <groupId>org.apache.opennlp</groupId> - <artifactId>opennlp-uima</artifactId> + <artifactId>opennlp-distr</artifactId> <version>1.8.0</version> - <type>jar</type> - <classifier>javadoc</classifier> <overWrite>false</overWrite> - <outputDirectory>${project.build.directory}/opennlp-site/docs/1.8.0/apidocs/opennlp-uima</outputDirectory> + <type>zip</type> + <classifier>bin</classifier> + <outputDirectory>${project.build.directory}/distr/1.8.0</outputDirectory> </artifactItem> - <!-- End of 1.8.0 --> + </artifactItems> </configuration> </execution> http://git-wip-us.apache.org/repos/asf/opennlp-site/blob/08c3208c/src/main/docs/1.7.2/manual/css/opennlp-docs.css ---------------------------------------------------------------------- diff --git a/src/main/docs/1.7.2/manual/css/opennlp-docs.css b/src/main/docs/1.7.2/manual/css/opennlp-docs.css deleted file mode 100644 index a026686..0000000 --- a/src/main/docs/1.7.2/manual/css/opennlp-docs.css +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -body { - margin-top: 1em; - margin-bottom: 1em; - margin-left: 16%; - margin-right: 8% -} - -h1, h2, h3, h4, div.toc { - color: #006699; -} - -div.legalnotice { - max-width: 450px; -} - -pre.programlisting, pre.screen, pre.literallayout { - border: 1px dashed #006699; - background-color: #EEE; -} - -/* - * Java syntax highlighting with eclipse default colors - * and default font-style - */ -pre.programlisting .hl-keyword { - color: #7F0055; - font-weight: bold; -} - -/* Seems to be broken, override red inline style of hl-string */ -pre.programlisting .hl-string, pre.programlisting b.hl-string i[style]{ - color: #2A00FF !important; -} - -pre.programlisting .hl-tag { - color: #3F7F7F; -} - -pre.programlisting .hl-comment { - color: #3F5F5F; - font-style: italic; -} - -pre.programlisting .hl-multiline-comment { - color: #3F5FBF; - font-style: italic; -} - -pre.programlisting .hl-value { - color: #2A00FF; -} - -pre.programlisting .hl-attribute { - color: #7F007F; -} http://git-wip-us.apache.org/repos/asf/opennlp-site/blob/08c3208c/src/main/docs/1.7.2/manual/images/brat.png ---------------------------------------------------------------------- diff --git a/src/main/docs/1.7.2/manual/images/brat.png b/src/main/docs/1.7.2/manual/images/brat.png deleted file mode 100644 index 2afba39..0000000 Binary files a/src/main/docs/1.7.2/manual/images/brat.png and /dev/null differ
