You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Guillaume Lasnier <gu...@mac.com> on 2003/05/16 11:28:45 UTC

Maven war plugin contribution

  Hi there!
I have added tld support for the war plugin. The purpose is to have your tlds' dependencies declared in your project.xml file included in the war or webapp directory structure. First of all you have to declare those dependencies in the project.xml as follows :
==================>
<?xml version="1.0"?>
<project>

  [...]

  <dependencies>
    <dependency>
      <id>struts-bean</id>
      <groupId>struts</groupId>
      <version>1.1-rc1</version>
      <!-- declare dependecy as of type 'tld' -->
      <type>tld</type>
      <url>http://jakarta.apache.org/struts/index.html</url>
      <!-- declare that the tld file should be bundled as a tld in the webapp -->
      <properties>
        <war.bundle.tld>true</war.bundle.tld>
      </properties>
    </dependency>
  </dependencies>

  [..]

</project>
<================== 
In maven 1.0-beta9 this already implies the tld file being downloaded from the repository provided it has been distributed. Then by invoking the war:war or war:webapp goal, the tld will be copied to the WEB-INF/${maven.war.tld.subdir} in the target war file or webapp directory.
I hope you will consider this contribution usefull and integrate it to the next version of the plugin.
Best regards.

--
Guillaume Lasnier
mailto:guilguili@mac.com

Re: Maven war plugin contribution

Posted by Brian Ewins <Br...@i-documentsystems.com>.
Would you ever depend on a tld and *not* want to bundle it in the war?

Guillaume Lasnier wrote:

>   Hi there!
> I have added tld support for the war plugin. The purpose is to have your tlds' dependencies declared in your project.xml file included in the war or webapp directory structure. First of all you have to declare those dependencies in the project.xml as follows :
> ==================>
> <?xml version="1.0"?>
> <project>
> 
>   [...]
> 
>   <dependencies>
>     <dependency>
>       <id>struts-bean</id>
>       <groupId>struts</groupId>
>       <version>1.1-rc1</version>
>       <!-- declare dependecy as of type 'tld' -->
>       <type>tld</type>
>       <url>http://jakarta.apache.org/struts/index.html</url>
>       <!-- declare that the tld file should be bundled as a tld in the webapp -->
>       <properties>
>         <war.bundle.tld>true</war.bundle.tld>
>       </properties>
>     </dependency>
>   </dependencies>
> 
>   [..]
> 
> </project>
> <================== 
> In maven 1.0-beta9 this already implies the tld file being downloaded from the repository provided it has been distributed. Then by invoking the war:war or war:webapp goal, the tld will be copied to the WEB-INF/${maven.war.tld.subdir} in the target war file or webapp directory.
> I hope you will consider this contribution usefull and integrate it to the next version of the plugin.
> Best regards.
> 
> --
> Guillaume Lasnier
> mailto:guilguili@mac.com
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org



Privacy and Confidentiality Notice

------------------------------------------------

The information contained in this E-Mail message is intended only for the person or persons to whom it is addressed.  Such information is confidential and privileged and no mistake in transmission is intended to waive or compromise such privilege.  If you have received it in error, please destroy it and notify us on the telephone number printed above.  If you do not receive complete and legible copies, please telephone us immediately. Any opinions expressed herein including attachments are those of the author only. i-documentsystems Ltd. does not accept responsibility for the accuracy or completeness of the information provided or for any changes to this Email, however made, after it was sent. (Please note that it is your responsibility to scan this message for viruses).


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


RE: Maven war plugin contribution

Posted by "michal.maczka" <mi...@cqs.ch>.
> <==================
> In maven 1.0-beta9 this already implies the tld file being
> downloaded from the repository provided it has been distributed.
> Then by invoking the war:war or war:webapp goal, the tld will be
> copied to the WEB-INF/${maven.war.tld.subdir} in the target war
> file or webapp directory.
> I hope you will consider this contribution usefull and integrate
> it to the next version of the plugin.
> Best regards.
>


BTW:
for setting (or dissussiing how to set)  default values of variables like
${maven.war.tld.subdir} etc.,

I would propose to follow the guidlines of SUN:
http://java.sun.com/blueprints/code/namingconventions.html
http://developer.java.sun.com/developer/technicalArticles/javaserverpages/co
de_convention/
(see section "Code Examples" at the bottom)


They are rather simple, not bad and __WELL Documented__
(so motivations for some choices will be justified be giving refence to
those documents ...)


I would propose to follow this convention (where ever it is reasonable) in
EAR and WAR plugins...


For example deafult value for preseneted property could be:

${maven.war.tld.subdir}=${maven.war.dest}/WEB-INF/tld


What you think?


With Maven-New such things like mapping from:

<dependecy>
  <artifactId>petstore</artifactId>
  <type>ejb</type>
</dependecy>

to a file: "ejbs/petstore-ejb-1.0.0.jar"

will be possible.

Michal


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