apache / apache/maven

[MNG-7661] Fix IT build / compiler warnings

Open
#8,791 0 comments 0 reactions 1 assignee Claimed by @slawekjaranowski View on GitHub
maintenance priority:minor
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Petr Široký](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=psiroky)** opened **[MNG-7661](https://issues.apache.org/jira/browse/MNG-7661?redirect=false)** and commented

I noticed there is a quite a few build (from Maven) and also compiler warnings (e.g. using deprecated verifier APIs) when running the integration tests.

I noticed following:
*   `maven-plugin-plugin` complains about Maven deps which should be in `provided` scope

```java
[INFO] --- maven-plugin-plugin:3.6.4:descriptor (default-descriptor) @ maven-it-plugin-bootstrap ---
[ERROR] Some dependencies of Maven Plugins are expected to be in provided scope.
Please make sure that dependencies listed below declared in POM
have set 'provided' as well.The following dependencies are in wrong scope:
 * org.apache.maven:maven-plugin-api:jar:3.8.6:compile
 * org.apache.maven:maven-model:jar:3.8.6:compile
 * org.apache.maven:maven-artifact:jar:3.8.6:compile
 * org.apache.maven:maven-core:jar:3.8.6:compile
 * org.apache.maven:maven-settings:jar:3.8.6:compile
 * org.apache.maven:maven-settings-builder:jar:3.8.6:compile
 * org.apache.maven:maven-builder-support:jar:3.8.6:compile
 * org.apache.maven:maven-repository-metadata:jar:3.8.6:compile
 * org.apache.maven:maven-model-builder:jar:3.8.6:compile
 * org.apache.maven:maven-resolver-provider:jar:3.8.6:compile

```

* several deprecated maven-verifier methods are being used (these are not being reported by Maven during builds - I guess the warnings are disabled, but IDEA complains)

```java
verifier.executeGoal( "process-sources" );
verifier.resetStreams();
verifier.addCliOption( "--settings" );
```

* -Jetty WARN (related to the fact that the tests are using very old version, probably not a bad idea to upgrade that)-

```java
26317 [qtp876069009-2062] WARN org.eclipse.jetty.util.ssl.SslContextFactory - EXCEPTION 
java.lang.UnsupportedOperationException: This method is deprecated and marked for removal. Use the getPeerCertificates() method instead.
    at java.base/javax.net.ssl.SSLSession.getPeerCertificateChain(SSLSession.java:295)
    at org.eclipse.jetty.util.ssl.SslContextFactory.getCertChain(SslContextFactory.java:1393)
    at org.eclipse.jetty.server.SecureRequestCustomizer.customize(SecureRequestCustomizer.java:104)
    at org.eclipse.jetty.server.SecureRequestCustomizer.customize(SecureRequestCustomizer.java:54)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:266)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:224)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
    at java.base/java.lang.Thread.run(Thread.java:833)
```

*

* the WARN was fixed by upgrading Jetty as part of https://issues.apache.org/jira/browse/MNG-7665

I would like to take a look at those and create small(ish) PRs with suggested fixes.

 

---

**Remote Links:**
- [GitHub Pull Request #223
](https://github.com/apache/maven-integration-testing/pull/223)
- [GitHub Pull Request #224
](https://github.com/apache/maven-integration-testing/pull/224)
- [GitHub Pull Request #225
](https://github.com/apache/maven-integration-testing/pull/225)
- [GitHub Pull Request #226
](https://github.com/apache/maven-integration-testing/pull/226)
- [GitHub Pull Request #227
](https://github.com/apache/maven-integration-testing/pull/227)
- [GitHub Pull Request #233
](https://github.com/apache/maven-integration-testing/pull/233)
- [GitHub Pull Request #235
](https://github.com/apache/maven-integration-testing/pull/235)
- [GitHub Pull Request #238
](https://github.com/apache/maven-integration-testing/pull/238)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.