Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Maven-Jetty Plugin - Bug in resourceBases and baseResource in 9.4.0.RC3 and 9.3.3.vx(Not loading multiple static resources, while the config works in 9.2.0.RC0)
Maven-Jetty Plugin - Bug in resourceBases and baseResource in 9.4.0.RC3 and 9.3.3.vx [message #1756350] Wed, 15 March 2017 17:15
Arjun Dhar is currently offline Arjun DharFriend
Messages: 2
Registered: April 2012
Junior Member
In the following configuration, where ${stumps.home} is a defined maven property in the pom.xml:
			<plugin>			
				<groupId>org.eclipse.jetty</groupId> 
				<artifactId>jetty-maven-plugin</artifactId>
				<version>9.2.0.RC0</version> 
				<configuration>
					<webApp>
						<contextPath combine.children="override">/</contextPath> 						<baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection">   
						    <resourcesAsCSV combine.children="override">target/jettyFilteredResources,src/main/webapp,${stumps.home}/site/src/webapp,${stumps.home}/user/src/webapp,${stumps.home}/modules/src/webapp</resourcesAsCSV>
						</baseResource>
					</webApp>
					<jettyXml combine.children="override">${stumps.home}/poms/basic-web-project/jetty.xml</jettyXml>
					<webAppSourceDirectory combine.children="override">${project.basedir}/src/main/webapp</webAppSourceDirectory>					
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<configuration>
					<downloadSources>true</downloadSources>
				</configuration>
			</plugin>


This validates any path however fails to load it in the running jetty server in tested versions 9.3.3.v20150827, 9.4.0.RC3.

The fact that it runs fine in 9.2.0.RC0 , is sufficient grounds to believe this is a bug in the more recent versions mentioned above.

Additionally I have tried the following variant also. the documentation http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html section "Configuring your Webapp" mentions resourceBases to be the alternative for multiple resources however baseResource also does a good job. Maybe additionally the docs can explai nthe difference ?!:
						<resourceBases>
							<resourceBase>target/jettyFilteredResources</resourceBase>
							<resourceBase>src/main/webapp</resourceBase>
							<resourceBase>${stumps.home}/site/src/webapp</resourceBase>
							<resourceBase>${stumps.home}/user/src/webapp</resourceBase>
							<resourceBase>${stumps.home}/modules/src/webapp</resourceBase>
							<resourceBase>${stumps.home}/modules-etl/src/webapp</resourceBase>
							<resourceBase>${stumps.home}/modules-configs/src/webapp</resourceBase>
						</resourceBases>

[Updated on: Wed, 15 March 2017 17:18]

Report message to a moderator

Previous Topic:Can't log in to Gerrit
Next Topic:Ecilpse Neon will not Install Windows 10
Goto Forum:
  


Current Time: Sat Jul 11 05:58:35 GMT 2020

Powered by FUDForum. Page generated in 0.02399 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top