karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KARAF-6085) karaf-maven-plugin verify mojo builds invalid repository URL on Windows
Date Thu, 14 Mar 2019 07:40:00 GMT

     [ https://issues.apache.org/jira/browse/KARAF-6085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Freeman Fang resolved KARAF-6085.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 4.2.4
                   4.3.0

> karaf-maven-plugin verify mojo builds invalid repository URL on Windows
> -----------------------------------------------------------------------
>
>                 Key: KARAF-6085
>                 URL: https://issues.apache.org/jira/browse/KARAF-6085
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.2
>         Environment: Windows
>            Reporter: Dan Berindei
>            Assignee: Freeman Fang
>            Priority: Minor
>             Fix For: 4.3.0, 4.2.4
>
>
> [https://github.com/apache/karaf/blob/218c765d0ec389f44d27d9e837e965028aa30f15/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java#L253]
> {code:java}
>  allDescriptors.add("file:" + project.getBuild().getDirectory() + "/feature/feature.xml");
> {code}
> On Windows, this builds a URL like {{[file://C:\jenkins\workspace\InfinispanAlternateBuilds\InfinispanWindows\commons\target/classes/features.xml|file:///classes/features.xml]}},
which is invalid because {{C:}} is interpreted as a host name:
> [https://en.wikipedia.org/wiki/File_URI_scheme#Windows_2]
> The error is reported like this:
> {noformat}
> 16:24:58 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.karaf.tooling:karaf-maven-plugin:4.2.0:verify (validate) on project infinispan-commons:
Unable to load features descriptors
> 16:24:58     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
> 16:24:58     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
> 16:24:58     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
> 16:24:58     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:117)
> 16:24:58     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:81)
> 16:24:58     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:56)
> 16:24:58     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
> 16:24:58     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> 16:24:58     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> 16:24:58     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> 16:24:58     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
> 16:24:58     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> 16:24:58     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 16:24:58     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> 16:24:58     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
> 16:24:58     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
> 16:24:59     at java.lang.reflect.Method.invoke (Method.java:498)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> 16:24:59 Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to load features
descriptors
> 16:24:59     at org.apache.karaf.tooling.VerifyMojo.doExecute (VerifyMojo.java:293)
> 16:24:59     at org.apache.karaf.tooling.VerifyMojo.execute (VerifyMojo.java:185)
> 16:24:59     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
> 16:24:59     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
> 16:24:59     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
> 16:24:59     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
> 16:24:59     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:117)
> 16:24:59     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:81)
> 16:24:59     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:56)
> 16:24:59     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
> 16:24:59     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> 16:24:59     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> 16:24:59     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> 16:24:59     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
> 16:24:59     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> 16:24:59     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 16:24:59     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> 16:24:59     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
> 16:24:59     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
> 16:24:59     at java.lang.reflect.Method.invoke (Method.java:498)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> 16:24:59 Caused by: org.apache.karaf.features.internal.util.MultiException: Error:
> 16:24:59 	Error downloading file://C:\jenkins\workspace\InfinispanAlternateBuilds\InfinispanWindows\commons\target/classes/features.xml
> 16:24:59     at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>
(MavenDownloadManager.java:91)
> 16:24:59     at org.apache.karaf.profile.assembly.CustomDownloadManager$CustomMavenDownloader.<init>
(CustomDownloadManager.java:57)
> 16:24:59     at org.apache.karaf.profile.assembly.CustomDownloadManager.createDownloader
(CustomDownloadManager.java:54)
> 16:24:59     at org.apache.karaf.tooling.VerifyMojo.loadRepositories (VerifyMojo.java:558)
> 16:24:59     at org.apache.karaf.tooling.VerifyMojo.doExecute (VerifyMojo.java:267)
> 16:24:59     at org.apache.karaf.tooling.VerifyMojo.execute (VerifyMojo.java:185)
> 16:24:59     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
> 16:24:59     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
> 16:24:59     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
> 16:24:59     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
> 16:24:59     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:117)
> 16:24:59     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:81)
> 16:24:59     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:56)
> 16:24:59     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
> 16:24:59     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> 16:24:59     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> 16:24:59     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> 16:24:59     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
> 16:24:59     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> 16:24:59     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 16:24:59     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> 16:24:59     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
> 16:24:59     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
> 16:24:59     at java.lang.reflect.Method.invoke (Method.java:498)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> 16:24:59     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> {noformat}
> As a workaround, one can configure the descriptors in the POM, overriding the {{VerifyMojo}}
defaults. In fact, our project was already overriding the descriptors, but we were making
the same mistake of using {{file://${project.build.directory}}} instead of {{file:///${project.build.directory}}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message