Repository navigation
Fix adjustedPath on Windows - #147
Conversation
|
Thank you @juliaberkhout! Is there a failing test in the ShrinkWrap suite on Windows? If not, can we add one which isolates the problem and shows the failure to this PR? |
|
I have in fact multiple test failures on Windows (with and without my fix) so maybe there are more bugs like this one. I'll look into that! |
Commit 4293b54 removes the code that replaces the File.seperator with a forward slash. This replacement is necessary on Windows, so this removal makes that resources from a JAR can no longer be found while trying to add them to the archive.
|
@ALRubinger There was one failing test, |
|
Appreciate that! I'm prepping a Windows install to review the PR and get this upstream. |
|
Hi @ALRubinger, are there any updates on the review of this PR? |
|
@ALRubinger @juliaberkhout it seems to be working fine. I created #148 to verify that. This very PR should be merged first though, as mine includes this fix - without it we already have a bunch of tests failing. OR I can revert fix commit, but then we end up with broken build on the main branch. |
|
@bartoszmajsak I'm not sure what you mean (and what should be merged first). All is fine by me, in the end I want to use a version of shrinkwrap that includes this fix. So: do you want me to merge this PR? Or should you guys do something first? |
|
@juliaberkhout What I meant is that my PR (#148) has Windows CI job and your fix cherry-picked. I'm suggesting to merge this PR first to have the fix and proper attribution preserved and only then bring Windows job by squashing commits in my #148 PR. I leave the merge and review up to @ALRubinger. |
|
@ALRubinger Any updates? We would really appreciate the merge of this fix, because we cannot run our Arquillian tests on Windows at this moment. |
|
Any ETA on when this fix can be applied? |
|
Pinging @ALRubinger |
|
Any updates on this? |
petrberan
left a comment
There was a problem hiding this comment.
Sorry it took so long @juliaberkhout . I'm approving and merging this PR, I've tested this on my fork and the CI on Windows passes with this fix.
I'll release a new beta with the fix soon, we have some trouble syncing our Nexus with Maven central, so I suspect next week
Commit 4293b54 removes the code that replaces the File.seperator with a forward slash.
This replacement is necessary on Windows, so this removal makes that resources from a JAR can no longer be found while trying to add them to the archive.
Example: See https://github.com/arquillian/arquillian-core/blob/master/protocols/servlet/src/main/java/org/jboss/arquillian/protocol/servlet/v_3/ProtocolDeploymentAppender.java#L41. The resource "org/jboss/arquillian/protocol/servlet/v_3/web-fragment.xml" is added, which leads to this method https://github.com/shrinkwrap/shrinkwrap/blob/main/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/container/ContainerBase.java#L805. On Windows,
adjustedPath= org\jboss\arquillian\protocol\servlet\v_3\web-fragment.xml and the resource cannot be found, which leads to the IllegalArgumentException thrown on L824. ReplacingadjustedPathwith org/jboss/arquillian/protocol/servlet/v_3/web-fragment.xml solves this problem.