yduchesne / sapia

Automatically exported from code.google.com/p/sapia
0 stars 0 forks source link

LibDirs section in magnet file should allow directories or folders w/o jar files or classes #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a directory that does not contain a .jar e.g. a foo.properties files
2. add directory (say bar) that contains foo.properties to <LibDirs>
3. launch your application that expects foo.properties in the classpath

What is the expected output? What do you see instead?
Expect the classpath to contain that directory. Expect "process.out" passes 
that directory to java using -cp. Instead application cannot find 
foo.properties. And that directory bar is missing in the -cp options (replaced 
by empty string ... I see "<path-to-jar>::<path-to-jar>" in there) ... expected 
bar to be in between those two ':'

What version of the product are you using? On what operating system?
corus v4.2.7 on Linux CentOS release 6.3 (Final)

Please provide any additional information below.

Original issue reported on code.google.com by sundeep....@gmail.com on 3 Nov 2014 at 9:27

GoogleCodeExporter commented 9 years ago
Is it possible to get a sample magnet XML snippet to investigate further?

Also, it is somewhat a misdocumented feature with java class loaders that 
specifying a path that ends with '/' does not have the same meaning as the same 
path without ending with the path character.

If you look at the example in the magnet documentation 
(http://www.sapia-oss.org/projects/magnet/manual/java/classpath.html#Examples) 
you'll see that the 2nd example show how to define a path entry that would 
allow you to load resource files (and not jars). Watch for the line "<path 
directory="${user.dir}/config/">" and read the explanation underneath.

Is this helping you at all???

Original comment by jcdesroc...@gmail.com on 12 Nov 2014 at 8:08

GoogleCodeExporter commented 9 years ago
I have attached a snippet magnet file: corus.xml 

See if that works.

I did come across the classpath section in your doc. I did not try the 
classpath method myself, but, my colleague did and he said he did not have much 
success (same result) i.e. path without jar was not in the classpath seen by 
the application. [He confirmed w/ log in process.out]

Original comment by sundeep....@gmail.com on 8 Dec 2014 at 10:35

Attachments: