takari / takari-lifecycle

Takari Maven Lifecycle
http://takari.io/book/40-lifecycle.html
Eclipse Public License 1.0
66 stars 35 forks source link

takari-lifecycle-plugin interferes w site goal (because of new https maven central requirement) #83

Open os72 opened 4 years ago

os72 commented 4 years ago

See

After switching .m2/settings.xml to point to HTTPS maven central, mvn clean site fails in my project:

Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact com.github.os72:protoc-jar-maven-plugin:pom:3.11.4 from/to central (http://repo.maven.apache.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo.maven.apache.org/maven2/com/github/os72/protoc-jar-maven-plugin/3.11.4/protoc-jar-maven-plugin-3.11.4.pom

Apparently this is because of some m2e dependency in takari (?), not sure. Somehow it injects the old HTTP maven central URL. Removing takari-lifecycle-plugin from the POM solves the problem

$ mvn clean site
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building protoc-jar-maven-plugin 3.11.4
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ protoc-jar-maven-plugin ---
[INFO] Deleting C:\github\protoc-jar-maven-plugin\target
[INFO]
[INFO] --- maven-site-plugin:3.3:site (default-site) @ protoc-jar-maven-plugin ---
[WARNING] Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.7
[INFO] configuring report plugin org.apache.maven.plugins:maven-plugin-plugin:3.2
[INFO]
[INFO] >>> maven-plugin-plugin:3.2:report (report:report) @ protoc-jar-maven-plugin >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ protoc-jar-maven-plugin ---
[INFO]
[INFO] --- maven-plugin-plugin:3.2:descriptor (default-descriptor) @ protoc-jar-maven-plugin ---
[INFO] Using 'UTF-8' encoding to read mojo metadata.
[INFO] Applying mojo extractor for language: java
[INFO] Mojo extractor for language: java found 1 mojo descriptors.
[INFO] Applying mojo extractor for language: bsh
[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
[INFO] Applying mojo extractor for language: java-annotations
[INFO] Mojo extractor for language: java-annotations found 0 mojo descriptors.
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ protoc-jar-maven-plugin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ protoc-jar-maven-plugin ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\github\protoc-jar-maven-plugin\target\classes
[INFO]
[INFO] <<< maven-plugin-plugin:3.2:report (report:report) @ protoc-jar-maven-plugin <<<
[INFO] Parent project loaded from repository: org.sonatype.oss:oss-parent:pom:9
[INFO] Relativizing decoration links with respect to project URL: https://github.com/os72/protoc-jar-maven-plugin
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Skipped "About" report, file "index.html" already exists for the English version.
[INFO] Generating "Plugin Management" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Distribution Management" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Dependency Information" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Source Repository" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Mailing Lists" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Issue Tracking" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Continuous Integration" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Project Plugins" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Project License" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Project Team" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Project Summary" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Dependencies" report    --- maven-project-info-reports-plugin:2.7
Downloading: http://repo.maven.apache.org/maven2/com/github/os72/protoc-jar-maven-plugin/3.11.4/protoc-jar-maven-plugin-3.11.4.pom
[WARNING] Unable to create Maven project from repository for artifact com.github.os72:protoc-jar-maven-plugin:maven-plugin:3.11.4
org.apache.maven.project.ProjectBuildingException: Error resolving project artifact: Could not transfer artifact com.github.os72:protoc-jar-maven-plugin:pom:3.11.4 from/to central (http://repo.maven.apache.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo.maven.apache.org/maven2/com/github/os72/protoc-jar-maven-plugin/3.11.4/protoc-jar-maven-plugin-3.11.4.pom for project com.github.os72:protoc-jar-maven-plugin:pom:3.11.4
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:299)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:236)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
        at org.apache.maven.report.projectinfo.dependencies.RepositoryUtils.getMavenProjectFromRepository(RepositoryUtils.java:298)
        at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.printDescriptionsAndURLs(DependenciesRenderer.java:928)
        at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.printDependencyListing(DependenciesRenderer.java:885)
        at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderSectionDependencyTree(DependenciesRenderer.java:498)
        at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderSectionProjectDependencyGraph(DependenciesRenderer.java:485)
        at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderBody(DependenciesRenderer.java:255)
        at org.apache.maven.reporting.AbstractMavenReportRenderer.render(AbstractMavenReportRenderer.java:79)
        at org.apache.maven.report.projectinfo.DependenciesReport.executeReport(DependenciesReport.java:186)
        at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
        at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:219)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
        at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact com.github.os72:protoc-jar-maven-plugin:pom:3.11.4 from/to central (http://repo.maven.apache.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo.maven.apache.org/maven2/com/github/os72/protoc-jar-maven-plugin/3.11.4/protoc-jar-maven-plugin-3.11.4.pom
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:239)
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:295)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:288)
        ... 37 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.github.os72:protoc-jar-maven-plugin:pom:3.11.4 from/to central (http://repo.maven.apache.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo.maven.apache.org/maven2/com/github/os72/protoc-jar-maven-plugin/3.11.4/protoc-jar-maven-plugin-3.11.4.pom
        at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1016)
        at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1004)
        at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:725)
        at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.maven.wagon.TransferFailedException: Error transferring file: Server returned HTTP response code: 501 for URL: http://repo.maven.apache.org/maven2/com/github/os72/protoc-jar-maven-plugin/3.11.4/protoc-jar-maven-plugin-3.11.4.pom
        at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:143)
        at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
        at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
        at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:660)
        ... 4 more
Caused by: java.io.IOException: Server returned HTTP response code: 501 for URL: http://repo.maven.apache.org/maven2/com/github/os72/protoc-jar-maven-plugin/3.11.4/protoc-jar-maven-plugin-3.11.4.pom
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1944)
        at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1939)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1938)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1508)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
        at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:122)
        ... 8 more
Caused by: java.io.IOException: Server returned HTTP response code: 501 for URL: http://repo.maven.apache.org/maven2/com/github/os72/protoc-jar-maven-plugin/3.11.4/protoc-jar-maven-plugin-3.11.4.pom
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
        at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)
        ... 8 more
[WARNING] The repository url 'http://snapshots.maven.codehaus.org/maven2' is invalid - Repository 'snapshots' will be blacklisted.
[WARNING] The repository url 'http://repo.maven.apache.org/maven2' is invalid - Repository 'central' will be blacklisted.
[WARNING] The repository url 'https://oss.sonatype.org/content/repositories/snapshots' is invalid - Repository 'sonatype-nexus-snapshots' will be blacklisted.
[WARNING] The repository url 'http://people.apache.org/repo/m2-snapshot-repository' is invalid - Repository 'apache.snapshots' will be blacklisted.
[INFO] Generating "Plugin Documentation" report    --- maven-plugin-plugin:3.2
[INFO] Applying mojo extractor for language: java
[INFO] Mojo extractor for language: java found 1 mojo descriptors.
[INFO] Applying mojo extractor for language: bsh
[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
[INFO] Applying mojo extractor for language: java-annotations
[INFO] Mojo extractor for language: java-annotations found 0 mojo descriptors.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.926 s
[INFO] Finished at: 2020-03-07T16:26:12-08:00
[INFO] Final Memory: 37M/516M
[INFO] ------------------------------------------------------------------------
cstamas commented 1 year ago

Does this still stand with latest 2.1.0 release?