[jbosstools-issues] [JBoss JIRA] (JBIDE-16719) Maven.resolver().loadPomFromFile(<relative_path>) doesn't work in Arquillian Eclipse

Snjezana Peco (JIRA) issues at jboss.org
Fri Mar 7 11:31:33 EST 2014


    [ https://issues.jboss.org/browse/JBIDE-16719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12951220#comment-12951220 ] 

Snjezana Peco commented on JBIDE-16719:
---------------------------------------

{quote}
Well, I want to make sure that it works from both CI and IDE. If introducing a new property can fix that, I'll do that. However, it would be better if that works without any property. 
{quote}

You should use a property only if it exists and a file can't be found in the current directory. That won't affect CLI tests because they won't set that property.

{quote}
Why is Arquillan Eclipse actually having problem with currentDirectory != projectDirectory? For test execution it works fine from Eclipse (e.g. in test execution, currentDirectory==projectDirectory).
{quote}

When you start a test in the project's home directory, it will work. When you launch a new configuration in Eclipse (or run a test via CLI), you can set the current directory. If it is set in the project's home directory, the test will work. See my screencast - http://screencast.com/t/jQka9WXD5.
However, when running a deployment method within IDE, the current directory is set when IDE is started. Mostly, it isn't the home directory of a project so that a file can't be found. We can't change the current directory within JVM because it can cause different issues in other threads and starting a new JVM session would significantly decrease performance.

{quote}
Right, that's something which is set by plugin, so user does not have to fiddle with how it it actually set. If IDE (m2e) has support for the plugin, it would just work.
{quote}

We can do it, but it is another issue. If a user doesn't use the Maven.configureResolverViaPlugin method, but uses the loadPomFromFile method, a relative path won't be found.
                
> Maven.resolver().loadPomFromFile(<relative_path>) doesn't work in Arquillian Eclipse
> ------------------------------------------------------------------------------------
>
>                 Key: JBIDE-16719
>                 URL: https://issues.jboss.org/browse/JBIDE-16719
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: testing-tools
>    Affects Versions: 4.2.0.Alpha2
>            Reporter: Snjezana Peco
>            Assignee: Snjezana Peco
>
> Shrinkwrap resolver solves relative paths using the current working directory.
> I don't know a reliable way to change the current working directory so that the deployment method mentioned in JBIDE-16696 can't be analyzed properly.
> Since I don't know how to solve the issue, I will add the following problem marker:
> "Cannot solve relative paths in the Maven.resolver().loadPomFromFile() method"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list