You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "redfish4ktc (JIRA)" <ji...@apache.org> on 2017/07/19 08:03:00 UTC
[jira] [Commented] (SUREFIRE-1393) Failsafe generates "URI is not
hierarchical" error
[ https://issues.apache.org/jira/browse/SUREFIRE-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16092754#comment-16092754 ]
redfish4ktc commented on SUREFIRE-1393:
---------------------------------------
[~rfscholte] yes this is right if I want to load data in a Properties instance but in my example, I was looking for a directory.
I can workaround the issue by putting my resources in a directory which won't be packaged in the jar and add it to the failsafe plugin classpath configuration.
What is confusing is that the failsafe and surefire plugins don't have the same behaviour regarding loading resources in such a case. This is what my example project shows.
> Failsafe generates "URI is not hierarchical" error
> --------------------------------------------------
>
> Key: SUREFIRE-1393
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1393
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Failsafe Plugin
> Affects Versions: 2.19, 2.19.1, 2.20
> Environment: Windows / Linux
> Reporter: redfish4ktc
> Assignee: Robert Scholte
> Attachments: failsafe_getResource_uri_not_hierarchical.zip
>
>
> When testing the following code, I got a "URI is not hierarchical" error when calling {{url.toURI()}}
> {code:java}
> URL url = this.getClass().getResource( "/messages.properties" );
> File file = new File( url.toURI() );
> {code}
> This only occurs with the failsafe maven plugin, not with surefire. This was working with version 2.18.1 (and before) but not anymore with version 2.19 (and superior).
> I have attached the [^failsafe_getResource_uri_not_hierarchical.zip] project that shows the issue (it tests both failsafe and surefire plugins).
> The problem may be related to SUREFIRE-855 introduced in version 2.19
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)