ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter reilly <peter.rei...@corvil.com>
Subject Re: javascript: Using pvcsProject nested element of the Pvcs task.
Date Thu, 27 Nov 2003 10:00:37 GMT
You need to import the PvcsProject class.
With javascript this is done with
importClass(Package.org.apache.tools.ant.taskdefs.optional.pvcs.PvcsProject);

However I have not been able to get this to work.

One can use beanshell instead:
  <target name="pvcs">
    <script language="beanshell">
      import org.apache.tools.ant.taskdefs.optional.pvcs.PvcsProject;
      pvcs = project.createTask("pvcs");
      p1 = new PvcsProject();
      p2 = new PvcsProject();
      p1.setName("project1");
      p2.setName("project2");
      pvcs.addPvcsproject(p1);
      pvcs.addPvcsproject(p2);
      // etc.....
    </script>
  </target>

Peter


On Wed, 2003-11-26 at 16:45, Woodward, Andy wrote:
> I'd like to do something like this in JavaScript (note pvcsproject nested element)
> 
> 		<pvcs pvcsbin="${pvcs.bin}" 
> 			repository="${pvcs.repository}" 
> 			filenameFormat="${pvcs.filenameformat}" 
> 			linestart="${pvcs.linestart}"
> 			<pvcsproject name="${pvcs.project1}" />
> 			<pvcsproject name="${pvcs.project2}" />
> 		</pvcs>
> 
> I've got it working fine when the pvcsproject is just an attribute 
> 
> 	  <target name="createPvcsTarget" depends="init">
> 		    <script language="javascript"> <![CDATA[
> 			
> 			// get project name
> 			project = createPvcsTargets.getProject();
> 
>      			pvcs = project.createTask("pvcs");
>         			getLatest.addTask(pvcs);
>         			pvcs.setPvcsbin(project.getProperty("pvcs.bin"));
>         			pvcs.setRepository(project.getProperty("pvcs.repository"));
>         			pvcs.setFilenameFormat(project.getProperty("pvcs.filenameformat"));
>         			pvcs.setLineStart(project.getProperty("pvcs.linestart"));
> 				pvcs.setPvcsproject(project.getProperty("pvcs.project1"));
> 		    ]]> </script>
>   	</target>
> 
> however can't get it to work when pvcsproject is a nested element.  Looking at the API
javadocs for pvcs class I think that I need to use the addPvcsProject method - but that requires
a PvcsProject object - any ideas how I create one?
> 
> Any help appreciated  
> 
> Cheers
> 
> Andy
> x2623 
> 
> ***********************************************
> This e-mail and its attachments are confidential
> and are intended for the above named recipient
> only. If this has come to you in error, please 
> notify the sender immediately and delete this 
> e-mail from your system.
> You must take no action based on this, nor must 
> you copy or disclose it or any part of its contents 
> to any person or organisation.
> Statements and opinions contained in this email may 
> not necessarily represent those of Littlewoods.
> Please note that e-mail communications may be monitored.
> The registered office of Littlewoods Limited and its
> subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
> Registered number of Littlewoods Limited is 262152.
> ************************************************
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


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


Mime
View raw message