2012/7/26 Albert Kam <moonblade.w...@gmail.com>:
> Hello,
>
> I am having a situation where i couldnt tomcat7:run with overlay in eclipse.
> In the eclipse indigo, i am using the maven plugin, and have imported
> two maven modules,
> the childwebapp which depends on the parentwebapp, which is just like
> a skeleton, with it's own classes, jsps, static resources, but also a
> runnable webapp of itself.
> Doing tomcat7:run on the parentwebapp works well as expected ..
>
> Here's the dependency in the childwebapp's pom, and i dont have any
> specific overlay configuration :
> <dependency>
>         <groupId>group.id</groupId>
>         <artifactId>parentwebapp</artifactId>
>         <version>${project.version}</version>
>         <type>war</type>
>         <scope>runtime</scope>
> </dependency>
This dependency is a reactor modules ? So in this case I presume
eclipse (m2e) see the build output directory rather than a war file.
The plugin doesn't have any idea how your war dependency is available
in an exploded mode (where are the webapp resources and/or classes
etc..)
try to install it first.
>
> When i try running tomcat7:run on the childwebapp, i get this error message,
> as if it tries to find the war of parentwebapp and try to extract it.
> But in my situation, i dont have the war in my development,
> since the eclipse maven plugin already resolves the workspace dependencies.
> I would imagine using the classes from the workspace instead of
> extracting the non-existent war file and load them into the
> childwebapp would solve the issue  ..
>
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources)
> @ childwebapp ---
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
> childwebapp ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] <<< tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) @ childwebapp 
> <<<
> [INFO]
> [INFO] --- tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) @ childwebapp 
> ---
> [INFO] Running war on http://localhost:8080/childwebapp
> [INFO] Creating Tomcat server configuration at
> C:\Users\albert\git\Startup\MavenParent\childwebapp\target\tomcat
> [INFO] create webapp with contextPath: /childwebapp
> [ERROR] fail to extract war file
> C:\Users\albert\git\Startup\MavenParent\parentwebapp\target\classes,
> reason:The source must not be a di
> rectory.
> org.codehaus.plexus.archiver.ArchiverException: The source must not be
> a directory.
>         at 
> org.codehaus.plexus.archiver.AbstractUnArchiver.validate(AbstractUnArchiver.java:185)
>         at 
> org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:118)
>         at 
> org.apache.tomcat.maven.common.run.DefaultClassLoaderEntriesCalculator.calculateClassPathEntries(DefaultClassLoaderEntriesCalc
> ulator.java:149)
>         at 
> org.apache.tomcat.maven.plugin.tomcat7.run.RunMojo.createWebappLoader(RunMojo.java:254)
>         at 
> org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.createContext(AbstractRunMojo.java:563)
>         at 
> org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:927)
>         at 
> org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:476)
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>
> What can i do to resolve this situation ?
>
> Thank you,
> Albert
>
> --
> Do not pursue the past. Do not lose yourself in the future.
> The past no longer is. The future has not yet come.
> Looking deeply at life as it is in the very here and now,
> the practitioner dwells in stability and freedom.
> (Thich Nhat Hanh)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to