From bc335de41876acd8720dce1030a79b3a7b39c3b1 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Wed, 21 Sep 2016 13:51:57 +0200 Subject: HONEYCOMB-209 Configure maven site To produce site for Honeycomb + javadoc asciidoc To build the site: mvn clean install site:attach-descriptor site mvn site:stage -DstagingDirectory=/home/mmarsale/tmp/stage Change-Id: I4246bb09ba02b74a2a9c84ee73f8dba02384fffa Signed-off-by: Maros Marsalek --- common/api-parent/asciidoc/Readme.adoc | 3 + common/api-parent/pom.xml | 1 + common/asciidoc/Readme.adoc | 3 + common/checkstyle/asciidoc/Readme.adoc | 6 + common/checkstyle/pom.xml | 23 +- common/checkstyle/src/main/resources/README.adoc | 6 - common/honeycomb-parent/asciidoc/Readme.adoc | 3 + common/honeycomb-parent/pom.xml | 244 ++++++++++++++++++++- common/honeycomb-parent/site.xml | 39 ++++ common/impl-parent/asciidoc/Readme.adoc | 3 + common/impl-parent/pom.xml | 1 + .../asciidoc/Readme.adoc | 3 + common/minimal-assembly-descriptor/pom.xml | 8 +- .../asciidoc/Readme.adoc | 3 + common/minimal-distribution-parent/pom.xml | 2 +- common/pom.xml | 14 +- 16 files changed, 336 insertions(+), 26 deletions(-) create mode 100644 common/api-parent/asciidoc/Readme.adoc create mode 100644 common/asciidoc/Readme.adoc create mode 100644 common/checkstyle/asciidoc/Readme.adoc delete mode 100644 common/checkstyle/src/main/resources/README.adoc create mode 100644 common/honeycomb-parent/asciidoc/Readme.adoc create mode 100644 common/honeycomb-parent/site.xml create mode 100644 common/impl-parent/asciidoc/Readme.adoc create mode 100644 common/minimal-assembly-descriptor/asciidoc/Readme.adoc create mode 100644 common/minimal-distribution-parent/asciidoc/Readme.adoc (limited to 'common') diff --git a/common/api-parent/asciidoc/Readme.adoc b/common/api-parent/asciidoc/Readme.adoc new file mode 100644 index 000000000..b156b414a --- /dev/null +++ b/common/api-parent/asciidoc/Readme.adoc @@ -0,0 +1,3 @@ += api-parent + +Overview of api-parent \ No newline at end of file diff --git a/common/api-parent/pom.xml b/common/api-parent/pom.xml index 6937fb6ee..531e47009 100644 --- a/common/api-parent/pom.xml +++ b/common/api-parent/pom.xml @@ -24,6 +24,7 @@ 4.0.0 api-parent + ${project.artifactId} 1.16.12-SNAPSHOT pom diff --git a/common/asciidoc/Readme.adoc b/common/asciidoc/Readme.adoc new file mode 100644 index 000000000..f97755af3 --- /dev/null +++ b/common/asciidoc/Readme.adoc @@ -0,0 +1,3 @@ += Common maven parents + +Modules under common provide common maven parents for Honeycomb modules. \ No newline at end of file diff --git a/common/checkstyle/asciidoc/Readme.adoc b/common/checkstyle/asciidoc/Readme.adoc new file mode 100644 index 000000000..7b1d0767f --- /dev/null +++ b/common/checkstyle/asciidoc/Readme.adoc @@ -0,0 +1,6 @@ += Honeycomb coding resources + +* intellij-java-coding-style.xml Can be imported into Intellij IDEA to ensure Honeycomb coding style during development +* checkstyle.xml Checkstyle config ensuring above Honeycomb coding style +* checkstyle-license.xml Checkstyle config ensuring Honeycomb license (in HONEYCOMB_LICENSE.txt) header presence +* checkstyle-logging.xml Checkstyle config ensuring ODL logging standards \ No newline at end of file diff --git a/common/checkstyle/pom.xml b/common/checkstyle/pom.xml index 3dbf26855..b33341d9e 100644 --- a/common/checkstyle/pom.xml +++ b/common/checkstyle/pom.xml @@ -1,15 +1,24 @@ 4.0.0 - - org.opendaylight.odlparent - odlparent-lite - 1.6.2-Beryllium-SR2 - - - io.fd.honeycomb.common honeycomb-checkstyle + ${project.artifactId} 1.16.12-SNAPSHOT + + + + + org.apache.maven.plugins + maven-site-plugin + + true + true + + + + + + diff --git a/common/checkstyle/src/main/resources/README.adoc b/common/checkstyle/src/main/resources/README.adoc deleted file mode 100644 index d33f39efc..000000000 --- a/common/checkstyle/src/main/resources/README.adoc +++ /dev/null @@ -1,6 +0,0 @@ -= Honeycomb coding resources - -* intellij-java-coding-style.xml Can be imported into Intellij IDEA to ensure Honeycomb coding style during development -* checkstyle.xml Checkstyle config ensuring above HOneycomb coding style -* checkstyle-license.xml Checkstyle config ensuring Honeycomb license (in HONEYCOMB_LICENSE.txt) header presence -* checkstyle-logging.xml Checkstyle config ensuring ODL logging standards \ No newline at end of file diff --git a/common/honeycomb-parent/asciidoc/Readme.adoc b/common/honeycomb-parent/asciidoc/Readme.adoc new file mode 100644 index 000000000..39341884f --- /dev/null +++ b/common/honeycomb-parent/asciidoc/Readme.adoc @@ -0,0 +1,3 @@ += honeycomb-parent + +Overview of honeycomb-parent \ No newline at end of file diff --git a/common/honeycomb-parent/pom.xml b/common/honeycomb-parent/pom.xml index 5aa4fb3c4..6660360fd 100644 --- a/common/honeycomb-parent/pom.xml +++ b/common/honeycomb-parent/pom.xml @@ -16,11 +16,16 @@ --> + 4.0.0 io.fd.honeycomb.common honeycomb-parent + ${project.artifactId} 1.16.12-SNAPSHOT pom + + 3.1.1 + http://nexus.fd.io/content @@ -62,6 +67,24 @@ APACHE_HEADER.txt + + + + false + 2.9 + 2.6 + 3.4 + + 1.5.3 + 1.3.1 + 2.0 + += ${project.artifactId} + +Overview of ${project.artifactId} + + https://nexus.fd.io/content/sites/site + io/fd/honeycomb @@ -86,6 +109,15 @@ https://jenkins.fd.io/ + + + HC dev + honeycomb-dev@fd.io + https://lists.fd.io/mailman/listinfo/honeycomb-dev + https://lists.fd.io/pipermail/honeycomb-dev/ + + + @@ -175,9 +207,17 @@ honeycomb-checkstyle.xml true - + + **\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang + **\/target\/, + **\/bin\/, + **\/target-ide\/, + **\/src/main/yang-gen-config\/, org/opendaylight/yang/gen/**, - + **\/src/main/yang-gen-sal\/, + **\/src/main/xtend-gen\/, + **\/src/main/yang\/, + **\/archetype-resources\/ @@ -209,10 +249,6 @@ true true ${project.basedir} - **\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang - - **\/target\/,**\/bin\/,**\/target-ide\/,**\/src/main/yang-gen-config\/,**\/src/main/yang-gen-sal\/,**\/src/main/xtend-gen\/,**\/src/main/yang\/ - ${project.build.directory}/checkstyle-logging-result.xml @@ -247,6 +283,14 @@ -Xdoclint:none + + + attach-javadocs + + jar + + + @@ -336,12 +380,136 @@ ${maven.bundle.version} true + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + + + org.apache.maven.plugins + maven-site-plugin + ${maven.site.version} + + true + true + false + en + UTF-8 + UTF-8 + ${project.basedir} + false + + + asciidoctor-diagram + + + + coderay + style + ${project.build.directory}/site/images + left + 2 + font + true + + - + + + + + **/_*.adoc + + + + + org.asciidoctor + asciidoctor-maven-plugin + ${asciidoctor.maven.plugin.version} + + + org.asciidoctor + asciidoctorj-diagram + ${asciidoctorj.diagram.version} + + + + + org.codehaus.gmaven + groovy-maven-plugin + ${maven.groovy.version} + + + + generate-adoc + generate-resources + + execute + + + + + import java.nio.file.Files + import java.nio.file.Paths + + log.info "Checking asciidoc/Readme.adoc" + def asciidoc = Paths.get(project.getBasedir().toString(), "asciidoc") + def readme = Paths.get(asciidoc.toString(), "Readme.adoc") + if (!Files.exists(readme)) { + log.info "Generating ${readme}" + Files.createDirectories(asciidoc) + Files.createFile(readme) + readme.toFile().text = properties.getOrDefault("readme.default", "") + } + + + + + + fix-generated-site + site + + execute + + + + + import java.nio.file.Files + import java.nio.file.Paths + + def index = Paths.get(project.build.directory.toString(), "site", "index.html") + if (Files.exists(index)) { + log.info "Fixing links in generated site" + def html = index.toFile().text + log.info "Fixing asciidoc Readme link" + index.toFile().text = html.replaceAll("[./]*Readme\\.html", "Readme.html") + } + + + + + maven-enforcer-plugin + + maven-source-plugin + + + maven-javadoc-plugin + maven-checkstyle-plugin @@ -359,9 +527,69 @@ org.apache.felix maven-bundle-plugin + + org.codehaus.gmaven + groovy-maven-plugin + + + + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.9 + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + ${project.info.report.version} + + + + index + summary + modules + cim + dependencies + distribution-management + mailing-list + issue-tracking + license + scm + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven.javadoc.version} + + + default + + javadoc-no-fork + + + + + -Xdoclint:none + + + + org.apache.maven.plugins + maven-resources-plugin + ${maven.resources.version} + + + + fdio-release @@ -371,6 +599,10 @@ fdio-snapshot ${nexusproxy}/repositories/fd.io.snapshot/ + + fdio-site + dav:${docs.base.url}/${docs.hc.folder}/${project.version} + diff --git a/common/honeycomb-parent/site.xml b/common/honeycomb-parent/site.xml new file mode 100644 index 000000000..b0ed4c977 --- /dev/null +++ b/common/honeycomb-parent/site.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + org.apache.maven.skins + maven-fluido-skin + 1.5 + + \ No newline at end of file diff --git a/common/impl-parent/asciidoc/Readme.adoc b/common/impl-parent/asciidoc/Readme.adoc new file mode 100644 index 000000000..da4d32570 --- /dev/null +++ b/common/impl-parent/asciidoc/Readme.adoc @@ -0,0 +1,3 @@ += impl-parent + +Overview of impl-parent \ No newline at end of file diff --git a/common/impl-parent/pom.xml b/common/impl-parent/pom.xml index 0bd874a6c..535d638df 100644 --- a/common/impl-parent/pom.xml +++ b/common/impl-parent/pom.xml @@ -25,6 +25,7 @@ 4.0.0 impl-parent + ${project.artifactId} 1.16.12-SNAPSHOT pom diff --git a/common/minimal-assembly-descriptor/asciidoc/Readme.adoc b/common/minimal-assembly-descriptor/asciidoc/Readme.adoc new file mode 100644 index 000000000..a42a18ec0 --- /dev/null +++ b/common/minimal-assembly-descriptor/asciidoc/Readme.adoc @@ -0,0 +1,3 @@ += minimal-assembly-descriptor + +Overview of minimal-assembly-descriptor \ No newline at end of file diff --git a/common/minimal-assembly-descriptor/pom.xml b/common/minimal-assembly-descriptor/pom.xml index 166464391..bd9f34193 100644 --- a/common/minimal-assembly-descriptor/pom.xml +++ b/common/minimal-assembly-descriptor/pom.xml @@ -15,7 +15,13 @@ --> - io.fd.honeycomb.common + + io.fd.honeycomb.common + honeycomb-parent + 1.16.12-SNAPSHOT + ../honeycomb-parent + + minimal-assembly-descriptor 1.16.12-SNAPSHOT ${project.artifactId} diff --git a/common/minimal-distribution-parent/asciidoc/Readme.adoc b/common/minimal-distribution-parent/asciidoc/Readme.adoc new file mode 100644 index 000000000..4e6bb77f7 --- /dev/null +++ b/common/minimal-distribution-parent/asciidoc/Readme.adoc @@ -0,0 +1,3 @@ += minimal-distribution-parent + +Overview of minimal-distribution-parent \ No newline at end of file diff --git a/common/minimal-distribution-parent/pom.xml b/common/minimal-distribution-parent/pom.xml index 41367b2a7..b003231c3 100644 --- a/common/minimal-distribution-parent/pom.xml +++ b/common/minimal-distribution-parent/pom.xml @@ -26,6 +26,7 @@ 4.0.0 minimal-distribution-parent + ${project.artifactId} 1.16.12-SNAPSHOT pom @@ -169,7 +170,6 @@ done org.codehaus.gmaven groovy-maven-plugin - 2.0 package diff --git a/common/pom.xml b/common/pom.xml index d50d326a4..32588812c 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -15,15 +15,19 @@ --> -io.fd.honeycomb.common + + io.fd.honeycomb.common + honeycomb-parent + 1.16.12-SNAPSHOT + honeycomb-parent + + honeycomb-common-aggregator 1.16.12-SNAPSHOT - honeycomb-common + ${project.artifactId} pom 4.0.0 - - 3.1.1 - + Aggregator for common maven parents providing base configuration for Honeycomb modules checkstyle -- cgit 1.2.3-korg