Skip to content

Commit

Permalink
Ignore JDK9 "module-info" class file by default.
Browse files Browse the repository at this point in the history
Suggested by @bclozel in #31
  • Loading branch information
Henning Schmiedehausen committed Feb 18, 2018
1 parent 9a11789 commit 9b7f2c5
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/it/test-issue-31/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# 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.
#

invoker.goals=clean verify
invoker.buildResult = success
48 changes: 48 additions & 0 deletions src/it/test-issue-31/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
~ 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.
-->
<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>

<parent>
<groupId>@project.groupId@.@project.artifactId@</groupId>
<artifactId>basepom</artifactId>
<version>1.0.under-test</version>
</parent>

<artifactId>test-issue-31</artifactId>

<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-analysis</artifactId>
<version>6.0</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>@project.groupId@</groupId>
<artifactId>@project.artifactId@</artifactId>
</plugin>
</plugins>
</build>
</project>
20 changes: 20 additions & 0 deletions src/it/test-issue-31/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
import static org.basepom.mojo.duplicatefinder.groovy.ITools.*

def (result, xml) = loadXmlAndResult(basedir, "test")

overallState(NO_CONFLICT, 0, NOT_FAILED, result)

return true
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public class ClasspathDescriptor

private static final MatchPatternPredicate DEFAULT_IGNORED_CLASS_PREDICATE = new MatchPatternPredicate(Arrays.asList(
// this regex matches inner classes
".*\\$.*"));
".*\\$.*",
"module-info"));

private static final MatchPatternPredicate DEFAULT_IGNORED_LOCAL_DIRECTORIES = new MatchPatternPredicate(Arrays.asList(
"^.git$",
Expand Down

0 comments on commit 9b7f2c5

Please sign in to comment.