You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by di...@multitask.com.au on 2003/09/01 06:02:46 UTC

Re: war-plugin bug?

I believe this is filed as an open bug on Maven. 

Anyone is able to submit a patch fixing it.
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/


"Dan Tran" <da...@hotmail.com> wrote on 31/08/2003 01:45:28 AM:

> that is an anoying bug to me, i think it is reported already.
> (not sure thou)
> 
> So the first suggested solution solve this dilema.
> 
> 
> -Dan
> 
> ----- Original Message ----- 
> From: "khote" <kh...@mminternet.com>
> To: "Maven Users List" <us...@maven.apache.org>
> Sent: Saturday, August 30, 2003 8:22 AM
> Subject: Re: war-plugin bug?
> 
> 
> > Those are good suggestions, some things I hadn't thought of.  I am 
using a
> > war:webapp postGoal to copy in some docs into my webapp before the WAR 
is
> > created.
> >
> > What I discovered was that the first use of
> >
> > <groupId>taglibs</groupId>
> > <artifactId>taglib-session</artifactId>
> > <version>1.0.1</version> etc.
> >
> > when I wanted the jar in /WEB-INF/lib,
> >
> > was overwritten in the Map (or Hash or whatever) that was built for
> lib.path
> > by the second use of that same name, when I specified that
> > <type>tld</type>
> >
> > So unless I used two different names, I would always lose the first 
one
> when
> > the maven-war-plugin executed.
> >
> > I found another way also:  I took all the taglib jars I want to use 
and
> > unjarred them into a common temp directory, then went into that 
directory
> > and
> >
> > jar cf taglibs-1.0.1 org
> >
> > then moved that into my taglibs repository.  Only had to have that one
> > dependency then .... overkill I know, but it works.
> >
> > I'm trying to move an existing Tomcat/Struts application that works 
well
> > enough into a JBoss-Tomcat/Struts, still trying to lose that 
Tomcat-think
> > about how things are done.  Some of those taglibs can help me 
watch/see
> > what's going on in the JSP environment, they're really just for 
debugging
> > right now.
> >
> > Thanks,
> > K
> >
> >
> > ----- Original Message ----- 
> > From: "Dan Tran" <da...@hotmail.com>
> > To: "Maven Users List" <us...@maven.apache.org>; "khote"
> > <kh...@mminternet.com>
> > Sent: Saturday, August 30, 2003 8:11 AM
> > Subject: Re: war-plugin bug?
> >
> >
> > > Since tld file can live any where under WEB-INF
> > > directory, it is ambiguous for maven to blindfully
> > > copy the tld file to WEB-INF/
> > >
> > > there are 2 solutions:
> > >   1. if you are usig servet 2.3 configure your taglib to look for 
tld in
> > the
> > > jar file
> > >      so you dont have to copy it to web-inf.
> > >
> > >    2. You need to tell maven what do by putting a postgoal in 
maven.xml
> > >
> > > here is an example
> > >
> > > <?xml version="1.0"?>
> > > <project
> > >   default="nightly-build"
> > >   xmlns:m="maven"
> > >   xmlns:j="jelly:core"
> > >   xmlns:u="jelly:util">
> > >
> > >   <postGoal name="war:webapp">
> > >     <!-- copy validator-rules.xml to WEB-INF, war plugin does 
> not do
that
> > automa
> > tically -->
> > >     <copy 
file="${maven.repo.local}/struts/xmls/validator-rules-1.1.xml"
> > > tofile=
> > > "${maven.build.dir}/${pom.artifactId}/WEB-INF/validator-rules.xml" 
/>
> > >   </postGoal>
> > >
> > > </project>
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "khote" <kh...@mminternet.com>
> > > To: "Maven Users List" <us...@maven.apache.org>
> > > Sent: Saturday, August 30, 2003 4:10 AM
> > > Subject: war-plugin bug?
> > >
> > >
> > > > Wanting to try out some jakarta-taglibs.  It's not on ibiblio, so 
I
> > > > downloaded them and moved them into a taglibs (both jars and tlds)
> > > directory
> > > > in my local repository.
> > > >
> > > >     <dependency>
> > > >       <groupId>taglibs</groupId>
> > > >       <artifactId>session</artifactId>
> > > >       <version>1.0.1</version>
> > > >       <properties><war.bundle>true</war.bundle></properties>
> > > >     </dependency>
> > > >
> > > >     <dependency>
> > > >       <groupId>taglibs</groupId>
> > > >       <artifactId>session</artifactId>
> > > >       <version>1.0.1</version>
> > > >       <type>tld</type>
> > > >       <properties><war.bundle>true</war.bundle></properties>
> > > >     </dependency>
> > > >
> > > > maven successfully finds, them.  However, when I try to use the
> > > war-plugin,
> > > > only the jar is copied into the WEB-INF/lib, the tld is not copied
> into
> > > > WEB-INF/tld.
> > > >
> > > > I am already successfully using the jstl standard and struts 
plugins
> > this
> > > > way, both jars and tlds, they are behaving as expected.  In fact I
> just
> > > > copied their dependency statements as above and changed the name.
> > > >
> > > > I went into the maven-war-plugin's plugin.jelly and put some 
<echo>'s
> in
> > > it
> > > > to see what's happening:
> > > >
> > > >          <j:if test="${dep.type =='jar'}">
> > > >            <echo>JAR: copying lib.path = ${lib.path}</echo>
> > > >            <ant:copy todir="${webapp.build.lib}" 
file="${lib.path}"/>
> > > >          </j:if>
> > > >
> > > >          <j:if test="${dep.type =='tld'}">
> > > >            <echo>TLD: copying lib.path = ${lib.path}</echo>
> > > >            <ant:copy todir="${webapp.build.tlds}" 
file="${lib.path}"/>
> > > >          </j:if>
> > > >
> > > > It is simply not seeing the session-1.0.1.tld, it is not being put 
in
> > the
> > > > dependencies collection.
> > > > Bug?
> > > >
> > > >
> > > > 
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Re: war-plugin bug?

Posted by Dan Tran <da...@hotmail.com>.
Does this mean, we will not see a fix for this?

-Dan


----- Original Message ----- 
From: "Michal Maczka" <mm...@raay-cqs.com>
To: "'Maven Users List'" <us...@maven.apache.org>
Sent: Monday, September 01, 2003 5:14 AM
Subject: RE: war-plugin bug?


> This is caused by the fact that 
> ${artifact.id} = ${artifct.groupId}:${artifact.arifactId}
> 
> while it should be  
> 
> ${artifact.id} =
> ${artifct.groupId}:${artifact.arifactId}:${artifact.type}
> 
> (we had a discussion about it some time ago when you have closed one
> issue in JIRA with resolution "won't fix")
> 
> So this must be first changed in maven core and then consequently in
> plugins. 
> 
> 
> 
> 
> Michal
> 
> 
> > -----Original Message-----
> > From: dion@multitask.com.au [mailto:dion@multitask.com.au]
> > Sent: Monday, September 01, 2003 6:03 AM
> > To: Maven Users List
> > Subject: Re: war-plugin bug?
> > 
> > I believe this is filed as an open bug on Maven.
> > 
> > Anyone is able to submit a patch fixing it.
> > --
> > dIon Gillard, Multitask Consulting
> > Blog:      http://blogs.codehaus.org/people/dion/
> > 
> > 
> > "Dan Tran" <da...@hotmail.com> wrote on 31/08/2003 01:45:28 AM:
> > 
> > > that is an anoying bug to me, i think it is reported already.
> > > (not sure thou)
> > >
> > > So the first suggested solution solve this dilema.
> > >
> > >
> > > -Dan
> > >
> > > ----- Original Message -----
> > > From: "khote" <kh...@mminternet.com>
> > > To: "Maven Users List" <us...@maven.apache.org>
> > > Sent: Saturday, August 30, 2003 8:22 AM
> > > Subject: Re: war-plugin bug?
> > >
> > >
> > > > Those are good suggestions, some things I hadn't thought of.  I am
> > using a
> > > > war:webapp postGoal to copy in some docs into my webapp before the
> > WAR
> > is
> > > > created.
> > > >
> > > > What I discovered was that the first use of
> > > >
> > > > <groupId>taglibs</groupId>
> > > > <artifactId>taglib-session</artifactId>
> > > > <version>1.0.1</version> etc.
> > > >
> > > > when I wanted the jar in /WEB-INF/lib,
> > > >
> > > > was overwritten in the Map (or Hash or whatever) that was built
> for
> > > lib.path
> > > > by the second use of that same name, when I specified that
> > > > <type>tld</type>
> > > >
> > > > So unless I used two different names, I would always lose the
> first
> > one
> > > when
> > > > the maven-war-plugin executed.
> > > >
> > > > I found another way also:  I took all the taglib jars I want to
> use
> > and
> > > > unjarred them into a common temp directory, then went into that
> > directory
> > > > and
> > > >
> > > > jar cf taglibs-1.0.1 org
> > > >
> > > > then moved that into my taglibs repository.  Only had to have that
> > one
> > > > dependency then .... overkill I know, but it works.
> > > >
> > > > I'm trying to move an existing Tomcat/Struts application that
> works
> > well
> > > > enough into a JBoss-Tomcat/Struts, still trying to lose that
> > Tomcat-think
> > > > about how things are done.  Some of those taglibs can help me
> > watch/see
> > > > what's going on in the JSP environment, they're really just for
> > debugging
> > > > right now.
> > > >
> > > > Thanks,
> > > > K
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Dan Tran" <da...@hotmail.com>
> > > > To: "Maven Users List" <us...@maven.apache.org>; "khote"
> > > > <kh...@mminternet.com>
> > > > Sent: Saturday, August 30, 2003 8:11 AM
> > > > Subject: Re: war-plugin bug?
> > > >
> > > >
> > > > > Since tld file can live any where under WEB-INF
> > > > > directory, it is ambiguous for maven to blindfully
> > > > > copy the tld file to WEB-INF/
> > > > >
> > > > > there are 2 solutions:
> > > > >   1. if you are usig servet 2.3 configure your taglib to look
> for
> > tld in
> > > > the
> > > > > jar file
> > > > >      so you dont have to copy it to web-inf.
> > > > >
> > > > >    2. You need to tell maven what do by putting a postgoal in
> > maven.xml
> > > > >
> > > > > here is an example
> > > > >
> > > > > <?xml version="1.0"?>
> > > > > <project
> > > > >   default="nightly-build"
> > > > >   xmlns:m="maven"
> > > > >   xmlns:j="jelly:core"
> > > > >   xmlns:u="jelly:util">
> > > > >
> > > > >   <postGoal name="war:webapp">
> > > > >     <!-- copy validator-rules.xml to WEB-INF, war plugin does
> > > not do
> > that
> > > > automa
> > > > tically -->
> > > > >     <copy
> > file="${maven.repo.local}/struts/xmls/validator-rules-1.1.xml"
> > > > > tofile=
> > > > >
> "${maven.build.dir}/${pom.artifactId}/WEB-INF/validator-rules.xml"
> > 
> > />
> > > > >   </postGoal>
> > > > >
> > > > > </project>
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "khote" <kh...@mminternet.com>
> > > > > To: "Maven Users List" <us...@maven.apache.org>
> > > > > Sent: Saturday, August 30, 2003 4:10 AM
> > > > > Subject: war-plugin bug?
> > > > >
> > > > >
> > > > > > Wanting to try out some jakarta-taglibs.  It's not on ibiblio,
> > so
> > I
> > > > > > downloaded them and moved them into a taglibs (both jars and
> > tlds)
> > > > > directory
> > > > > > in my local repository.
> > > > > >
> > > > > >     <dependency>
> > > > > >       <groupId>taglibs</groupId>
> > > > > >       <artifactId>session</artifactId>
> > > > > >       <version>1.0.1</version>
> > > > > >       <properties><war.bundle>true</war.bundle></properties>
> > > > > >     </dependency>
> > > > > >
> > > > > >     <dependency>
> > > > > >       <groupId>taglibs</groupId>
> > > > > >       <artifactId>session</artifactId>
> > > > > >       <version>1.0.1</version>
> > > > > >       <type>tld</type>
> > > > > >       <properties><war.bundle>true</war.bundle></properties>
> > > > > >     </dependency>
> > > > > >
> > > > > > maven successfully finds, them.  However, when I try to use
> the
> > > > > war-plugin,
> > > > > > only the jar is copied into the WEB-INF/lib, the tld is not
> > copied
> > > into
> > > > > > WEB-INF/tld.
> > > > > >
> > > > > > I am already successfully using the jstl standard and struts
> > plugins
> > > > this
> > > > > > way, both jars and tlds, they are behaving as expected.  In
> fact
> > I
> > > just
> > > > > > copied their dependency statements as above and changed the
> > name.
> > > > > >
> > > > > > I went into the maven-war-plugin's plugin.jelly and put some
> > <echo>'s
> > > in
> > > > > it
> > > > > > to see what's happening:
> > > > > >
> > > > > >          <j:if test="${dep.type =='jar'}">
> > > > > >            <echo>JAR: copying lib.path = ${lib.path}</echo>
> > > > > >            <ant:copy todir="${webapp.build.lib}"
> > file="${lib.path}"/>
> > > > > >          </j:if>
> > > > > >
> > > > > >          <j:if test="${dep.type =='tld'}">
> > > > > >            <echo>TLD: copying lib.path = ${lib.path}</echo>
> > > > > >            <ant:copy todir="${webapp.build.tlds}"
> > file="${lib.path}"/>
> > > > > >          </j:if>
> > > > > >
> > > > > > It is simply not seeing the session-1.0.1.tld, it is not being
> > put
> > in
> > > > the
> > > > > > dependencies collection.
> > > > > > Bug?
> > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

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


RE: war-plugin bug?

Posted by Michal Maczka <mm...@raay-cqs.com>.
This is caused by the fact that 
${artifact.id} = ${artifct.groupId}:${artifact.arifactId}

while it should be  

${artifact.id} =
${artifct.groupId}:${artifact.arifactId}:${artifact.type}

(we had a discussion about it some time ago when you have closed one
issue in JIRA with resolution "won't fix")

So this must be first changed in maven core and then consequently in
plugins. 




Michal


> -----Original Message-----
> From: dion@multitask.com.au [mailto:dion@multitask.com.au]
> Sent: Monday, September 01, 2003 6:03 AM
> To: Maven Users List
> Subject: Re: war-plugin bug?
> 
> I believe this is filed as an open bug on Maven.
> 
> Anyone is able to submit a patch fixing it.
> --
> dIon Gillard, Multitask Consulting
> Blog:      http://blogs.codehaus.org/people/dion/
> 
> 
> "Dan Tran" <da...@hotmail.com> wrote on 31/08/2003 01:45:28 AM:
> 
> > that is an anoying bug to me, i think it is reported already.
> > (not sure thou)
> >
> > So the first suggested solution solve this dilema.
> >
> >
> > -Dan
> >
> > ----- Original Message -----
> > From: "khote" <kh...@mminternet.com>
> > To: "Maven Users List" <us...@maven.apache.org>
> > Sent: Saturday, August 30, 2003 8:22 AM
> > Subject: Re: war-plugin bug?
> >
> >
> > > Those are good suggestions, some things I hadn't thought of.  I am
> using a
> > > war:webapp postGoal to copy in some docs into my webapp before the
> WAR
> is
> > > created.
> > >
> > > What I discovered was that the first use of
> > >
> > > <groupId>taglibs</groupId>
> > > <artifactId>taglib-session</artifactId>
> > > <version>1.0.1</version> etc.
> > >
> > > when I wanted the jar in /WEB-INF/lib,
> > >
> > > was overwritten in the Map (or Hash or whatever) that was built
for
> > lib.path
> > > by the second use of that same name, when I specified that
> > > <type>tld</type>
> > >
> > > So unless I used two different names, I would always lose the
first
> one
> > when
> > > the maven-war-plugin executed.
> > >
> > > I found another way also:  I took all the taglib jars I want to
use
> and
> > > unjarred them into a common temp directory, then went into that
> directory
> > > and
> > >
> > > jar cf taglibs-1.0.1 org
> > >
> > > then moved that into my taglibs repository.  Only had to have that
> one
> > > dependency then .... overkill I know, but it works.
> > >
> > > I'm trying to move an existing Tomcat/Struts application that
works
> well
> > > enough into a JBoss-Tomcat/Struts, still trying to lose that
> Tomcat-think
> > > about how things are done.  Some of those taglibs can help me
> watch/see
> > > what's going on in the JSP environment, they're really just for
> debugging
> > > right now.
> > >
> > > Thanks,
> > > K
> > >
> > >
> > > ----- Original Message -----
> > > From: "Dan Tran" <da...@hotmail.com>
> > > To: "Maven Users List" <us...@maven.apache.org>; "khote"
> > > <kh...@mminternet.com>
> > > Sent: Saturday, August 30, 2003 8:11 AM
> > > Subject: Re: war-plugin bug?
> > >
> > >
> > > > Since tld file can live any where under WEB-INF
> > > > directory, it is ambiguous for maven to blindfully
> > > > copy the tld file to WEB-INF/
> > > >
> > > > there are 2 solutions:
> > > >   1. if you are usig servet 2.3 configure your taglib to look
for
> tld in
> > > the
> > > > jar file
> > > >      so you dont have to copy it to web-inf.
> > > >
> > > >    2. You need to tell maven what do by putting a postgoal in
> maven.xml
> > > >
> > > > here is an example
> > > >
> > > > <?xml version="1.0"?>
> > > > <project
> > > >   default="nightly-build"
> > > >   xmlns:m="maven"
> > > >   xmlns:j="jelly:core"
> > > >   xmlns:u="jelly:util">
> > > >
> > > >   <postGoal name="war:webapp">
> > > >     <!-- copy validator-rules.xml to WEB-INF, war plugin does
> > not do
> that
> > > automa
> > > tically -->
> > > >     <copy
> file="${maven.repo.local}/struts/xmls/validator-rules-1.1.xml"
> > > > tofile=
> > > >
"${maven.build.dir}/${pom.artifactId}/WEB-INF/validator-rules.xml"
> 
> />
> > > >   </postGoal>
> > > >
> > > > </project>
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "khote" <kh...@mminternet.com>
> > > > To: "Maven Users List" <us...@maven.apache.org>
> > > > Sent: Saturday, August 30, 2003 4:10 AM
> > > > Subject: war-plugin bug?
> > > >
> > > >
> > > > > Wanting to try out some jakarta-taglibs.  It's not on ibiblio,
> so
> I
> > > > > downloaded them and moved them into a taglibs (both jars and
> tlds)
> > > > directory
> > > > > in my local repository.
> > > > >
> > > > >     <dependency>
> > > > >       <groupId>taglibs</groupId>
> > > > >       <artifactId>session</artifactId>
> > > > >       <version>1.0.1</version>
> > > > >       <properties><war.bundle>true</war.bundle></properties>
> > > > >     </dependency>
> > > > >
> > > > >     <dependency>
> > > > >       <groupId>taglibs</groupId>
> > > > >       <artifactId>session</artifactId>
> > > > >       <version>1.0.1</version>
> > > > >       <type>tld</type>
> > > > >       <properties><war.bundle>true</war.bundle></properties>
> > > > >     </dependency>
> > > > >
> > > > > maven successfully finds, them.  However, when I try to use
the
> > > > war-plugin,
> > > > > only the jar is copied into the WEB-INF/lib, the tld is not
> copied
> > into
> > > > > WEB-INF/tld.
> > > > >
> > > > > I am already successfully using the jstl standard and struts
> plugins
> > > this
> > > > > way, both jars and tlds, they are behaving as expected.  In
fact
> I
> > just
> > > > > copied their dependency statements as above and changed the
> name.
> > > > >
> > > > > I went into the maven-war-plugin's plugin.jelly and put some
> <echo>'s
> > in
> > > > it
> > > > > to see what's happening:
> > > > >
> > > > >          <j:if test="${dep.type =='jar'}">
> > > > >            <echo>JAR: copying lib.path = ${lib.path}</echo>
> > > > >            <ant:copy todir="${webapp.build.lib}"
> file="${lib.path}"/>
> > > > >          </j:if>
> > > > >
> > > > >          <j:if test="${dep.type =='tld'}">
> > > > >            <echo>TLD: copying lib.path = ${lib.path}</echo>
> > > > >            <ant:copy todir="${webapp.build.tlds}"
> file="${lib.path}"/>
> > > > >          </j:if>
> > > > >
> > > > > It is simply not seeing the session-1.0.1.tld, it is not being
> put
> in
> > > the
> > > > > dependencies collection.
> > > > > Bug?
> > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >


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