Skip to content

Commit 91442cc

Browse files
committed
2 parents fa3849b + 4ed0bc3 commit 91442cc

File tree

71 files changed

+2536
-976
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2536
-976
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "maven"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"

.github/release-drafter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_extends: .github
2+
tag-template: plexus-compiler-$NEXT_MINOR_VERSION

.github/workflows/codeql-analysis.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '42 3 * * 0'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [ 'java' ]
32+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33+
# Learn more:
34+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v1
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
49+
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v1
54+
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
57+
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
61+
62+
#- run: |
63+
# make bootstrap
64+
# make release
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v1

.github/workflows/maven.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: GitHub CI
19+
20+
on: [push, pull_request]
21+
22+
jobs:
23+
build:
24+
25+
strategy:
26+
matrix:
27+
os: [ubuntu-latest,windows-latest, macOS-latest]
28+
java: [8, 11, 14, 15, 16, 17-ea]
29+
jdk: [adopt-hotspot, zulu, adopt-openj9]
30+
fail-fast: false
31+
32+
runs-on: ${{ matrix.os }}
33+
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2
37+
38+
- name: Set up cache for ~./m2/repository
39+
uses: actions/cache@v2.1.6
40+
with:
41+
path: ~/.m2/repository
42+
key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
43+
restore-keys: |
44+
maven-${{ matrix.os }}-java${{ matrix.java }}-
45+
maven-${{ matrix.os }}-
46+
47+
- name: Set up JDK
48+
uses: actions/setup-java@v2
49+
with:
50+
distribution: ${{ matrix.jdk }}
51+
java-version: ${{ matrix.java }}
52+
53+
- name: Build with Maven
54+
run: mvn install javadoc:javadoc -e -B -V -Pno-tests-if-not-on-osx

.github/workflows/release-drafter.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Release Drafter
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
update_release_draft:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: release-drafter/release-drafter@v5.15.0
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ Plexus-Compiler
22
===============
33

44
[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/codehaus-plexus/plexus-compiler.svg?label=License)](http://www.apache.org/licenses/)
5-
[![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-compiler.svg?label=Maven%20Central)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.codehaus.plexus%22%20a%3A%22plexus-compiler%22)
5+
[![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-compiler.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.codehaus.plexus/plexus-compiler)
66
[![Build Status](https://travis-ci.org/codehaus-plexus/plexus-compiler.svg?branch=master)](https://travis-ci.org/codehaus-plexus/plexus-compiler)
77

88
The canonical git repository is located at https://github.com/codehaus-plexus/plexus-compiler
9+
10+
11+
### Error Prone usage
12+
13+
Please refer to [documentation](https://errorprone.info/docs/installation#maven)
14+
15+
Or the project [it test](plexus-compiler-its/src/main/it/error-prone-compiler/pom.xml)

plexus-compiler-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.codehaus.plexus</groupId>
77
<artifactId>plexus-compiler</artifactId>
8-
<version>2.8.6-SNAPSHOT</version>
8+
<version>2.8.9-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>plexus-compiler-api</artifactId>

plexus-compiler-api/src/main/java/org/codehaus/plexus/compiler/CompilerConfiguration.java

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ public class CompilerConfiguration
6868
private String debugLevel;
6969

7070
private boolean showWarnings = true;
71+
72+
private String warnings;
7173

74+
private boolean showLint;
75+
7276
/**
7377
* -Werror argument as supported since Java 1.7
7478
*/
@@ -79,7 +83,7 @@ public class CompilerConfiguration
7983
private String sourceVersion;
8084

8185
private String targetVersion;
82-
86+
8387
/**
8488
* value of -release parameter in java 9+
8589
*/
@@ -339,31 +343,53 @@ public String getDebugLevel()
339343
return debugLevel;
340344
}
341345

342-
public void setShowWarnings( boolean showWarnings )
346+
public void setWarnings( String warnings )
343347
{
344-
this.showWarnings = showWarnings;
348+
this.warnings = warnings;
345349
}
346350

347351
public boolean isShowWarnings()
348352
{
349353
return showWarnings;
350354
}
351355

356+
public void setShowWarnings( boolean showWarnings )
357+
{
358+
this.showWarnings = showWarnings;
359+
}
360+
352361
public boolean isShowDeprecation()
353362
{
354363
return showDeprecation;
355364
}
356365

366+
public String getWarnings()
367+
{
368+
return warnings;
369+
}
370+
371+
372+
373+
public void setShowLint( boolean showLint )
374+
{
375+
this.showLint = showLint;
376+
}
377+
378+
public boolean isShowLint()
379+
{
380+
return this.showLint;
381+
}
382+
357383
public void setShowDeprecation( boolean showDeprecation )
358384
{
359385
this.showDeprecation = showDeprecation;
360386
}
361-
387+
362388
public boolean isFailOnWarning()
363389
{
364390
return failOnWarning;
365391
}
366-
392+
367393
public void setFailOnWarning( boolean failOnWarnings )
368394
{
369395
this.failOnWarning = failOnWarnings;
@@ -388,7 +414,7 @@ public void setTargetVersion( String targetVersion )
388414
{
389415
this.targetVersion = targetVersion;
390416
}
391-
417+
392418
public String getReleaseVersion()
393419
{
394420
return releaseVersion;
@@ -451,7 +477,7 @@ public void setCustomCompilerArguments( LinkedHashMap<String, String> customComp
451477

452478
/**
453479
* Get all unique argument keys and their value. In case of duplicate keys, last one added wins.
454-
*
480+
*
455481
* @return
456482
* @see CompilerConfiguration#getCustomCompilerArgumentsEntries()
457483
*/
@@ -473,10 +499,10 @@ public void setCustomCompilerArgumentsAsMap( Map<String, String> customCompilerA
473499
this.customCompilerArguments.addAll( customCompilerArguments.entrySet() );
474500
}
475501
}
476-
502+
477503
/**
478504
* In case argument keys are not unique, this will return all entries
479-
*
505+
*
480506
* @return
481507
*/
482508
public Collection<Map.Entry<String,String>> getCustomCompilerArgumentsEntries()

plexus-compiler-its/pom.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>org.codehaus.plexus</groupId>
7+
<artifactId>plexus-compiler</artifactId>
8+
<version>2.8.9-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>plexus-compiler-its</artifactId>
12+
<packaging>pom</packaging>
13+
14+
<name>Plexus Compiler It Tests</name>
15+
16+
<dependencies>
17+
<dependency>
18+
<groupId>org.codehaus.plexus</groupId>
19+
<artifactId>plexus-compiler-javac-errorprone</artifactId>
20+
</dependency>
21+
<dependency>
22+
<groupId>org.codehaus.plexus</groupId>
23+
<artifactId>plexus-compiler-javac</artifactId>
24+
</dependency>
25+
</dependencies>
26+
<build>
27+
<plugins>
28+
<plugin>
29+
<groupId>org.apache.maven.plugins</groupId>
30+
<artifactId>maven-invoker-plugin</artifactId>
31+
<version>3.2.2</version>
32+
<executions>
33+
<execution>
34+
<id>integration-tests</id>
35+
<phase>verify</phase>
36+
<goals>
37+
<goal>install</goal>
38+
<goal>run</goal>
39+
<goal>verify</goal>
40+
</goals>
41+
<configuration>
42+
<debug>false</debug>
43+
<streamLogsOnFailures>true</streamLogsOnFailures>
44+
<projectsDirectory>src/main/it</projectsDirectory>
45+
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
46+
<postBuildHookScript>verify</postBuildHookScript>
47+
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
48+
<settingsFile>src/main/it/settings.xml</settingsFile>
49+
<goals>
50+
<goal>clean</goal>
51+
<goal>test-compile</goal>
52+
</goals>
53+
<scriptVariables>
54+
<errorprone.version>${errorprone.version}</errorprone.version>
55+
</scriptVariables>
56+
</configuration>
57+
</execution>
58+
</executions>
59+
</plugin>
60+
</plugins>
61+
</build>
62+
</project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
invoker.java.version = 1.8+
19+
invoker.goals = clean test
20+
#invoker.buildResult = failure

0 commit comments

Comments
 (0)