You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by sr...@accenture.com on 2008/03/25 05:23:22 UTC

i am facing the following problem tomcat 6.0 + maven

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\Documents and Settings\s.thotakomuraiah>c:

C:\>cd maven2example

C:\maven2example>cd maven2example_webapp

C:\maven2example\maven2example_webapp>mvn package
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building maven2example_webapp Maven Webapp
[INFO]    task-segment: [package]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[maven2example_webapp] in
[C:\maven2example\maven2exampl
e_webapp\target\maven2example_webapp-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Webapp assembled in[100 msecs]
[INFO] Building war:
C:\maven2example\maven2example_webapp\target\maven2example_
webapp-1.0-SNAPSHOT.war
[INFO] [cargo:start {execution: tomcat-execution}]
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Cannot create configuration. There's no registered configuration
for the
parameters (container [id = [tomcat6x], type = [installed]],
configuration type
[standalone]). Actually there are no valid types registered for this
configurati
on. Maybe you've made a mistake spelling it?
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.codehaus.cargo.container.ContainerException: Cannot create
configuration. Th
ere's no registered configuration for the parameters (container [id =
[tomcat6x]
, type = [installed]], configuration type [standalone]). Actually there
are no v
alid types registered for this configuration. Maybe you've made a
mistake spelli
ng it?
        at
org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImple
mentation(AbstractGenericHintFactory.java:143)
        at
org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactor
y.createImplementation(AbstractIntrospectionGenericHintFactory.java:86)
        at
org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory.
createConfiguration(DefaultConfigurationFactory.java:205)
        at
org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory.
createConfiguration(DefaultConfigurationFactory.java:192)
        at
org.codehaus.cargo.maven2.configuration.Configuration.createConfigura
tion(Configuration.java:127)
        at
org.codehaus.cargo.maven2.AbstractCargoMojo.createConfiguration(Abstr
actCargoMojo.java:292)
        at
org.codehaus.cargo.maven2.AbstractCargoMojo.createNewContainer(Abstra
ctCargoMojo.java:380)
        at
org.codehaus.cargo.maven2.AbstractCargoMojo.createContainer(AbstractC
argoMojo.java:320)
        at
org.codehaus.cargo.maven2.ContainerStartMojo.doExecute(ContainerStart
Mojo.java:52)
        at
org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo
.java:243)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:447)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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)
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Tue Mar 25 09:52:24 GMT+05:30 2008
[INFO] Final Memory: 12M/22M
[INFO]
------------------------------------------------------------------------

C:\maven2example\maven2example_webapp>

Thanks & Regards,

 

Sridhar Thota,


Accenture - India | O: +91 22 40444170 | Ext: 4170 | C: +91 9930245689 |
Aim/gTalk: mails4sri | Mial/YIm/Msn: sridhar.thota 


-----Original Message-----
From: chris.r.grigg@transport.qld.gov.au
[mailto:chris.r.grigg@transport.qld.gov.au] 
Sent: Tuesday, March 25, 2008 9:46 AM
To: dev@maven.apache.org
Subject: Building Applet JARS inside WAR files using Maven 2.0

Hi,

I have been scratching my head on this one for awhile.

We have an applet which the class files are packaged up into a JAR file.

This JAR file is then packaged up inside a WAR file which then gets 
packaged in an EAR file so that it can be deployed onto Websphere 
Application Server 6.1 (our web app server).
Now in order for the JAR file to be seen on the clients end (not on the 
web server we are deploying the war file to), the JAR file must not live

inside the "WEB-INF\lib" directory. The JAR file must sit inside the
root 
directory of the WAR. This allows the user to access the JAR file and 
download it to their PC
instead of the JAR file being processed server sidedly so that they can 
access the JAR that has the applet and run the applet client sidedly.

It appears that something did exist for maven 1.0 in the WAR building 
goal, but it was removed in maven 2.0. So now in order to manually put 
this file, i have to do some ugly ant script in the artifact which
builds 
the WAR file, like this:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
              <executions>
                <execution>
                        <id>move-jars</id>
                        <phase>package</phase>
                        <configuration>
                                <tasks>
                                        <echo message="***Unzipping 
war***" />
                                        <unzip 
src="${project.build.directory}/${artifactId}-${version}.war"
 dest="${basedir}/tmp">
 
                                                <patternset>
                                                        <include
name="**" 
/>
                                                </patternset>
                                        </unzip>
                                        <echo message="***war
unzipped***" 
/>
                                                <move 
todir="${basedir}/tmp">
                                                        <fileset 
dir="${basedir}/tmp/WEB-INF/lib">
                                                                <include

name="**/*.jar" />
                                                        </fileset>
                                                </move>
                                                <echo
message="***Deleting 
old war***" />
                                                <delete 
file="${project.build.directory}/${artifactId}-${version}.war" />
                                                <delete 
includeEmptyDirs="true">
                                                        <fileset 
dir="${project.build.directory}/${artifactId}-${version}" />
                                                </delete>
                                                <echo
message="***Creating 
new war***" />
                                                <zip 
destfile="${project.build.directory}/${artifactId}-${version}.war"
 basedir="${basedir}/tmp" update="true" />
                                                        <echo 
message="***Unzipping new war***" />
 
                                                <unzip 
src="${project.build.directory}/${artifactId}-${version}.war"
 dest="${project.build.directory}/${artifactId}-${version}">
                                                        <patternset>
                                                                <include

name="**" />
                                                        </patternset>
                                                </unzip>
                                                <echo
message="***Deleting 
tmp dir***" />
                                                        <delete 
includeEmptyDirs="true">
                                                                <fileset

dir="${basedir}/tmp" />
                                                        </delete>
                                </tasks>
                        </configuration>
                        <goals>
                                <goal>run</goal>
                        </goals>
                </execution>
             </executions>
           </plugin>


Does anyone know a more better solution to achieving this?

***********************************************************************
WARNING: This e-mail (including any attachments) may contain legally
privileged, confidential or private information and may be protected by
copyright. You may only use it if you are the person(s) it was intended
to be sent to and if you use it in an authorised way.  No one is 
allowed to use, review, alter, transmit, disclose, distribute, print 
or copy this e-mail without appropriate authority.

If this e-mail was not intended for you and was sent to you by mistake,
please telephone or e-mail me immediately, destroy any hardcopies of
this e-mail and delete it and any copies of it from your computer
system. Any right which the sender may have under copyright law, and 
any legal privilege and confidentiality attached to this e-mail is not 
waived or destroyed by that mistake.

It is your responsibility to ensure that this e-mail does not contain
and is not affected by computer viruses, defects or interference by
third parties or replication problems (including incompatibility with
your computer system).

Opinions contained in this e-mail do not necessarily reflect the
opinions of the Queensland Department of Main Roads, Queensland
Transport or Maritime Safety Queensland, or endorsed organisations
utilising the same infrastructure.
***********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org




This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org