-
Notifications
You must be signed in to change notification settings - Fork 75
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
(clojure.java.classpath/classpath) produces wrong results with plugin 1.3.20 #81
Comments
On 1 May 2014, at 15:36, Kevin Livingston wrote:
Interesting - which goal is that from? I know during those releases we I'll take a look sometime tomorrow ( it's 11:48pm now )... |
I believe the manifest is empty. The problem in 1.3.20 was with both Thanks for looking into it. |
On 5 May 2014, at 8:18, Kevin Livingston wrote:
A quick test:
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder [INFO]
clojure-maven-example --- This is using:
true Am I doing anything different than you here? |
So I deleted my previous post. I've been systematically cutting and cutting things. The one thing that can reliably modulate the problem is the following. I have a project A parent pom, it has a dependency management section with this:
it has a child B that compiles and uses some classpath code. Then I have project C that depends on B and classpath If I gut the source code from B that refers to the classpath but leave the dependency then everything functions fine in C regardless of what version I have in A. This is odd because I can't figure out how this is modulating C's view of the common library. If anything it should break B by going to the wrong version, right? If I call In this particular case I happen to have control of A and B so I think I can upgrade them and not mess anyone up. But this is certainly weird. This seems to happen regardless of clojure-maven-plugin -- the project I was depending on when I was modulating that was also modulating the classpath dependency. Sorry about that. Do you think there is somewhere else I should report this? I guess I can put it on the clojure mailing list. |
On 7 May 2014, at 6:43, Kevin Livingston wrote:
You could try the maven users list - I still got your original post and c-m-p supports the maven toolchains plugin to control the JVM being used
I did just notice when using 0.1.0 of java.classpath I see your same About to drive into work so will think about your dependency issue and Have you also tried under maven 3.2.1? |
I test on my machine, but it gets run "for real" on a Hudson-controlled box, and that's using maven 3.1.1 - it had the same difficulties. I'm glad you are seeing it with 0.1.0 (and confirming I'm not totally crazy) - did you have to have code linked to it, or did just listing dependency cause trouble? I guess we can cook up a minimal example and pass it around. Don't know anything about what a "tycho" warning would be? I think that's because one of my colleagues added some eclipse .m2 stuff to the C project. But when I was cooking it down I gutted that too and the behavior remained. thanks for the feedback. |
I know this has sat dormant for a little while but I've realized what I thought was a work-around wasn't. With clojure-maven-plugin 1.3.23 and java.classpath 0.2.2 I do get more than a single classpath element but I also see the following:
I'm getting some default classes but not most of my code. I'm only seeing sun stuff. no clojure. none of my dependencies. no resource files. And if I try to force the classloader to open something I know should be there it can't find it either. I noticed that that first thing ends in "jar" not ".jar" this prevents |
Comparing my projects to the documentation I notice that my projects are package type My configuration also looks like the following, is that acceptable?
|
On 27 Jun 2014, at 11:59, Kevin Livingston wrote:
Nope - all the custom package does is allow you to skip the I'm still not sure whats going on here, I suspect I'll need to dig into Mark |
Re-reading this. This is standard maven dependency behaviour. Just having a version of "0.1.0" and means "I would like 0.1.0, but if So when you depend on "0.2.2" in the child, you only get the 0.2.2 If you want to keep both versions around, then you'll have to look at On 7 May 2014, at 6:43, Kevin Livingston wrote:
|
I've moved everything up to 0.2.2 for that, so I don't think that's the issue. And I certainly don't need both. (For reference if If I revert everything to clojure-maven-plugin 1.3.9 with classpath 0.2.2, I get the expected/desired behavior.) classpath reads off |
One more data point (sorry for the barrage of comments) the plugin 1.3.9 classpath 0.1.0 mix seems to work everywhere. The plugin 1.3.9 classpath 0.2.2 mix works on two different macs, but that combination has failed on two different linux boxes (oracle jre 1.7 and maven 3.2) -- it's java, I know so how can this be? but it's what I'm seeing. (I'll go make a cross post to classpath, here: http://dev.clojure.org/jira/browse/CLASSPATH-6 ) |
I can confirm this behavior with all versions of java.classpath on all versions of clojure-maven-plugin 1.3.13 and later. Starting with version 1.3.13 of clojure-maven-plugin, instead of specifying the Java classpath on the command line with See clojure-maven-plugin pull request #58 containing commit 8d8e90e4.
|
Maybe we should make the creation of the jar a configuration setting, that when running on windows defaults to true ( where this was intended to solve an issue ) and off for anything else - with an override setting? |
While that might fix my immediate issues (I'm primarily on mac and linux), this would create weird behavior when porting across platforms, which is kind of against the maven/jvm promise isn't it? Although, I don't know enough yet to speak definitively on what's "right". The discussion on the clojure.java.classpath parallel issue implies that this is potentially an anti-pattern or distortion of what's "right". |
I have code that needs to look over the class path. It gets it using:
Using clojure-maven-plugin 1.3.9 all is well that call gets me quite a large seq of files. With clojure-maven-plugin 1.3.20 I see something like the following and only the following:
If you force that thing to be a
JarFile
and then look at what's in it there is one manifest file and that's it.Kevin
The text was updated successfully, but these errors were encountered: