diff --git a/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/document/DocumentType.java b/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/document/DocumentType.java index 08c166c4d..331718213 100755 --- a/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/document/DocumentType.java +++ b/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/document/DocumentType.java @@ -31,6 +31,7 @@ public enum DocumentType { ACTIONSCRIPT("as", HeaderType.JAVADOC_STYLE), ADA_BODY("adb", HeaderType.DOUBLEDASHES_STYLE), ADA_SPEC("ads", HeaderType.DOUBLEDASHES_STYLE), + ASCII_DOC("adoc", HeaderType.ASCIIDOC_STYLE), ASP("asp", HeaderType.ASP), ASPECTJ("aj", HeaderType.JAVADOC_STYLE), ASSEMBLER("asm", HeaderType.SEMICOLON_STYLE), diff --git a/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java b/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java index 85a06f146..159a6c3c6 100755 --- a/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java +++ b/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java @@ -29,8 +29,9 @@ public enum HeaderType { ////////// COMMENT TYPES ////////// - // firstLine beforeEachLine endLine afterEachLine skipLinePattern firstLineDetectionPattern endLineDetectionPattern allowBlankLines isMultiline padLines + // firstLine beforeEachLine endLine afterEachLine skipLinePattern firstLineDetectionPattern lastLineDetectionPattern allowBlankLines isMultiline padLines //generic + ASCIIDOC_STYLE("////", " // ", "////", "", null, "^////$", "^////$", false, true, false), JAVADOC_STYLE("/**", " * ", " */", "", null, "(\\s|\\t)*/\\*.*$", ".*\\*/(\\s|\\t)*$", false, true, false), SCALA_STYLE("/**", " * ", " */", "", null, "(\\s|\\t)*/\\*.*$", ".*\\*/(\\s|\\t)*$", false, true, false), JAVAPKG_STYLE("EOL/*-", " * ", " */", "", "^package [a-z_]+(\\.[a-z_][a-z0-9_]*)*;$", "(EOL)*(\\s|\\t)*/\\*.*$", ".*\\*/(\\s|\\t)*$", false, true, false), @@ -81,9 +82,9 @@ public enum HeaderType { private HeaderType(String firstLine, String beforeEachLine, String endLine, String afterEachLine, - String skipLinePattern, String firstLineDetectionPattern, String endLineDetectionPattern, + String skipLinePattern, String firstLineDetectionPattern, String lastLineDetectionPattern, boolean allowBlankLines, boolean isMultiline, boolean padLines) { - definition = new HeaderDefinition(this.name().toLowerCase(), firstLine, beforeEachLine, endLine, afterEachLine, skipLinePattern, firstLineDetectionPattern, endLineDetectionPattern, allowBlankLines, isMultiline, padLines); + definition = new HeaderDefinition(this.name().toLowerCase(), firstLine, beforeEachLine, endLine, afterEachLine, skipLinePattern, firstLineDetectionPattern, lastLineDetectionPattern, allowBlankLines, isMultiline, padLines); } /** diff --git a/license-maven-plugin/src/test/resources/styles/asciidoc_style.txt b/license-maven-plugin/src/test/resources/styles/asciidoc_style.txt new file mode 100644 index 000000000..d8d54c842 --- /dev/null +++ b/license-maven-plugin/src/test/resources/styles/asciidoc_style.txt @@ -0,0 +1,15 @@ +//// + // Copyright (C) ${year} http://code.google.com/p/maven-license-plugin/ + // + // 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. +////