Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to origin #1

Merged
merged 71 commits into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
0f0f5ed
add release drafter
olamy Aug 19, 2020
f7ee932
Bump actions/cache from v1 to v2.1.0
dependabot[bot] Aug 19, 2020
28ab09b
Bump actions/cache from v2.1.0 to v2.1.1
dependabot[bot] Aug 20, 2020
71970eb
no need to build with buggy jdk9
olamy Aug 25, 2020
5c9c487
Bump maven-clean-plugin from 3.0.0 to 3.1.0
dependabot[bot] Aug 25, 2020
d8b117c
Bump maven-jar-plugin from 3.0.2 to 3.2.0
dependabot[bot] Aug 25, 2020
fe9fa0f
Bump maven-source-plugin from 3.0.1 to 3.2.1
dependabot[bot] Aug 25, 2020
6dec113
Enabled java9+ compatibility
Finomosec Aug 17, 2020
a58d59b
Add LICENSE file
steven-sheehy Jul 24, 2020
3c5c883
Merge pull request #98 from mojohaus/dependabot/maven/org.apache.mave…
dependabot[bot] Aug 25, 2020
6870022
Merge pull request #97 from mojohaus/dependabot/maven/org.apache.mave…
dependabot[bot] Aug 25, 2020
0a5c3d8
Merge pull request #95 from mojohaus/dependabot/maven/org.apache.mave…
dependabot[bot] Aug 25, 2020
6308050
Bump commons-lang3 from 3.9 to 3.11
dependabot[bot] Aug 25, 2020
2cda0e7
Bump maven-resources-plugin from 3.0.2 to 3.2.0
dependabot[bot] Aug 25, 2020
bdfb6cf
Bump maven-checkstyle-plugin from 2.16 to 3.1.1
dependabot[bot] Aug 25, 2020
869caae
Merge pull request #101 from mojohaus/dependabot/maven/org.apache.com…
dependabot[bot] Aug 26, 2020
f73d405
Merge pull request #102 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Aug 26, 2020
6de0254
Bump maven-common-artifact-filters from 1.4 to 3.1.0
dependabot[bot] Aug 26, 2020
edbcf10
Bump junit from 3.8.1 to 4.13
dependabot[bot] Aug 26, 2020
908d245
Merge pull request #105 from mojohaus/dependabot/maven/junit-junit-4.13
dependabot[bot] Aug 26, 2020
a515b3b
Bump plexus-container-default from 1.0-alpha-9 to 2.1.0
dependabot[bot] Aug 26, 2020
e3ed74f
Bump maven-plugin-annotations from 3.5.2 to 3.6.0
dependabot[bot] Aug 26, 2020
d600af8
Merge pull request #96 from mojohaus/dependabot/maven/org.apache.mave…
dependabot[bot] Aug 27, 2020
b19730f
Merge pull request #103 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Aug 27, 2020
6a56b61
Bump maven-assembly-plugin from 3.1.0 to 3.3.0
dependabot[bot] Aug 27, 2020
24b0685
Bump maven-shade-plugin from 2.0 to 3.2.4
dependabot[bot] Aug 27, 2020
572acfe
Bump asm from 7.3.1 to 9.0
dependabot[bot] Sep 22, 2020
89bce5d
Merge pull request #107 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Oct 6, 2020
546373e
Merge pull request #108 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Oct 6, 2020
b8e6a4b
Bump maven-plugin-plugin from 3.5.2 to 3.6.0
dependabot[bot] Oct 7, 2020
6aeac58
Bump actions/cache from v2.1.1 to v2.1.2
dependabot[bot] Oct 12, 2020
65db093
Merge pull request #115 from mojohaus/dependabot/github_actions/actio…
dependabot[bot] Oct 13, 2020
6a51b90
Merge pull request #114 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Oct 13, 2020
d0a15f4
Merge pull request #111 from mojohaus/dependabot/maven/org.ow2.asm-as…
dependabot[bot] Oct 13, 2020
01a4325
Bump junit from 4.13 to 4.13.1 in /animal-sniffer-enforcer-rule
dependabot[bot] Oct 13, 2020
a0171c5
Merge pull request #104 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Oct 13, 2020
3b19636
Bump plexus-utils from 1.5.6 to 3.3.0
dependabot[bot] Oct 13, 2020
6c6263b
Bump enforcer-api from 1.0 to 1.4.1
dependabot[bot] Oct 13, 2020
149afea
Bump build-helper-maven-plugin from 1.7 to 3.2.0
dependabot[bot] Oct 13, 2020
a74cc28
Bump junit from 4.13 to 4.13.1
dependabot[bot] Oct 13, 2020
db7898d
Bump junit in /animal-sniffer-maven-plugin/src/it/with-deps-excluded
dependabot[bot] Oct 13, 2020
c613319
Bump junit in /animal-sniffer-maven-plugin/src/it/with-deps
dependabot[bot] Oct 13, 2020
bb46b5c
Bump release-drafter/release-drafter from v5.11.0 to v5.12.1 (#125)
dependabot[bot] Oct 26, 2020
6410544
Merge pull request #123 from mojohaus/dependabot/maven/animal-sniffer…
dependabot[bot] Oct 26, 2020
f1fa50c
Merge pull request #122 from mojohaus/dependabot/maven/animal-sniffer…
dependabot[bot] Oct 26, 2020
5174581
Merge pull request #120 from mojohaus/dependabot/maven/junit-junit-4.…
dependabot[bot] Oct 26, 2020
773ab00
Bump junit in /animal-sniffer-maven-plugin/src/it/version-resolution
dependabot[bot] Oct 26, 2020
6a96d6e
Merge pull request #119 from mojohaus/dependabot/maven/org.codehaus.m…
dependabot[bot] Oct 26, 2020
eed0da0
Merge pull request #118 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Oct 26, 2020
79a7192
Merge pull request #117 from mojohaus/dependabot/maven/org.codehaus.p…
dependabot[bot] Oct 26, 2020
82f0287
Merge pull request #116 from mojohaus/dependabot/maven/animal-sniffer…
dependabot[bot] Oct 26, 2020
2c89b56
Merge pull request #94 from mojohaus/dependabot/maven/org.codehaus.pl…
dependabot[bot] Oct 26, 2020
7580a8a
Bump ant from 1.9.4 to 1.9.15
dependabot[bot] Oct 26, 2020
0bf1d78
Bump ant from 1.9.4 to 1.9.15 in /animal-sniffer-ant-tasks
dependabot[bot] Oct 26, 2020
470c80a
Merge pull request #121 from mojohaus/dependabot/maven/animal-sniffer…
dependabot[bot] Oct 26, 2020
c823083
Bump maven-surefire-plugin from 2.22.0 to 2.22.2
dependabot[bot] Oct 27, 2020
8d5ae15
Bump maven-compiler-plugin from 3.8.0 to 3.8.1
dependabot[bot] Oct 27, 2020
14a15d3
Bump maven-project-info-reports-plugin from 3.0.0 to 3.1.1
dependabot[bot] Oct 27, 2020
1216654
Bump maven-site-plugin from 3.9.0 to 3.9.1
dependabot[bot] Oct 27, 2020
0551768
Merge pull request #129 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Oct 28, 2020
38e339e
Merge pull request #128 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Oct 28, 2020
dcf3b59
Merge pull request #127 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Oct 28, 2020
f90b3a0
Merge pull request #126 from mojohaus/dependabot/maven/org.apache.mav…
dependabot[bot] Oct 28, 2020
1b39bbf
Merge pull request #113 from mojohaus/dependabot/maven/org.apache.ant…
dependabot[bot] Oct 28, 2020
364fc20
Merge pull request #109 from mojohaus/dependabot/maven/animal-sniffer…
dependabot[bot] Oct 28, 2020
3ea495a
Bump actions/cache from v2.1.2 to v2.1.3
dependabot[bot] Nov 9, 2020
8c2eac0
Merge pull request #133 from mojohaus/dependabot/github_actions/actio…
dependabot[bot] Nov 10, 2020
3976979
Fix "NestMember requires ASM7" (#135)
bradcupit Dec 23, 2020
d841b97
upgrade mojo-parent 60 (#136)
olamy Dec 24, 2020
9b745b8
Typo fix in error message (#137)
gunnarmorling Dec 28, 2020
47b21f5
Bump release-drafter/release-drafter from v5.12.1 to v5.13.0 (#138)
dependabot[bot] Dec 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
2 changes: 2 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_extends: .github
tag-template: animal-sniffer-parent-$NEXT_MINOR_VERSION
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v2

- name: Set up cache for ~./m2/repository
uses: actions/cache@v1
uses: actions/cache@v2.1.3
with:
path: ~/.m2/repository
key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
Expand All @@ -49,4 +49,4 @@ jobs:
java-version: ${{ matrix.java }}

- name: Build with Maven
run: mvn verify -e -B -V -P run-its
run: mvn verify -e -B -V -P run-its javadoc:javadoc site site:stage
12 changes: 12 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Release Drafter
on:
push:
branches:
- master
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5.13.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ env:
- MAVEN_VERSION=3.5.3
jdk:
- oraclejdk8
- oraclejdk9
- oraclejdk11
dist: trusty
install:
Expand Down
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License

Copyright (c) 2009 codehaus.org.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

4 changes: 2 additions & 2 deletions animal-sniffer-ant-tasks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.9.15</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -64,7 +64,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.0</version>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
Expand Down
8 changes: 4 additions & 4 deletions animal-sniffer-enforcer-rule/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</description>

<properties>
<enforcer-api.version>1.0</enforcer-api.version>
<enforcer-api.version>1.4.1</enforcer-api.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -76,17 +76,17 @@
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-common-artifact-filters</artifactId>
<version>1.4</version>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-9</version>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
10 changes: 5 additions & 5 deletions animal-sniffer-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,23 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.9</version>
<version>3.11</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-common-artifact-filters</artifactId>
<version>1.4</version>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.5.6</version>
<version>3.3.0</version>
</dependency>

<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.5.2</version>
<version>3.6.0</version>
<scope>provided</scope>
</dependency>

Expand All @@ -104,7 +104,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5.2</version>
<version>3.6.0</version>
<configuration>
<!-- see http://jira.codehaus.org/browse/MNG-5346 -->
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion animal-sniffer-maven-plugin/src/it/with-deps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.FileVisitOption;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Enumeration;
import java.util.Iterator;
Expand Down Expand Up @@ -123,6 +130,39 @@ else if ( ( file.getName().endsWith( ".jar" ) || file.getName().endsWith( ".jmod
// ignore other files
}

/**
* Recursively finds class files and invokes {@link #process(String, InputStream)}
*
* @param path Directory (or other Path like {@code Paths.get(URI.create("jrt:/modules"))}) full of class files,
* or a class file (in which case that single class is processed).
*/
public void process( Path path )
throws IOException {
Files.walkFileTree(path, Collections.<FileVisitOption>emptySet(), 10000, new SimpleFileVisitor<Path>() {

@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
return FileVisitResult.CONTINUE;
}

@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
if (file.getFileName().toString().endsWith(".class")) {
process(file.toString(), Files.newInputStream(file));
}
// XXX we could add processing of jars here as well
// but it's not necessary for processing: Paths.get(URI.create("jrt:/modules"))
return FileVisitResult.CONTINUE;
}

@Override
public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
return FileVisitResult.CONTINUE;
}

});
}

protected void processDirectory( File dir )
throws IOException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected void process( String name, InputStream image )
try
{
ClassReader cr = new ClassReader( image );
cr.accept( new ClassVisitor(Opcodes.ASM5)
cr.accept( new ClassVisitor(Opcodes.ASM7)
{
public void visit( int version, int access, String name, String signature, String superName,
String[] interfaces )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public Clazz( Clazz defA, Clazz defB )
if ( !Objects.equals(defA.superClass, defB.superClass ) )
{
// nothing we can do... this is a breaking change
throw new ClassCastException( "Cannot merger class " + defB.name + " as it has changed superclass:" );
throw new ClassCastException( "Cannot merge class " + defB.name + " as it has changed superclass:" );
}
Set<String> superInterfaces = new HashSet<String>();
if ( defA.superInterfaces != null )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.net.URI;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -71,8 +73,12 @@ public static void main( String[] args )
throws IOException
{
SignatureBuilder builder =
new SignatureBuilder( new FileOutputStream( "signature" ), new PrintWriterLogger( System.out ) );
builder.process( new File( System.getProperty( "java.home" ), "lib/rt.jar" ) );
new SignatureBuilder( new FileOutputStream( "signature" ), new PrintWriterLogger( System.out ) );
if ( getJavaVersion() > 8 ) {
builder.process( Paths.get(URI.create("jrt:/modules")) );
} else {
builder.process( new File( System.getProperty( "java.home" ), "lib/rt.jar" ) );
}
builder.close();
}

Expand Down Expand Up @@ -236,4 +242,22 @@ public FieldVisitor visitField( int access, String name, String desc, String sig
return null;
}
}

public static int getJavaVersion()
{
String version = System.getProperty("java.version");
if ( version.startsWith("1.") )
{
version = version.substring(2);
}
// Allow these formats:
// 1.8.0_72-ea
// 9-ea
// 9
// 9.0.1
int dotPos = version.indexOf( '.' );
int dashPos = version.indexOf( '-' );
return Integer.parseInt( version.substring( 0, dotPos > -1 ? dotPos : dashPos > -1 ? dashPos : 1 ) );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ private class CheckingVisitor

public CheckingVisitor( String name )
{
super(Opcodes.ASM5);
super(Opcodes.ASM7);
this.ignoredPackageCache = new HashSet<String>( 50 * ignoredPackageRules.size() );
this.name = name;
}
Expand Down Expand Up @@ -355,7 +355,7 @@ public AnnotationVisitor visitAnnotation(String desc, boolean visible)

@Override
public FieldVisitor visitField(int access, String name, final String descriptor, String signature, Object value) {
return new FieldVisitor(Opcodes.ASM5) {
return new FieldVisitor(Opcodes.ASM7) {

@Override
public void visitEnd() {
Expand All @@ -369,7 +369,7 @@ public void visitEnd() {
public MethodVisitor visitMethod( int access, final String name, final String desc, String signature, String[] exceptions )
{
line = 0;
return new MethodVisitor(Opcodes.ASM5)
return new MethodVisitor(Opcodes.ASM7)
{
/**
* True if @IgnoreJRERequirement is set.
Expand Down