0

I have a JavaScript project in Netbeans with the following file structure:

src/main/javascript

src/main/resources (containing my index.html)

src/main/webapp

Doing the mvn build, the target folder contains my "project" folder with my index.html and the javascript files.

When I edit a JavaScript file or my index.html in the src folder, I want jetty to recognize this (I thought this is the idea of the jetty scanner). But this is not the case.

Here my jetty plugin configuration in the POM:

<plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>7.4.2.v20110526</version>
            <configuration>
                <scanTargets>
                    <scanTarget>${basedir}/src/main/resources/</scanTarget>
                    <scanTarget>${basedir}/src/main/javascript/</scanTarget>
                </scanTargets>
                <scanIntervalSeconds>10</scanIntervalSeconds>
                <stopKey>foo</stopKey>
                <stopPort>9999</stopPort>
                <classesDirectory>${project.build.directory}/project/</classesDirectory>
                <webAppConfig>
                    <contextPath>/</contextPath>
                    <resourceBases>
                        <resourceBase>${project.build.directory}/project/</resourceBase>
                        <resourceBase>${project.build.directory}/project/</resourceBase>
                    </resourceBases>
                </webAppConfig>
            </configuration>
        </plugin>

Can someone tell me why changes are not "scanned"?

intA
  • 487
  • 2
  • 10
  • 23
  • 1
    Why dont' you have your resources under **src/main/webapp/** ? That's the standard way (which works out of the box). – Augusto Sep 19 '12 at 12:02
  • Hi Augusto! Okay I did that. Now the next problem is: everytime I try to edit the index.html and save, an error is displayed saying that the file is opened elsewhere and cannot be edited... – intA Sep 19 '12 at 12:25
  • Ok, I solved this problem after reading that: https://www.assembla.com/spaces/liftweb/wiki/Fix_file_locking_problem_with_jettyrun – intA Sep 19 '12 at 12:37

0 Answers0