Issue Type: Bug Bug
Affects Versions: current
Assignee: Unassigned
Components: maven2
Created: 17/Feb/14 2:39 PM
Description:

Trying to access a static resource in the the src/main/resources folder (or any of its subfolders) of any plugin generated through Maven 3 like in the following example:

URL url = "" + xmlFile);
File xmlFile = new File(url.getPath());

The following exception is thrown:

Caused by: java.io.FileNotFoundException: C:\Guglielmo\Software\Jenkins\1.551\fi
le:\C:\Users\Administrator\.jenkins\plugins\lc-plugin\WEB-INF\lib\classes.
jar!\ServerList.xml (The filename, directory name, or volume lab
el syntax is incorrect.)
at java.io.FileInputStream.<init>(FileInputStream.java:137)
at java.io.FileInputStream.<init>(FileInputStream.java:96)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection
.java:82)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon
nection.java:173)

But the ServerList.xml file is bundled in the classes.jar of this plugin (and the other custom plugins of ours) and it is loaded in the classpath (we are able to get its InputStream from there at runtime).
The code above works fine with Jenkins releases up to 1.547. It isn't working with the latest one 1.551 too.

Project: Jenkins
Priority: Major Major
Reporter: Guglielmo Iozzia
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

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to