blob: 10188d13353d450d8a0a20bc3269c3571b4b015f [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<groupId>org.apache.sling</groupId>
<artifactId>sling-site</artifactId>
<name>Apache Sling Website</name>
<version>0.1-SNAPSHOT</version>
<properties>
<repos.list.url>https://raw.githubusercontent.com/apache/sling-aggregator/master/default.xml</repos.list.url>
<downloads.dir>${project.build.directory}/downloads</downloads.dir>
<repos.list.fullpath>${downloads.dir}/github-repositories.xml</repos.list.fullpath>
<flexmark.version>0.61.0</flexmark.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.jbake</groupId>
<artifactId>jbake-maven-plugin</artifactId>
<version>0.3.2</version>
<!-- dependencies -->
<dependencies>
<!-- upgrade JBake to the most recent version -->
<dependency>
<groupId>org.jbake</groupId>
<artifactId>jbake-core</artifactId>
<version>2.6.5</version>
</dependency>
<!-- the following are only optional dependencies of jbake-core and
therefore need to be listed explicitly here to be loaded.
The versions should be the same as listed in jbake-core (listed in
https://github.com/jbake-org/jbake/blob/master/gradle.properties and referenced in
https://github.com/jbake-org/jbake/blob/master/jbake-core/build.gradle).
Compare with https://github.com/jbake-org/jbake-maven-plugin/issues/14.
-->
<!-- for parsing MD -->
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark</artifactId>
<version>${flexmark.version}</version>
</dependency>
<!-- for supporting MD pegdown extensions -->
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-profile-pegdown</artifactId>
<version>${flexmark.version}</version>
</dependency>
<!-- for supporting groovy templates with extension tpl -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-templates</artifactId>
<version>3.0.2</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>default-generate</id>
<phase>compile</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
<phase>validate</phase>
<configuration>
<name>current.year</name>
<pattern>yyyy</pattern>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<version>1.1</version>
<extensions>true</extensions>
<configuration>
<content>target/${project.artifactId}-${project.version}</content>
<checkinComment>${msg}</checkinComment>
<pubScmUrl>scm:git:https://gitbox.apache.org/repos/asf/sling-site.git</pubScmUrl>
<scmBranch>asf-site</scmBranch>
<localCheckout>true</localCheckout>
<tryUpdate>true</tryUpdate>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>download-repos-list</id>
<phase>process-resources</phase>
<configuration>
<tasks>
<mkdir dir="${downloads.dir}"/>
<get src="${repos.list.url}" dest="${repos.list.fullpath}" usetimestamp="true"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>publish-site</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M1</version>
<executions>
<execution>
<id>enforce-property</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>msg</property>
<message>Please specify a commit message for publishing the website (-Dmsg="...")</message>
</requireProperty>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<executions>
<execution>
<id>publish-site</id>
<phase>package</phase>
<goals>
<goal>publish-scm</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>run-site</id>
<build>
<plugins>
<plugin>
<groupId>org.jbake</groupId>
<artifactId>jbake-maven-plugin</artifactId>
<executions>
<execution>
<id>run-site</id>
<phase>package</phase>
<goals>
<goal>inline</goal>
</goals>
<configuration>
<port>8820</port>
<listenAddress>0.0.0.0</listenAddress>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>