Maven 2.x WAR Plugin

war:inplace ignores web.xml if defined in an alwaysactive profile

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

Problem:

the war:inplace generates the dir structure without the web.xml

Context:

simple web application defined,
src/main/webapp/WEB-INF exists and contains configuration files, but not web.xml

web.xml is defined in 3 profiles, one is like this

<profiles>
		<profile>
			<id>localdev</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<dependencies>
...
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-war-plugin</artifactId>
						<groupId>org.apache.maven.plugins</groupId>
						<configuration>
							<webXml>src/localdev/WEB-INF/web.xml</webXml>
						</configuration>
					</plugin>
				</plugins>
			</build>
			<properties>
				<classifier>localdev</classifier>
			</properties>
		</profile>

when running mvn war:inplace no web.xml is put in WEB-INF

Activity

Hide
Dennis Lundberg added a comment -

I tried this and I think the problem was with Maven and profile activation rather than with this plugin. Attaching test project that works as expected with version 2.0 of the WAR Plugin.

Show
Dennis Lundberg added a comment - I tried this and I think the problem was with Maven and profile activation rather than with this plugin. Attaching test project that works as expected with version 2.0 of the WAR Plugin.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: