Re: tomcat maven plugin + [default] overlay

2012-07-31 Thread Albert Kam
Hi,

Yes, it is a reactor module, with childwebapp having dependency on the
parentwebapp.
Both webapps are own made (not third parties).

So, i tried these :
- Going to the maven parent module to do the install -- results on
parentwebapp.war and childwebapp.war (overlays with parentwebapp.war)

- On eclipse, on the childwebapp project, i do tomcat7:run ..
  Still the same error of
org.codehaus.plexus.archiver.ArchiverException: The source must not be
a directory

- And then i check the m2e run configuration, and i uncheck 'resolve
workspace artifacts', and rerun it ..
  This time, the error has changed into unfamiliar apache tiles error
that possibly mean the tiles' configuration file is missing or
something

Now this error doesnt appear if i use tomcat7:deploy on the
childwebapp.war, so i assume tomcat7:run has some issues when merging
parentwebapp with childwebapp, resulting in missing files ..

Questions :
- tomcat7:run's tomcat location to help debugging the error :
Is there a temporary directory for the embedded tomcat for the merged
childwebapp, so that i can check what files are probably missing after
tomcat7:run merges parentwebapp and childwebapp ?

- Pure tomcat7:run without building the WAR files ?
Is it possible to have tomcat7:run to merge the dependant webapp
modules without having to build the WAR files ?
For example, tomcat7:run on childwebapp would 'magically' merges
parentwebapp and childwebapp in terms of jars, classes, jsps, and
other static files like xmls, properties, web files, etc (like
overlay, but without making the WAR beforehand) ?

Thank you !

On Tue, Jul 31, 2012 at 12:57 AM, Olivier Lamy ol...@apache.org wrote:
 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
 groupIdgroup.id/groupId
 artifactIdparentwebapp/artifactId
 version${project.version}/version
 typewar/type
 scoperuntime/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 
 

Re: tomcat maven plugin + [default] overlay

2012-07-30 Thread Olivier Lamy
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
 groupIdgroup.id/groupId
 artifactIdparentwebapp/artifactId
 version${project.version}/version
 typewar/type
 scoperuntime/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



tomcat maven plugin + [default] overlay

2012-07-26 Thread Albert Kam
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
groupIdgroup.id/groupId
artifactIdparentwebapp/artifactId
version${project.version}/version
typewar/type
scoperuntime/scope
/dependency

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