usabuts / run-jetty-run

Automatically exported from code.google.com/p/run-jetty-run
0 stars 0 forks source link

link folder failed when link to alternate location #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm currently experimenting with ST-JS which is a Java -> Javascript compiler. 
It's Maven plugin can work together with Eclipse so when a source file is being 
saved it gets automatically compiled to JS and placed in the 
target/{web-app-build-directory}/generated-js folder which will be available to 
the browser under {webapp-context}/generated-js once deployed as a war.

Because run-jetty-run uses the src/main/webapp folder as the source for static 
web files (and the web.xml) these generated javascript files are not accessible 
from the browser during an IDE run. I made a hack around the generator plugin 
and placed the generated file into src/main/webapp/generated-js and ignored 
this folder from SVN commit. However this i a very ugly solution. I can also 
modify the webapp folder in the run-jetty-run configuration to 
{webapp-context}/generated-js but now server side Java and resource file 
changes are not detected on the fly which is the main reason i'm using 
run-jetty-run.

I think it would be nice to map additional folders into the context path of the 
running application. Say, webapp files are served from src/main/webapp but i 
can map the generated-js folder from target/ to be available to the browser 
under {webapp-context}/generated-js.

Is there any chance that this will be supported? Or do you have some kind of 
workaround i haven't thought about yet?

Thank you for your hel.

Original issue reported on code.google.com by nistvan...@gmail.com on 16 Mar 2012 at 1:55

GoogleCodeExporter commented 9 years ago
Try to use "link resource" to do this , create a linked folder in your web app 
and target to your "generated-js" folder.

We do support eclipse link folder to work with RJR after 1.2.2 . (Reference: 
Issue 60 .)
I think that's the most straightforward and convenient way to do this. :)

Here's a simple video demo for it.
http://screencast.com/t/Of00RCkR

Let me know if there's any issue, it's still very welcome to have any 
suggestion.

Original comment by tonylovejava on 16 Mar 2012 at 2:35

GoogleCodeExporter commented 9 years ago
Wow, never heard about the "link resource" feature of Eclipse. Thank you! :)

Original comment by nistvan...@gmail.com on 18 Mar 2012 at 8:28

GoogleCodeExporter commented 9 years ago
I did the following:
- Made a folder link under src/main/webapp/ named generated-js to 
'PROJECT_LOC/target/mysampleapp/generated-js' (mysampleapp is the artifactId of 
my Maven project).
- In Eclipse i can browse the folder in the Package Explorer as expected.
- When i try to run the project with run-jetty-run i get this exception:

Exception in thread "main" java.lang.IllegalArgumentException: 
runjettyrun.VirtualResource@c4bcdc is not an existing directory.
    at org.eclipse.jetty.util.resource.ResourceCollection.<init>(ResourceCollection.java:80)
    at runjettyrun.Bootstrap.initWebappContext(Bootstrap.java:149)
    at runjettyrun.Bootstrap.main(Bootstrap.java:58)

Maybe run-jetty-run can't resolve Eclipse variables while parsing virtual 
resources?

Original comment by nistvan...@gmail.com on 18 Mar 2012 at 8:50

GoogleCodeExporter commented 9 years ago
Yes , you are right , that's confirmed as a bug.

Please use absolute path first, I will fixed it soon.
Sorry for the inconvenience.

Original comment by tonylovejava on 18 Mar 2012 at 1:31

GoogleCodeExporter commented 9 years ago

Original comment by tonylovejava on 18 Mar 2012 at 1:31

GoogleCodeExporter commented 9 years ago
Fixed since 20120318 , will be in 1.4 .

Original comment by tonylovejava on 18 Mar 2012 at 1:37

GoogleCodeExporter commented 9 years ago
No problem :) Waiting for 1.4 then.

Original comment by nistvan...@gmail.com on 18 Mar 2012 at 2:03

GoogleCodeExporter commented 9 years ago

Original comment by tonylovejava on 18 Mar 2012 at 2:40

GoogleCodeExporter commented 9 years ago
What's the roadmap to release 1.4? Looks like this project stuck. :|

Original comment by nistvan...@gmail.com on 30 Nov 2012 at 4:09

GoogleCodeExporter commented 9 years ago
Would love that fix ... is the project still in dev? 

Original comment by philippe.chretien@gmail.com on 17 Dec 2013 at 4:32