Clarify addResources parameter description
This commit clarifies the role of the 'addResources' flag and makes it explicit that any duplicate found in the target directory are actually removed Fixes gh-1479
This commit is contained in:
parent
f48628fa90
commit
9a8d05bd43
|
@ -64,11 +64,9 @@ public class RunMojo extends AbstractDependencyFilterMojo {
|
||||||
private MavenProject project;
|
private MavenProject project;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add maven resources to the classpath directly, this allows live in-place editing or
|
* Add maven resources to the classpath directly, this allows live in-place editing of
|
||||||
* resources. Since resources will be added directly, and via the target/classes
|
* resources. Duplicate resources are removed from {@code target/classes} to prevent
|
||||||
* folder they will appear twice if {@code ClassLoader.getResources()} is called. In
|
* them to appear twice if {@code ClassLoader.getResources()} is called.
|
||||||
* practice, however, most applications call {@code ClassLoader.getResource()} which
|
|
||||||
* will always return the first resource.
|
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
@Parameter(property = "run.addResources", defaultValue = "true")
|
@Parameter(property = "run.addResources", defaultValue = "true")
|
||||||
|
|
|
@ -104,11 +104,11 @@ mvn spring-boot:run
|
||||||
{{{./examples/run-debug.html}Debug the application}} for more details.
|
{{{./examples/run-debug.html}Debug the application}} for more details.
|
||||||
|
|
||||||
By default, any <<src/main/resources>> folder will be added to the application classpath
|
By default, any <<src/main/resources>> folder will be added to the application classpath
|
||||||
when you run the application. This allows hot refreshing of resources which can be very
|
when you run the application and any duplicate found in <<target/classes>> will be
|
||||||
useful when developing web applications. For example, you can work on HTML, CSS or JavaScipt
|
removed. This allows hot refreshing of resources which can be very useful when developing
|
||||||
files and see your changes immediately without recompiling your application. It is also a
|
web applications. For example, you can work on HTML, CSS or JavaScipt files and see your
|
||||||
helpful way of allowing your front end developers to work without needing to download and
|
changes immediately without recompiling your application. It is also a helpful way of
|
||||||
install a Java IDE.
|
allowing your front end developers to work without needing to download and install a Java IDE.
|
||||||
|
|
||||||
Of course, if your resources are using tokens that are filtered by Maven, you may want
|
Of course, if your resources are using tokens that are filtered by Maven, you may want
|
||||||
to disable that feature as follows:
|
to disable that feature as follows:
|
||||||
|
|
Loading…
Reference in New Issue