473,797 Members | 3,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ANT script question

2 New Member
Having a little issue with my build script.

I have some EAR files that I extract WAR files from, I then extract .wsdl files from the WAR files and do some work with those wsdl files.

However, the work I do for the wsdl files needs to include the name of the ear file it's come from. But I'm not exactly sure how to do that since they are done in separate methods.

I have a method which extracts the EAR's and then extracts the WAR's.
I have a separate method which does the work needed to be done on the wsdl files.

The wsdl's are in a directory structure such as this: EAR_FILE_IT_HAS _COME_FROM\xyz\ ...\*.wsdl

is there any way I can get the parent directory from the structure I just posted? (the "EAR_FILE_IT_HA S_COME_FROM" directory that is to say).

That is what I need to append to each wsdl file.

here are teh two methods which do the jobs I have described.

<!-- Creates an xml file for each wsdl file -->
<macrodef name="xlstTrans form">
<attribute name="root.dir" default="${base dir}/make/target" />
<attribute name="style.fil e" default="${base dir}/make/xml/xslt/WSDLStyle.xslt" />

<sequential>
<for param="wsdlPath ">
<path>
<fileset dir="@{root.dir }" includes="**/*.wsdl" />
</path>
<sequential>
<var name="temp.file " unset="true" />
<basename property="temp. file" file="@{wsdlPat h}" />
<xslt style="@{style. file}" in="@{wsdlPath} " out="${basedir}/make/target/xml/${temp.file}.xm l" force="true">
<param name="earFile" expression="ear File" />
</xslt>
</sequential>
</for>
</sequential>
</macrodef>

<!--
This target extracts all ear files and then extracts all war files within the expanded ear file dir's
-->
<target name="extract" depends="info">
<for param="earPath" >
<path>
<fileset dir="${basedir}/make/lib/ears" includes="**/*.ear" />
</path>
<sequential>
<var name="earFile" unset="true" />
<basename property="earFi le" file="@{earPath }" />
<unzip src="@{earPath} " dest="${basedir }/make/target/extracted/${earFile}" />
<for param="warPath" >
<path>
<fileset dir="${basedir}/make/target/extracted/${earFile}" includes="**/*.war" />
</path>
<sequential>
<var name="warFile" unset="true" />
<basename property="warFi le" file="@{warPath }" />
<unwar src="@{warPath} " dest="${basedir }/make/target/extracted/${earFile}/WAR/" />
</sequential>
</for>
</sequential>
</for>
</target>
Mar 19 '08 #1
0 1616

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2079
by: el_roachmeister | last post by:
I have a 4000 line php cgi script that is not memory or cpu intensive. It runs in 1 second. Now I am getting a lot of customer requests to add in new features. My question is if there is a point where my code will be too long and take too long to run (i.e > 5 seconds). I would really like to have my script rival the functionality of a desktop application but can php do it? My server is a dual processor with 2GB ram.
2
5091
by: Øystein Johansen | last post by:
Hi, (This question may be stupid, but I just can't find the answer...) How can I make the browser downlaod a cgi script from /cgi-bin/. Obviously I can't make a link to it with <a=href="/cgi-bin/script.cgi>, since tha script will be executed then. I see how Lutz in PP2E prints the script on the screen, but I want the user to get the "save file" message box?
0
1639
by: Mark Griffin | last post by:
Hi... I am trying to convert a simple FAQ script to access mysql db rather than the Access db it was designed for. The originators of the script offer no support at all. I have managed to set up the mysql db and have frigged the script to get it running, however certain bits are not functional, i.e. the links on the categories.
1
3258
by: Kevin Potter | last post by:
We have an application that has been running on IIS4 and IIS5 for quite some time, without problem We're now migrating to IIS6 (windows/2003), and have run into a what might? be a Javascipt problem/question... The snippet of code in question is: <script language="JavaScript"><!-- document.write("<script src='/fp/"+includename+"'></script>"); // -->></script>
0
3232
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
2
3149
by: Kingo | last post by:
Hi, First, please forgive my terrible knowledge of JS! I haven't used it in years. I am trying to create a Help page where a new question is on each line, and when clicking on the question, the answer is written below it. Click on the question again removes the answer. (Basically the Q/A is being toggled).
19
3829
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
4
4066
dreamcatcher
by: dreamcatcher | last post by:
Hi everyone, I'm a frontend designer starting to learn about getting forms to work. What I'm after is a script that I can learn from and get working on a site relatively quickly. Something that has the 'how to' details with the script, explaining stuff. A simple feedback form, that displays something similar to what I'm showing below. I need this script to generate an e-mail that is sent back to the visitor saying, thank you etc for your...
3
1993
by: Alan Isaac | last post by:
This is a simple question about actual practice. I just want to know how you (yes you) are approaching this problem. The problem: What is the recommended packaging of demo scripts or test scripts for a package to be distributed to others to "play with". (I.e., without "installing".)
4
3380
by: Andy Fish | last post by:
hi, this is more an html parsing question than an XML question but I think it's the kind of thing that folks in an XML newsgroup would be more likely to help with, so please excuse me if it's a little off topic. please be aware that I am primarily talking about HTML rather than XHTML but I would also like to understand how XHTML works for when I prepare to convert the app to XHTML. I have recently discovered that this:
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9537
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10246
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7560
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5459
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2934
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.