You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Petar Tahchiev <pa...@gmail.com> on 2008/01/04 19:35:09 UTC

Lib in War Does Not Accept Path-like structures

HI, guys

it is Petar Tahchiev from the Jakart Cactus team.

I have a (very dull maybe) suggestion for Ant.

Does anybody know why the
lib tag in the war task does not accept path-like
strucures? I have a

<path id="aaa">
<pathelement location="a.jar"/>
<pathelement location="b.jar"/>
</path>

and I am not able to say:

<war>
     <lib>
         <path refid="aaa"/>
     </lib>
</war>

I think would be really convenient.  As I see it expects a FileSet structure
and I think that FileSet extends Path.

Is there any chance that this would change in the near future?

Please keep me in CC, since I am not subscribed to this list. Thank you.
-- 
Regards, Petar!
Karlovo, Bulgaria.

EOOXML Objections
http://www.grokdoc.net/index.php/EOOXML_objections

Public PGP Key at:
https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

Re: Lib in War Does Not Accept Path-like structures

Posted by Ed Randall <ed...@ingenotech.com>.
Peter,

I have the same complaint about Ant.  Nothing is orthogonal...!

However here is my workaround - 
note that, as written, this depends on all 3rd-party .jar files being in the
same location:

  <property name="libs3p.dir"		location="/apps/java/lib"/>

  <path id="classes.compile">
    <pathelement path="${libs3p.dir}/first.jar"/>
    <pathelement path="${libs3p.dir}/second.jar"/>
  </path>


  <target name="warfile">
    <pathconvert pathsep="," property="war.libs" refid="classes.compile">
      <map from="${libs3p.dir}/" to=""/>
    </pathconvert>
    <war destfile="myapp.war">
      ...
      <lib dir="${libs3p.dir}" includes="${war.libs}"/>
    </war>
  </target>


Regards

Ed

-- 
View this message in context: http://www.nabble.com/Lib-in-War-Does-Not-Accept-Path-like-structures-tp14654383p17455167.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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


RE: Lib in War Does Not Accept Path-like structures

Posted by Wszeb <ws...@gmail.com>.

mgainty wrote:
> 
> 
> Hello Petar
>  
> the lib directive is embedded in the war task such as from this example
> http://ant.apache.org/manual/CoreTasks/war.html
> <war destfile="myapp.war" webxml="src/metadata/myapp.xml">
>   <lib dir="aaa">   
>       <include name="a.jar"/>
>       <include name="b.jar"/>
>   </lib>
> </war>
> 
> 

But what if JAR files to be included in WAR are defined elsewhere, with
path-like structure? I have the same problem as Petar - I don't want to
hardcode JAR names in WAR task. I have a path-like structure with all JARs
needed (from various disk locations) provided from "another user". And
currently I have to copy all these JARs into temporary intermediate
directory, just to be able to WAR them! It's really annoying. And
time-overhead for copying these JARs is signifant. Please help - what are
possible workaround solutions? Anyway, ant is a great and mystical tool.

Greetings, Wszeb.
-- 
View this message in context: http://www.nabble.com/Lib-in-War-Does-Not-Accept-Path-like-structures-tp14654383p15093651.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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


RE: Lib in War Does Not Accept Path-like structures

Posted by Martin Gainty <mg...@hotmail.com>.
Hello Petar
 
the lib directive is embedded in the war task such as from this example
http://ant.apache.org/manual/CoreTasks/war.html
<war destfile="myapp.war" webxml="src/metadata/myapp.xml">
  <lib dir="aaa">    <include name="a.jar"/>
    <include name="b.jar"/>  </lib></war>
HTH/Martin ______________________________________________Disclaimer and confidentiality noteEverything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.> Date: Fri, 4 Jan 2008 20:35:09 +0200> From: paranoiabla@gmail.com> To: dev@ant.apache.org> Subject: Lib in War Does Not Accept Path-like structures> > HI, guys> > it is Petar Tahchiev from the Jakart Cactus team.> > I have a (very dull maybe) suggestion for Ant.> > Does anybody know why the> lib tag in the war task does not accept path-like> strucures? I have a> > <path id="aaa">> <pathelement location="a.jar"/>> <pathelement location="b.jar"/>> </path>> > and I am not able to say:> > <war>> <lib>> <path refid="aaa"/>> </lib>> </war>> > I think would be really convenient. As I see it expects a FileSet structure> and I think that FileSet extends Path.> > Is there any chance that this would change in the near future?> > Please keep me in CC, since I am not subscribed to this list. Thank you.> -- > Regards, Petar!> Karlovo, Bulgaria.> > EOOXML Objections> http://www.grokdoc.net/index.php/EOOXML_objections> > Public PGP Key at:> https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611> Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611
_________________________________________________________________
Put your friends on the big screen with Windows Vista® + Windows Live™.
http://www.microsoft.com/windows/shop/specialoffers.mspx?ocid=TXT_TAGLM_CPC_MediaCtr_bigscreen_012008