Re: how to deploy file to repository without filename modified?

2004-09-23 Thread Felipe Leme
On Wed, 2004-09-22 at 23:17, Pak, Young-rok wrote:

> but one jar may need two or more tld files like JSTL or Struts.  
> how can I solve a case like these?

You can add how many resources (in this case, TLD) as you want in the
POM.

-- Felipe



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



Re: how to deploy file to repository without filename modified?

2004-09-22 Thread Pak, Young-rok
thanks for replies. they really helped me. but still have problem.

first, modifying web.xml is not good as much as modifying JSP files. because about 
twenty projects use that taglib, so if taglib changed, I must change twenty web.xml. 
in fact, it isn't difficult job, but it seems bad job. taglib will be developed day 
after day, and other web developers want to know just one name for one product. 
notifying difference of both versions is easier than changing filename because all 
products are in-company project.

second, putting tld into jar seems good idea. and it solved my case. but one jar may 
need two or more tld files like JSTL or Struts.  how can I solve a case like these?

third, I have another requirement that need simple copying deployment. our web 
projects have some categories, and in same category projects have common web resources 
like jsp and html. so we extract that common resources and make a seperated project. 
for example, project A, B, C are in same category CAT1, 4 project are needed: 
common-CAT1, CAT1-A, CAT1-B, CAT1-C. at build time, common-CAT1's resources should be 
copied to CAT1-A, CAT1-B, CAT1-C. of source all associated project must be checked out 
to local workspace. we have used Ant for this job, and I want to use Maven for this. I 
think if I can deploy common-CAT1 in webapp form, CAT1-A can use it as dependency. 
making war for this job is not good because it should do unnecessary job. if I could 
build common-CAT1 using war:webapp and deploy the built webapp directory, it'll be 
great. how do you think about this?

Re: how to deploy file to repository without filename modified?

2004-09-22 Thread Felipe Leme
Hi,

On Wed, 22 Sep 2004 20:39:35 +0900, "Pak, Young-rok" <[EMAIL PROTECTED]> wrote:
 
> 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" %>

Using a URI relative to the webapp structure is a bad practice - you should be using a 
'named' URI, like http://mycompany.com/mytag, instead. 

On JSP containers 1.2 and above, if a TLD is located at the META-INF directory of a 
jar, the container automatically maps the URL defined in the TLD to that file. Even in 
1.1 or 1.0 containers you can use this type URI, the only difference is that you would 
need to manually map the URLs in the web.xml then.

So, in my opinion, you should include the TLD in the jars and then the other projects 
that needs the TLD could extract it from the jar. Of course, it's nice to have the 
TLDs in the repository too, but mainly for reference.

> mytag-1.0.tld seems not good name for tld file. and the name should not change even 
> if it versions up.

That's questionable. What if a new release of your taglib breaks compatibility with 
the older ones?

-- Felipe


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



Re: how to deploy file to repository without filename modified?

2004-09-22 Thread Brett Porter
I don't agree. I think it is good to keep the version in the file so
you know what it is.

You can have /WEB-INF/tlds/mytag-1.0.tld, and then map it to
/WEB-INF/tlds/mytag.tld in web.xml (first is , latter is
)

If you are using a servlet 2.3 container, you might consider putting
the tag library descriptor inside your tag library jars - they can be
automatically discovered.

There is more discussion of this in the archives.

Regards,
Brett


On Wed, 22 Sep 2004 20:39:35 +0900, Pak, Young-rok
<[EMAIL PROTECTED]> wrote:
> 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:
> > >
> > >   
> > > 
> > >   
> > >
> > > 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]



RE: how to deploy file to repository without filename modified?

2004-09-22 Thread Charles Daniels
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:

  
http://www.company.com/taglibs/mytags
/WEB-INF/tld/mytags-1.0.tld
  

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:
> > >
> > >   
> > >  project="${pom}"/>
> > >   
> > >
> > > 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]



Re: how to deploy file to repository without filename modified?

2004-09-22 Thread Pak, Young-rok
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:
> > 
> >   
> > 
> >   
> > 
> > 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]
> 

Re: how to deploy file to repository without filename modified?

2004-09-22 Thread Brett Porter
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:
> 
>   
> 
>   
> 
> 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]