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

Fails to parse URI after URL-Rewrite #557

Open
r-sop opened this issue Apr 2, 2024 · 0 comments
Open

Fails to parse URI after URL-Rewrite #557

r-sop opened this issue Apr 2, 2024 · 0 comments
Labels

Comments

@r-sop
Copy link

r-sop commented Apr 2, 2024

Config:

<licenseUrlReplacement>
    <regexp>\Qhttp://opensource.org/licenses/mit-license\E</regexp>
    <replacement>https://opensource.org/license/mit</replacement>
</licenseUrlReplacement>

Error:

[DEBUG] Rewrote URL 'http://opensource.org/licenses/mit-license' => 'https://opensource.org/license/mit'
[WARNING] POM for dependency eu.lestard:doc-annotations:0.2 has an invalid license URL: 'https://opensource.org/license/mit'
[DEBUG] POM for dependency eu.lestard:doc-annotations:0.2 has an invalid license URL: 'https://opensource.org/license/mit'
java.net.URISyntaxException: Illegal character in scheme name at index 0: 'https://opensource.org/license/mit'
    at java.net.URI$Parser.fail (URI.java:2976)
    at java.net.URI$Parser.checkChars (URI.java:3147)
    at java.net.URI$Parser.checkChar (URI.java:3157)
    at java.net.URI$Parser.parse (URI.java:3172)
    at java.net.URI.<init> (URI.java:623)
    at org.codehaus.mojo.license.AbstractDownloadLicensesMojo.getLicenseFileName (AbstractDownloadLicensesMojo.java:1201)
    at org.codehaus.mojo.license.AbstractDownloadLicensesMojo.downloadLicenses (AbstractDownloadLicensesMojo.java:1313)
    at org.codehaus.mojo.license.AbstractDownloadLicensesMojo.execute (AbstractDownloadLicensesMojo.java:867)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
    at org.codehaus.classworlds.Launcher.main (Launcher.java:47)

It seems to parse the URL with the single quote characters, which is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants