-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading a JAR on the classpath from a network drive #372
Comments
Let me look at the code and see if there's a way to keep it from mangling the path to the JAR. @mrmeyers99 any particular reason you're hosting a local repository from a network drive? |
I've confirmed the problem. It's easily reproduced by setting your local repository to a shared windows drive and performing a build with tests. |
@mrmeyers99 using a network drive for the local repository is resulting in the slowest builds I've ever seen. I'm working on a fix, but it may take a little while. |
I got it working, however there's a few things to consider before I submit a pull request: In all seriousness, I can't think of a good reason to ever load JARs from a network drive. The problem here is directly related to using a Maven local repository on a network drive, which in and of itself is a really bad practice smelling a bit like Item 2 this blog post: http://www.cubeia.com/index.php/blog/archives/41. In short, the problem is not a shortcoming of Cucumber JVM, itself. @mrmeyers99 because I don't know your reasons for placing your local Maven repository on a network drive, I would consider just mapping your network drive to a proper drive letter and seeing what happens. |
Sorry, I never got any e-mail so I thought no one had ever looked at this. The reason I'm using the local maven repo is that's how the TeamCity farm is setup at work. They were trying to centralize all the tools, so they put the maven installations on a central server and put the local repo settings as a global setting on the maven installation. I think you have a valid point that it's probably not the ideal way to do it though. |
Are you sure it's not a Cucumber specific issue though? No one else has reported an issue with having the local repo on the shared server, just people using Cucumber JVM. |
Map your network drive to a proper drive letter. |
Yeah, ok, I'll just do that. Thanks! On Thu, Oct 11, 2012 at 6:37 PM, Logan McGrath notifications@github.comwrote:
|
Can we close this issue? |
Sure, I have a workaround.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
We have a scenario where our local Maven repo is on a network drive. It seems to work fine for all the builds except the ones that use Cucmber JVM. It fails at runtime when we try to execute the tests. If I point the maven repo to my local machine everything works fine. I've tried it on both 1.08 and 1.09.
Here's what I have in my settings.xml:
Here is the stack trace:
When I debugged it, I found on line 31 of ClasspathIterable.java, it gets a URL to the jar file. The value of that url is:
Then it calls a method called filePath(url) which has the following on line 48.
After that line, the path variable equals C:\SHARED_TOOLS\maven\repository\info\cukes\cucumber-java\1.0.8\cucumber-java-1.0.8.jar!\cucumber\runtime.
It seems that line 48 is not network-path friendly.
The text was updated successfully, but these errors were encountered: