Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.2
-
None
-
None
-
Maven 2.0.4, maven-war-plugin trunk r453448, Sun Java 1.5, Ubuntu Linux
Description
In this example project (attached as test-project.tar.gz)
– foo-bar-webapp | |
– pom.xml | |
`-- src | |
`-- main | |
– resources | |
`-- foo.properties | |
`-- webapp | |
– WEB-INF | |
`-- web.xml | |
`-- index.jsp `-- pom.xml |
Executing 'mvn package' from the foo-bar-webapp directory succeeds, but executing 'mvn package' from the parent project directory fails with:
java.lang.IllegalStateException: basedir src/main/resources does not exist
at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:542)
at org.apache.maven.plugin.war.AbstractWarMojo.getWarFiles(AbstractWarMojo.java:821)
at org.apache.maven.plugin.war.AbstractWarMojo.copyResources(AbstractWarMojo.java:405)
at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:515)
at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:344)
at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:161)
at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:127)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
The foo-bar-webapp/pom.xml contains:
<build>
<finalName>foo-bar-webapp</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
Attachments
Attachments
Issue Links
- duplicates
-
MWAR-77 calls to DirectoryScanner.setBasedir(String) fail in embedded environment
- Closed
-
MWAR-64 resource processing does not occur correct hierarchical modules.
- Closed
- is duplicated by
-
MNG-2382 relative path of webResources in parent pom not anchored correctly when run from parent
- Closed