If you want to avoid having to change all of your taglib descriptors in your
JSPs when you decide to use a newer version of a tag library, you should use
logical URIs and create tag library mappings in your web.xml deployment
descriptor.  For example, use a taglib descriptor of the following form:

    <%@ taglib prefix="mytags" uri="http://www.company.com/taglibs/mytags";
%>

The URL specified as the value of the URI does not have to exist.  It's
simply a logical namespace used to distinguish tag libraries.  Then place
the following in your web.xml:

  <taglib>
    <taglib-uri>http://www.company.com/taglibs/mytags</taglib-uri>
    <taglib-location>/WEB-INF/tld/mytags-1.0.tld</taglib-location>
  </taglib>

Now when you want to upgrade to a new version of the taglib, simply change
the entry in web.xml and redeploy.  This allows you to see which version of
a tag library your application uses, without having to specify version
numbers within your JSPs.

Cheers,
Chuck

> -----Original Message-----
> From: Pak, Young-rok [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 22, 2004 7:40 AM
> To: Maven Users List
> Subject: Re: how to deploy file to repository without filename modified?
>
>
> I want to deploy some tld files(JSP Tag Library Descriptor) to
> repository and use that as dependencies in other project. for
> example, the project 'mytag' produces mytag.tld and mytag.jar,
> and other web project myweb uses both file. I want to deploy both
> files using jar:deploy with some postGoal definition in maven.xml.
>
> Why the name of tld files should not be changed is that their
> file name will be used in JSP page like this:
>
>     <%@ taglib uri="/WEB-INF/tlds/mytag.tld" prefix="mytag" %>
>
> mytag-1.0.tld seems not good name for tld file. and the name
> should not change even if it versions up.
>
> ----- Original Message -----
> From: "Brett Porter" <[EMAIL PROTECTED]>
> To: "Maven Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, September 22, 2004 8:20 PM
> Subject: Re: how to deploy file to repository without filename modified?
>
>
> > This is intentionally not supported. Artifacts need versions in the
> > repository, especially with new features coming in Maven.
> >
> > What problems will this cause you?
> >
> > - Brett
> >
> > On Wed, 22 Sep 2004 20:10:17 +0900, Pak, Young-rok
> > <[EMAIL PROTECTED]> wrote:
> > > I want to deploy some files to repository without modifying
> filename when deploying jar. for example, there is file to deploy
> in my project like this:
> > >
> > >     src/tld/mytag.tld
> > >
> > > and, I want to deploy to my repository like this:
> > >
> > >     mygroup/tlds/mytag.tld
> > >
> > > so, I tried to use maven.xml like this:
> > >
> > >   <postGoal name="jar:deploy">
> > >     <artifact:deploy artifact="src/tld/mytag.tld" type="tld"
> project="${pom}"/>
> > >   </postGoal>
> > >
> > > but, failed. mytag.tld copied to:
> > >
> > >     mygroup/tlds/myproject-1.0.tld
> > >
> > > this is not what I wanted. and found no other way. how can I
> do that? if there is no way to do that, I think artifact plugin
> must be extended to support that.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to