Bug 788589 - Creating of travel.war fails when using ews maven profile
Summary: Creating of travel.war fails when using ews maven profile
Keywords:
Status: CLOSED DUPLICATE of bug 797235
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: Spring
Version: 2.0.0.DR07
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 2.0.0.ER5
Assignee: Marius Bogoevici
QA Contact:
URL:
Whiteboard: travel
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-08 14:28 UTC by Tomas Repel
Modified: 2013-03-04 01:00 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
EWS
Last Closed: 2012-06-22 11:04:31 UTC
Type: ---


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 797235 0 low CLOSED Travel example is not compatible with Tomcat 5 2022-10-06 14:43:09 UTC

Internal Links: 797235

Description Tomas Repel 2012-02-08 14:28:04 UTC
Description of problem:

Packaging of travel example under 'ews' profile via maven fails. The problem is in maven-war-plugin configuration. There is a webresource (src/main/environments/${target.environment}/webapp directory), that is supposed to be copied into travel.war, but this is only required for EAP6, for Tomcat there is no such directory at all.

Quick fix for this can be to copy the maven-war-plugin configuration to the profiles section of pom.xml (so it will be in eap6 and ews profile. In ews profile remove the webResources element from maven-war-plugin configuration.

Version-Release number of selected component (if applicable):

Both ews1-t5 and ews1-t6

How reproducible:

Always.

Steps to Reproduce:
1. run: export FRAMEWORK=spring-3
2. run: export CONTAINER=ews1-t6
3. navigate to home directory of travel example
3. run: mvn clean package -P ews
  
Actual results:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project travel: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed: basedir /home/trepel/sources/wfk-qa/spring/demo/target/travel/src/main/environments/ews/webapp does not exist -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project travel: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed: basedir /home/trepel/sources/wfk-qa/spring/demo/target/travel/src/main/environments/ews/webapp does not exist
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed: basedir /home/trepel/sources/wfk-qa/spring/demo/target/travel/src/main/environments/ews/webapp does not exist
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Caused by: java.lang.IllegalStateException: basedir /home/trepel/sources/wfk-qa/spring/demo/target/travel/src/main/environments/ews/webapp does not exist
	at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:290)
	at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.getFilesToCopy(WarProjectPackagingTask.java:373)
	at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.copyResources(WarProjectPackagingTask.java:317)
	at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.handleWebResources(WarProjectPackagingTask.java:135)
	at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.performPackaging(WarProjectPackagingTask.java:91)
	at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:472)
	at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:404)
	at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:197)
	at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:159)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	... 20 more

Expected results:

It passes.

Comment 1 Rebecca Newton 2012-03-08 01:03:52 UTC
Technical note required?

Comment 2 Marius Bogoevici 2012-04-25 20:44:42 UTC
Should be fixed w/commit e4698785a52aaf1a3ff8c58cf261e219de13189f (replaced ews profile with two separate profiles accounting for differences between Tomcat 5 and 6)

Comment 3 Tomas Repel 2012-05-14 12:01:27 UTC
Verified in WFK2 ER5.

Comment 4 Karel Piwko 2012-06-22 11:04:31 UTC
Closing as DUPLICATE ISSUE. This was fixed by providing container specific profiles in bug 797235.

*** This bug has been marked as a duplicate of bug 797235 ***


Note You need to log in before you can comment on or make changes to this bug.