summaryrefslogtreecommitdiffstats
path: root/common/honeycomb-parent/pom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'common/honeycomb-parent/pom.xml')
-rw-r--r--common/honeycomb-parent/pom.xml244
1 files changed, 238 insertions, 6 deletions
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 @@
-->
<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>
<groupId>io.fd.honeycomb.common</groupId>
<artifactId>honeycomb-parent</artifactId>
+ <name>${project.artifactId}</name>
<version>1.16.12-SNAPSHOT</version>
<packaging>pom</packaging>
+ <prerequisites>
+ <maven>3.1.1</maven>
+ </prerequisites>
<properties>
<nexusproxy>http://nexus.fd.io/content</nexusproxy>
@@ -62,6 +67,24 @@
<!-- checkstyle -->
<checkstyle.header.file>APACHE_HEADER.txt</checkstyle.header.file>
+
+ <!-- site -->
+ <!-- skip location check = makes site exec faster -->
+ <dependency.locations.enabled>false</dependency.locations.enabled>
+ <project.info.report.version>2.9</project.info.report.version>
+ <maven.resources.version>2.6</maven.resources.version>
+ <maven.site.version>3.4</maven.site.version>
+ <!-- adoc -->
+ <asciidoctor.maven.plugin.version>1.5.3</asciidoctor.maven.plugin.version>
+ <asciidoctorj.diagram.version>1.3.1</asciidoctorj.diagram.version>
+ <maven.groovy.version>2.0</maven.groovy.version>
+ <readme.default>
+= ${project.artifactId}
+
+Overview of ${project.artifactId}
+ </readme.default>
+ <docs.base.url>https://nexus.fd.io/content/sites/site</docs.base.url>
+ <docs.hc.folder>io/fd/honeycomb</docs.hc.folder>
</properties>
<organization>
@@ -86,6 +109,15 @@
<url>https://jenkins.fd.io/</url>
</ciManagement>
+ <mailingLists>
+ <mailingList>
+ <name>HC dev</name>
+ <post>honeycomb-dev@fd.io</post>
+ <subscribe>https://lists.fd.io/mailman/listinfo/honeycomb-dev</subscribe>
+ <archive>https://lists.fd.io/pipermail/honeycomb-dev/</archive>
+ </mailingList>
+ </mailingLists>
+
<dependencyManagement>
<dependencies>
<!-- ODL -->
@@ -175,9 +207,17 @@
<configLocation>honeycomb-checkstyle.xml</configLocation>
<includeTestResources>true</includeTestResources>
<!--TODO HONEYCOMB-155 enable fail on violation after issues are resolved + set in as errors in checkstyle xml-->
- <excludes>
+
+ <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
+ <excludes>**\/target\/,
+ **\/bin\/,
+ **\/target-ide\/,
+ **\/src/main/yang-gen-config\/,
org/opendaylight/yang/gen/**,
- </excludes>
+ **\/src/main/yang-gen-sal\/,
+ **\/src/main/xtend-gen\/,
+ **\/src/main/yang\/,
+ **\/archetype-resources\/</excludes>
</configuration>
<executions>
@@ -209,10 +249,6 @@
<consoleOutput>true</consoleOutput>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<sourceDirectory>${project.basedir}</sourceDirectory>
- <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
- <excludes>
- **\/target\/,**\/bin\/,**\/target-ide\/,**\/src/main/yang-gen-config\/,**\/src/main/yang-gen-sal\/,**\/src/main/xtend-gen\/,**\/src/main/yang\/
- </excludes>
<outputFile>${project.build.directory}/checkstyle-logging-result.xml</outputFile>
</configuration>
</execution>
@@ -247,6 +283,14 @@
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
<!-- jacoco test coverage for sonar -->
<plugin>
@@ -336,6 +380,124 @@
<version>${maven.bundle.version}</version>
<extensions>true</extensions>
</plugin>
+ <!-- Source jar -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Site (from https://github.com/asciidoctor/asciidoctor-maven-examples/blob/master/asciidoc-maven-site-example/pom.xml) -->
+ <!-- + https://github.com/asciidoctor/asciidoctor-maven-plugin -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>${maven.site.version}</version>
+ <configuration>
+ <generateReports>true</generateReports>
+ <generateSitemap>true</generateSitemap>
+ <relativizeDecorationLinks>false</relativizeDecorationLinks>
+ <locales>en</locales>
+ <inputEncoding>UTF-8</inputEncoding>
+ <outputEncoding>UTF-8</outputEncoding>
+ <siteDirectory>${project.basedir}</siteDirectory>
+ <relativizeDecorationLinks>false</relativizeDecorationLinks>
+ <asciidoc>
+ <requires>
+ <require>asciidoctor-diagram</require>
+ </requires>
+ <!-- optional site-wide AsciiDoc attributes -->
+ <attributes>
+ <source-highlighter>coderay</source-highlighter>
+ <coderay-css>style</coderay-css>
+ <imagesdir>${project.build.directory}/site/images</imagesdir>
+ <toc>left</toc>
+ <toclevels>2</toclevels>
+ <icons>font</icons>
+ <sectanchors>true</sectanchors>
+ <idprefix/>
+ <idseparator>-</idseparator>
+ </attributes>
+ </asciidoc>
+ <!-- Exclude partial docs that are included elsewhere -->
+ <moduleExcludes>
+ <asciidoc>**/_*.adoc</asciidoc>
+ </moduleExcludes>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.asciidoctor</groupId>
+ <artifactId>asciidoctor-maven-plugin</artifactId>
+ <version>${asciidoctor.maven.plugin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.asciidoctor</groupId>
+ <artifactId>asciidoctorj-diagram</artifactId>
+ <version>${asciidoctorj.diagram.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
+ <version>${maven.groovy.version}</version>
+ <executions>
+ <!-- Generate Readme.adoc if not present -->
+ <execution>
+ <id>generate-adoc</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <!-- Generate module adoc documentation -->
+ <source>
+ 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", "")
+ }
+ </source>
+ </configuration>
+ </execution>
+ <!-- Fix generated html -->
+ <execution>
+ <id>fix-generated-site</id>
+ <phase>site</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <!-- Site generates wrong link to Readme.html, trying to point to Readme.html at root -->
+ <source>
+ 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")
+ }
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
@@ -343,6 +505,12 @@
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
<plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ <plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
@@ -359,9 +527,69 @@
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
+ </plugin>
</plugins>
+
+ <!-- To support site push-->
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav-jackrabbit</artifactId>
+ <version>2.9</version>
+ </extension>
+ </extensions>
</build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>${project.info.report.version}</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>index</report>
+ <report>summary</report>
+ <report>modules</report>
+ <report>cim</report>
+ <report>dependencies</report>
+ <report>distribution-management</report>
+ <report>mailing-list</report>
+ <report>issue-tracking</report>
+ <report>license</report>
+ <report>scm</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>${maven.javadoc.version}</version>
+ <reportSets>
+ <reportSet>
+ <id>default</id>
+ <reports>
+ <report>javadoc-no-fork</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ <configuration>
+ <additionalparam>-Xdoclint:none</additionalparam>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>${maven.resources.version}</version>
+ </plugin>
+ </plugins>
+ </reporting>
+
<distributionManagement>
<repository>
<id>fdio-release</id>
@@ -371,6 +599,10 @@
<id>fdio-snapshot</id>
<url>${nexusproxy}/repositories/fd.io.snapshot/</url>
</snapshotRepository>
+ <site>
+ <id>fdio-site</id>
+ <url>dav:${docs.base.url}/${docs.hc.folder}/${project.version}</url>
+ </site>
</distributionManagement>
<repositories>