Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.0.0
-
Fix Version/s: None
-
Component/s: Maven
-
Labels:None
-
Number of attachments :
Description
It'd be great if wildcard support could be added to the <scanTarget> configuration element. That way, configuration could be changed from:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.0.0</version>
<configuration>
<contextPath>/</contextPath>
<scanIntervalSeconds>3</scanIntervalSeconds>
<scanTargets>
<scanTarget>src/main/webapp/WEB-INF/applicationContext.xml</scanTarget>
<scanTarget>src/main/webapp/WEB-INF/menu-config.xml</scanTarget>
<scanTarget>src/main/webapp/WEB-INF/urlrewrite.xml</scanTarget>
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
</scanTargets>
</configuration>
</plugin>
To:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.0.0</version>
<configuration>
<contextPath>/</contextPath>
<scanIntervalSeconds>3</scanIntervalSeconds>
<scanTargets>
<scanTarget>src/main/webapp/WEB-INF/*.xml</scanTarget>
</scanTargets>
</configuration>
</plugin>
In svn head rev 1888.
The solution is a little bit more verbose than your example, however it is in keeping with the style of other file lists in the pom, plus it gives the power of doing exclusions as well.
An example would look like:
<scanTargetPatterns>
<scanTargetPattern>
<directory>src/main/java</directory>
<includes>
<include>*/.properties</include>
<include>*/.xml</include>
</includes>
<excludes>
<exclude>**/particular.properties</exclude>
</excludes>
</scanTargetPattern>
</scanTargetPatterns>
This mechanism works alongside the existing <scanTargets> parameter.