You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2017/07/18 17:55:00 UTC

[jira] [Closed] (SUREFIRE-1393) Failsafe generates "URI is not hierarchical" error

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

Robert Scholte closed SUREFIRE-1393.
------------------------------------
    Resolution: Not A Problem
      Assignee: Robert Scholte

Yes, this is intended behavior thanks to SUREFIRE-855. It shows that your code won't run in the end (unless it is deployed as an exploded archive).
What you should have done is
{code}
properties.load(this.getClass().getResourceAsStream("/message.properties"));
{code}

> 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)