Commit cc1d3e63 authored by Liang Ding's avatar Liang Ding

Markdown 解析错误时返回 "Markdown error"

parent 6391464a
......@@ -913,13 +913,15 @@ public final class Filler {
}
/**
* Processes the abstract of the specified article with the specified
* preference.
* Processes the abstract of the specified article with the specified preference.
*
* <p> <ul> <li>If the abstract is {@code null}, sets it with ""</li> <li>If
* user configured preference "titleOnly", sets the abstract with ""</li>
* <li>If user configured preference "titleAndContent", sets the abstract
* with the content of the article</li> </ul> </p>
* <p>
* <ul>
* <li>If the abstract is {@code null}, sets it with ""</li>
* <li>If user configured preference "titleOnly", sets the abstract with ""</li>
* <li>If user configured preference "titleAndContent", sets the abstract with the content of the article</li>
* </ul>
* </p>
*
* @param preference the specified preference
* @param article the specified article
......
/*
* Copyright (c) 2009, 2010, 2011, 2012, 2013, B3log Team
*
* Licensed 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.
*/
package org.b3log.solo.util;
import java.io.StringReader;
import java.io.StringWriter;
import org.b3log.latke.util.Strings;
import org.tautua.markdownpapers.Markdown;
/**
* <a href="http://en.wikipedia.org/wiki/Markdown">Markdown</a> utilities.
*
* <p>Uses the <a href="http://markdown.tautua.org/">MarkdownPapers</a> as the converter.</p>
*
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.0.0, Apr 28, 2012
* @since 0.4.5
*/
public final class Markdowns {
/**
* Converts the specified markdown text to HTML.
*
* @param markdownText the specified markdown text
* @return converted HTML, returns {@code null} if the specified markdown text is "" or {@code null}
* @throws Exception exception
*/
public static String toHTML(final String markdownText) throws Exception {
if (Strings.isEmptyOrNull(markdownText)) {
return null;
}
final StringWriter writer = new StringWriter();
final Markdown markdown = new Markdown();
markdown.transform(new StringReader(markdownText), writer);
return writer.toString();
}
/**
* Private constructor.
*/
private Markdowns() {}
}
/*
* Copyright (c) 2009, 2010, 2011, 2012, 2013, B3log Team
*
* Licensed 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.
*/
package org.b3log.solo.util;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.b3log.latke.util.Strings;
import org.tautua.markdownpapers.Markdown;
import org.tautua.markdownpapers.parser.ParseException;
/**
* <a href="http://en.wikipedia.org/wiki/Markdown">Markdown</a> utilities.
*
* <p>Uses the <a href="http://markdown.tautua.org/">MarkdownPapers</a> as the converter.</p>
*
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.0.1, Feb 8, 2013
* @since 0.4.5
*/
public final class Markdowns {
/**
* Logger.
*/
private static final Logger LOGGER = Logger.getLogger(Markdowns.class.getName());
/**
* Converts the specified markdown text to HTML.
*
* @param markdownText the specified markdown text
* @return converted HTML, returns {@code null} if the specified markdown text is "" or {@code null}, returns "Markdown error" if
* exception
*/
public static String toHTML(final String markdownText) {
if (Strings.isEmptyOrNull(markdownText)) {
return null;
}
final StringWriter writer = new StringWriter();
final Markdown markdown = new Markdown();
try {
markdown.transform(new StringReader(markdownText), writer);
} catch (final ParseException e) {
LOGGER.log(Level.SEVERE, "Markdown error", e);
return "Markdown error";
}
return writer.toString();
}
/**
* Private constructor.
*/
private Markdowns() {}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
Description: B3log Solo parent POM.
Version: 2.0.2.7, Jan 15, 2013
Author: Liang Ding
-->
<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>
<groupId>org.b3log</groupId>
<artifactId>solo</artifactId>
<packaging>pom</packaging>
<version>0.5.6</version>
<name>B3log Solo</name>
<url>https://github.com/b3log/b3log-solo</url>
<description>
B3log Solo is a blogging program, which could run on Google App Engine
or a standard Servlet container.
</description>
<inceptionYear>2010</inceptionYear>
<modules>
<module>core</module>
<module>war</module>
</modules>
<!-- Properties -->
<properties>
<servlet.version>2.5</servlet.version>
<org.b3log.solo.version>0.5.6</org.b3log.solo.version>
<org.b3log.latke.version>0.5.0-SNAPSHOT</org.b3log.latke.version>
<org.b3log.latke-gae.version>0.5.0-SNAPSHOT</org.b3log.latke-gae.version>
<org.b3log.latke-bae.version>0.5.0-SNAPSHOT</org.b3log.latke-bae.version>
<org.b3log.latke-repository-mysql.version>0.5.0-SNAPSHOT</org.b3log.latke-repository-mysql.version>
<org.b3log.latke-repository-h2.version>0.5.0-SNAPSHOT</org.b3log.latke-repository-h2.version>
<gae.version>1.7.2</gae.version>
<freemarker-gae.version>2.3.19</freemarker-gae.version>
<jsoup.version>1.5.2</jsoup.version>
<markdownpapers-core.version>1.2.7</markdownpapers-core.version>
<!-- <com.google.api.client.version>1.2.1-alpha</com.google.api.client.version>-->
<!-- maven plugin -->
<maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
<maven-resources-plugin.version>2.5</maven-resources-plugin.version>
<maven-surefire-plugin.version>2.9</maven-surefire-plugin.version>
<maven-license-plugin.version>1.9.0</maven-license-plugin.version>
<maven-checkstyle-plugin.version>2.7</maven-checkstyle-plugin.version>
<maven-javancss-plugin.version>2.0</maven-javancss-plugin.version>
<maven-javadoc-plugin.version>2.7</maven-javadoc-plugin.version>
<maven-cobertura-plugin.version>2.5.1</maven-cobertura-plugin.version>
<maven-min-plugin.version>0.5.0-SNAPSHOT</maven-min-plugin.version>
<!-- Unit Test -->
<testng.version>6.1.1</testng.version>
<!-- -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<organization>
<name>B3log</name>
<url>http://www.b3log.org</url>
</organization>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<developers>
<developer>
<id>DL88250@gmail.com</id>
<name>Liang Ding</name>
<email>DL88250@gmail.com</email>
<url>http://88250.b3log.org</url>
<roles>
<role>Lead</role>
<role>Initial Committer</role>
</roles>
<organization>B3log</organization>
<organizationUrl>http://b3log.org</organizationUrl>
<timezone>+8</timezone>
</developer>
<developer>
<id>LLY219@gmail.com</id>
<name>Liyuan Li</name>
<email>LLY219@gmail.com</email>
<url>http://vanessa.b3log.org</url>
<roles>
<role>Committer</role>
</roles>
<organization>B3log</organization>
<organizationUrl>http://b3log.org</organizationUrl>
<timezone>+8</timezone>
</developer>
<developer>
<id>wmainlove@gmail.com</id>
<name>Liceng Yao</name>
<email>wmainlove@gmail.com</email>
<url>http://love.b3log.org</url>
<roles>
<role>Committer</role>
</roles>
<organization>B3log</organization>
<organizationUrl>http://b3log.org</organizationUrl>
<timezone>+8</timezone>
</developer>
<developer>
<id>dongxv.vang@gmail.com</id>
<name>Dongxu Wang</name>
<email>dongxv.vang@gmail.com</email>
<url>http://dx.b3log.org</url>
<roles>
<role>Committer</role>
</roles>
<organization>B3log</organization>
<organizationUrl>http://b3log.org</organizationUrl>
<timezone>+8</timezone>
</developer>
</developers>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/b3log/b3log-solo/issues</url>
</issueManagement>
<mailingLists>
<mailingList>
<name>b3log-solo-dev</name>
<archive>https://groups.google.com/group/b3log-solo-dev</archive>
<post>b3log-solo-dev@googlegroups.com</post>
</mailingList>
</mailingLists>
<scm>
<url>https://github.com/b3log/b3log-solo</url>
</scm>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>javancss-maven-plugin</artifactId>
<version>${maven-javancss-plugin.version}</version>
</plugin>
</plugins>
</reporting>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>solo-core</artifactId>
<version>${org.b3log.solo.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke</artifactId>
<version>${org.b3log.latke.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-gae</artifactId>
<version>${org.b3log.latke-gae.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-bae</artifactId>
<version>${org.b3log.latke-bae.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-repository-mysql</artifactId>
<version>${org.b3log.latke-repository-mysql.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-repository-h2</artifactId>
<version>${org.b3log.latke-repository-h2.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>${jsoup.version}</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${gae.version}</version>
<scope>runtime</scope>
</dependency>
<!-- <dependency>
<groupId>com.google.api.client</groupId>
<artifactId>google-api-client</artifactId>
<version>${com.google.api.client.version}</version>
</dependency>-->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker-gae</artifactId>
<version>${freemarker-gae.version}</version>
</dependency>
<dependency>
<groupId>org.tautua.markdownpapers</groupId>
<artifactId>markdownpapers-core</artifactId>
<version>${markdownpapers-core.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<version>${maven-license-plugin.version}</version>
<configuration>
<basedir>${basedir}</basedir>
<header>src/main/resources/etc/header.txt</header>
<quiet>false</quiet>
<failIfMissing>true</failIfMissing>
<aggregate>true</aggregate>
<strictCheck>true</strictCheck>
<includes>
<include>**/src/*/java/**/*.java</include>
<include>**/src/*/webapp/js/*.js</include>
<include>**/src/*/webapp/js/admin/*.js</include>
<include>**/src/*/resources/*.properties</include>
<include>**/src/*/webapp/WEB-INF/*.xml</include>
</includes>
<excludes>
<exclude>**/src/main/java/**/package-info.java</exclude>
<exclude>**/src/*/webapp/js/lib/*.js</exclude>
<exclude>**/src/main/java/com/**/*.java</exclude>
</excludes>
<useDefaultExcludes>true</useDefaultExcludes>
<mapping>
<java>SLASHSTAR_STYLE</java>
</mapping>
<useDefaultMapping>true</useDefaultMapping>
<properties>
<year>2009, 2010, 2011, 2012, 2013</year>
<devTeam>B3log Team</devTeam>
</properties>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.mycila.maven-license-plugin
</groupId>
<artifactId>
maven-license-plugin
</artifactId>
<versionRange>
[1.9.0,)
</versionRange>
<goals>
<goal>format</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<finalName>b3log-solo</finalName>
</build>
<pluginRepositories>
<pluginRepository>
<id>m2-release</id>
<name>88250 at Google Maven repository of releases</name>
<url>http://m2-repos.googlecode.com/svn/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
<pluginRepository>
<id>m2-snapshot</id>
<name>88250 at Google Maven repository of snapshots</name>
<url>http://m2-repos.googlecode.com/svn/snapshot</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>interval:10</updatePolicy>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>m2-release</id>
<name>88250 at Google Maven repository of releases</name>
<url>http://m2-repos.googlecode.com/svn/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>m2-snapshot</id>
<name>88250 at Google Maven repository of snapshots</name>
<url>http://m2-repos.googlecode.com/svn/snapshot</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>interval:10</updatePolicy>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Description: B3log Solo parent POM.
Version: 2.0.2.8, Feb 8, 2013
Author: Liang Ding
-->
<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>
<groupId>org.b3log</groupId>
<artifactId>solo</artifactId>
<packaging>pom</packaging>
<version>0.5.6</version>
<name>B3log Solo</name>
<url>https://github.com/b3log/b3log-solo</url>
<description>
B3log Solo is a blogging program, which could run on Google App Engine
or a standard Servlet container.
</description>
<inceptionYear>2010</inceptionYear>
<modules>
<module>core</module>
<module>war</module>
</modules>
<!-- Properties -->
<properties>
<servlet.version>2.5</servlet.version>
<org.b3log.solo.version>0.5.6</org.b3log.solo.version>
<org.b3log.latke.version>0.5.0-SNAPSHOT</org.b3log.latke.version>
<org.b3log.latke-gae.version>0.5.0-SNAPSHOT</org.b3log.latke-gae.version>
<org.b3log.latke-bae.version>0.5.0-SNAPSHOT</org.b3log.latke-bae.version>
<org.b3log.latke-repository-mysql.version>0.5.0-SNAPSHOT</org.b3log.latke-repository-mysql.version>
<org.b3log.latke-repository-h2.version>0.5.0-SNAPSHOT</org.b3log.latke-repository-h2.version>
<gae.version>1.7.2</gae.version>
<freemarker-gae.version>2.3.19</freemarker-gae.version>
<jsoup.version>1.5.2</jsoup.version>
<markdownpapers-core.version>1.3.2</markdownpapers-core.version>
<!-- <com.google.api.client.version>1.2.1-alpha</com.google.api.client.version>-->
<!-- maven plugin -->
<maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
<maven-resources-plugin.version>2.5</maven-resources-plugin.version>
<maven-surefire-plugin.version>2.9</maven-surefire-plugin.version>
<maven-license-plugin.version>1.9.0</maven-license-plugin.version>
<maven-checkstyle-plugin.version>2.7</maven-checkstyle-plugin.version>
<maven-javancss-plugin.version>2.0</maven-javancss-plugin.version>
<maven-javadoc-plugin.version>2.7</maven-javadoc-plugin.version>
<maven-cobertura-plugin.version>2.5.1</maven-cobertura-plugin.version>
<maven-min-plugin.version>0.5.0-SNAPSHOT</maven-min-plugin.version>
<!-- Unit Test -->
<testng.version>6.1.1</testng.version>
<!-- -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<organization>
<name>B3log</name>
<url>http://www.b3log.org</url>
</organization>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<developers>
<developer>
<id>DL88250@gmail.com</id>
<name>Liang Ding</name>
<email>DL88250@gmail.com</email>
<url>http://88250.b3log.org</url>
<roles>
<role>Lead</role>
<role>Initial Committer</role>
</roles>
<organization>B3log</organization>
<organizationUrl>http://b3log.org</organizationUrl>
<timezone>+8</timezone>
</developer>
<developer>
<id>LLY219@gmail.com</id>
<name>Liyuan Li</name>
<email>LLY219@gmail.com</email>
<url>http://vanessa.b3log.org</url>
<roles>
<role>Committer</role>
</roles>
<organization>B3log</organization>
<organizationUrl>http://b3log.org</organizationUrl>
<timezone>+8</timezone>
</developer>
<developer>
<id>wmainlove@gmail.com</id>
<name>Liceng Yao</name>
<email>wmainlove@gmail.com</email>
<url>http://love.b3log.org</url>
<roles>
<role>Committer</role>
</roles>
<organization>B3log</organization>
<organizationUrl>http://b3log.org</organizationUrl>
<timezone>+8</timezone>
</developer>
<developer>
<id>dongxv.vang@gmail.com</id>
<name>Dongxu Wang</name>
<email>dongxv.vang@gmail.com</email>
<url>http://dx.b3log.org</url>
<roles>
<role>Committer</role>
</roles>
<organization>B3log</organization>
<organizationUrl>http://b3log.org</organizationUrl>
<timezone>+8</timezone>
</developer>
</developers>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/b3log/b3log-solo/issues</url>
</issueManagement>
<mailingLists>
<mailingList>
<name>b3log-solo-dev</name>
<archive>https://groups.google.com/group/b3log-solo-dev</archive>
<post>b3log-solo-dev@googlegroups.com</post>
</mailingList>
</mailingLists>
<scm>
<url>https://github.com/b3log/b3log-solo</url>
</scm>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>javancss-maven-plugin</artifactId>
<version>${maven-javancss-plugin.version}</version>
</plugin>
</plugins>
</reporting>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>solo-core</artifactId>
<version>${org.b3log.solo.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke</artifactId>
<version>${org.b3log.latke.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-gae</artifactId>
<version>${org.b3log.latke-gae.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-bae</artifactId>
<version>${org.b3log.latke-bae.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-repository-mysql</artifactId>
<version>${org.b3log.latke-repository-mysql.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-repository-h2</artifactId>
<version>${org.b3log.latke-repository-h2.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>${jsoup.version}</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${gae.version}</version>
<scope>runtime</scope>
</dependency>
<!-- <dependency>
<groupId>com.google.api.client</groupId>
<artifactId>google-api-client</artifactId>
<version>${com.google.api.client.version}</version>
</dependency>-->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker-gae</artifactId>
<version>${freemarker-gae.version}</version>
</dependency>
<dependency>
<groupId>org.tautua.markdownpapers</groupId>
<artifactId>markdownpapers-core</artifactId>
<version>${markdownpapers-core.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<version>${maven-license-plugin.version}</version>
<configuration>
<basedir>${basedir}</basedir>
<header>src/main/resources/etc/header.txt</header>
<quiet>false</quiet>
<failIfMissing>true</failIfMissing>
<aggregate>true</aggregate>
<strictCheck>true</strictCheck>
<includes>
<include>**/src/*/java/**/*.java</include>
<include>**/src/*/webapp/js/*.js</include>
<include>**/src/*/webapp/js/admin/*.js</include>
<include>**/src/*/resources/*.properties</include>
<include>**/src/*/webapp/WEB-INF/*.xml</include>
</includes>
<excludes>
<exclude>**/src/main/java/**/package-info.java</exclude>
<exclude>**/src/*/webapp/js/lib/*.js</exclude>
<exclude>**/src/main/java/com/**/*.java</exclude>
</excludes>
<useDefaultExcludes>true</useDefaultExcludes>
<mapping>
<java>SLASHSTAR_STYLE</java>
</mapping>
<useDefaultMapping>true</useDefaultMapping>
<properties>
<year>2009, 2010, 2011, 2012, 2013</year>
<devTeam>B3log Team</devTeam>
</properties>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.mycila.maven-license-plugin
</groupId>
<artifactId>
maven-license-plugin
</artifactId>
<versionRange>
[1.9.0,)
</versionRange>
<goals>
<goal>format</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<finalName>b3log-solo</finalName>
</build>
<pluginRepositories>
<pluginRepository>
<id>m2-release</id>
<name>88250 at Google Maven repository of releases</name>
<url>http://m2-repos.googlecode.com/svn/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
<pluginRepository>
<id>m2-snapshot</id>
<name>88250 at Google Maven repository of snapshots</name>
<url>http://m2-repos.googlecode.com/svn/snapshot</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>interval:10</updatePolicy>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>m2-release</id>
<name>88250 at Google Maven repository of releases</name>
<url>http://m2-repos.googlecode.com/svn/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>m2-snapshot</id>
<name>88250 at Google Maven repository of snapshots</name>
<url>http://m2-repos.googlecode.com/svn/snapshot</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>interval:10</updatePolicy>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
</project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment