[MCHECKSTYLE-42] checkstyle does not take into account proxy settings from settings.xml
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- build-system
Research direction
The failure path is identified in CheckstyleReport.java and Locator.java, with fix-proxy-usage.patch attached. Read those locations and the related MCHECKSTYLE-61 and MCHECKSTYLE-160 issues first, then inspect how site generation retrieves the remote configuration. Done means the checkstyle report honors proxy settings from settings.xml when fetching the configuration.
Written by the indexing model from the issue text.
Description
Frederic opened MCHECKSTYLE-42 and commented
I've been hesitating wether to report it as bug or as improvement, but at the moment I'd rate it as a bug.
It took me quite some time to figure out why this was going wrong.
In my settings.xml I've defined our company proxysettings. These settings are used by Maven when connecting to the remote repository.
However when using the checkstyle plugin as part of the site generation I can not obtain our checkstyle.xml which is available via http.
I found a solution by adding the following parameters on the command line when continuum launches maven:
-Dhttp.proxyHost=myproxy -Dhttp.proxyPort=80
Wouldn't it be possible for the maven checkstyle plugin to use the settings defined in settings.xml, so I've only to define those once?
FYI the error generated:
[INFO] Generate "Dependencies" report.
[INFO] Generate "Issue Tracking" report.
[INFO] Generate "Project License" report.
[INFO] Generate "Mailing Lists" report.
[INFO] Generate "Source Repository" report.
[INFO] Generate "Project Team" report.
[INFO] Generate "Maven Surefire Report" report.
[INFO] Generate "Checkstyle" report.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during report generation
Embedded error: Unable to find configuration file location.
http://spirou.mycompany.be/javadev/install/checkstyle/mycompany-checkstyle-1.5.xml
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error during report generation
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error during report generation
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:389)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
Caused by: org.apache.maven.reporting.MavenReportException: Unable to find configuration file location.
at org.apache.maven.plugin.checkstyle.CheckstyleReport.getConfigFile(CheckstyleReport.java:879)
at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:466)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
... 18 more
Caused by: java.io.FileNotFoundException: http://spirou.mycompany.be/javadev/install/checkstyle/mycompany-checkstyle-1.5.xml
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:789)
at java.net.URL.openStream(URL.java:913)
at org.codehaus.plexus.util.FileUtils.copyURLToFile(FileUtils.java:876)
at org.apache.maven.plugin.checkstyle.Locator.resolveLocation(Locator.java:99)
at org.apache.maven.plugin.checkstyle.CheckstyleReport.getConfigFile(CheckstyleReport.java:870)
... 22 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48 seconds
[INFO] Finished at: Thu May 18 17:54:23 CEST 2006
[INFO] Final Memory: 20M/38M
[INFO] ------------------------------------------------------------------------
Affects: 2.0
Attachments:
- fix-proxy-usage.patch (11.04 kB)
Sub-tasks:
- MCHECKSTYLE-160 Checkstyle does not take into account proxy settings from settings.xml
Issue Links:
- MCHECKSTYLE-160 Checkstyle does not take into account proxy settings from settings.xml
("is duplicated by") - MCHECKSTYLE-316 Maven proxy settings is being ignored
("is duplicated by") - MCHECKSTYLE-61 Upgrade Locator URL logic to use maven-wagon.
("depends upon")
6 votes, 11 watchers
- Dominant language
- Java
- Stars
- 98
- Forks
- 69
- Avg merge
- 12h 42m
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/maven-checkstyle-plugin
-
maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Update dependencies.May be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
DefaultCheckstyleExecutor should be a failure, not an errorPossibly taken @efegokdemir claimed this 34 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
apache/maven-checkstyle-plugin#656 · 1 comment ·
-
Add ability to print warnings when `failOnViolation: true` and `violationSeverity: error`Possibly taken @efegokdemir claimed this 32 days ago. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 50/100
apache/maven-checkstyle-plugin#648 · 5 comments ·
All issues in apache/maven-checkstyle-plugin
Similar issues
-
agent:working bug follow-up lane:auto
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Sanne/incus-spawn#1765 · 2 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
checkstyle/checkstyle#22260 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
strimzi/strimzi-kafka-operator#13328 · 1 comment · 3 reactions ·
Maintainers usually reply within 1 day