History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-5357
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Nikolay Chashnikov
Reporter: Erik Rasmussen
Votes: 4
Watchers: 4
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Allow web resource directories outside module path

Created: 16 Jan 07 15:41   Updated: 05 Feb 08 16:22
Component/s: Project Configuration
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. Picture 1.jpg
(21 kb)

Build: 6,148
Severity: Medium


 Description  « Hide
At the moment, when defining web resource directories for web modules, you are only allowed to select directories that are under the web module's main directory. You get the attached dialog.

I don't understand this restriction. For instance, I want to have a web resource directory that is in another module. I want my "webapp" module to be able to reference images and js files in my "common" module. In order to do this, I have to put a symlink to "common" inside my "webapp" directory. But this causes each file in the "common" module to show up twice in the "go to file" (ctrl-shift-N) list. This is very annoying. Plus, sometimes IDEA's subversion plugin gets confused by the symlinks.

Would it be so bad to remove this restriction?



 All   Comments   Work Log   Change History      Sort Order:
Quincy L. Acklen - 10 Oct 07 20:56
I'm in the same boat. We serve up static content (e.g. images, css, js, pdf's, flash movies) from our web server for the obvious performance reasons. But the links all show up as broken "Cannot resolve symbol".

Quincy L. Acklen - 31 Oct 07 16:15
To add an external web resource:

Add a new Content Root. ( In version 7 this can be found under Project Settings / Modules / Sources)
Either include or exclude the directories of that content root (for me they're just files I can't edit off another webserver, so I exclude it so I don't see it in my project tree - but their paths resolve correclty and I can navigate to the files with CTRL+D )
Add the directory from the new content root as a Web Resource.

That does exactly what I wanted (though not as intuitively as just adding a Web Resource Directory and having IDEA figure do all that for me). I'm not sure of the ramifications of using IDEA to do your builds for you with this solution, but my ant tasks were already working and I was just trying to get IDEA to understand what I was doing, so this works for me (YMMV).

Hope this helps. And thanks to Serge Baranov who showed me the way.


Quincy L. Acklen - 31 Oct 07 16:27
It's worth also noting that you may need to say OK to your new Content Root before you can go back and add it as a new Web Resource Directory (I discovered this while making the change to a co-workers version 6 setup)