Update of /cvsroot/metamorphosis/centipede2/src/java/org/krysalis/centipede2/ant
In directory sc8-pr-cvs1:/tmp/cvs-serv31430/src/java/org/krysalis/centipede2/ant
Modified Files:
ImportAntletTask.java
Log Message:
Get a local antlet now works.
Index: ImportAntletTask.java
===================================================================
RCS file: /cvsroot/metamorphosis/centipede2/src/java/org/krysalis/centipede2/ant/ImportAntletTask.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ImportAntletTask.java 26 Oct 2003 02:01:52 -0000 1.2
--- ImportAntletTask.java 31 Oct 2003 08:45:42 -0000 1.3
***************
*** 15,19 ****
/**
* Import a antlet the easy way.
! *
* @author Nick Chalko <[email protected]>
* @author $Author$
--- 15,19 ----
/**
* Import a antlet the easy way.
! *
* @author Nick Chalko <[email protected]>
* @author $Author$
***************
*** 55,59 ****
/**
! *
*/
public ImportAntletTask() {
--- 55,59 ----
/**
! *
*/
public ImportAntletTask() {
***************
*** 63,75 ****
}
! /* (non-Javadoc)
* @see org.apache.tools.ant.Task#execute()
*/
public void execute() throws BuildException {
File antlet = getAntletFile();
importTask.setProject(getProject());
importTask.setFile(antlet.getAbsolutePath());
importTask.execute();
! super.execute();
}
--- 63,79 ----
}
! /*
! * (non-Javadoc)
! *
* @see org.apache.tools.ant.Task#execute()
*/
public void execute() throws BuildException {
File antlet = getAntletFile();
+ importTask.setLocation(getLocation());
+ importTask.setOwningTarget(getOwningTarget());
importTask.setProject(getProject());
importTask.setFile(antlet.getAbsolutePath());
importTask.execute();
!
}
***************
*** 79,84 ****
private File getAntletFile() {
File localAntlet = getLocalAntletFile();
! if (localAntlet==null){
! localAntlet =getRemoteAntlet();
}
return localAntlet;
--- 83,88 ----
private File getAntletFile() {
File localAntlet = getLocalAntletFile();
! if (localAntlet == null) {
! localAntlet = getRemoteAntlet();
}
return localAntlet;
***************
*** 97,156 ****
*/
private File getLocalAntletFile() {
! // TODO Auto-generated method stub
! return null;
}
}
/*
! The Krysalis Patchy Software License, Version 1.1_01
! Copyright (c) 2002 Nicola Ken Barozzi. All rights reserved.
!
! This Licence is compatible with the BSD licence as described and
! approved by http://www.opensource.org/, and is based on the
! Apache Software Licence Version 1.1.
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions
! are met:
!
! 1. Redistributions of source code must retain the above copyright
! notice, this list of conditions and the following disclaimer.
!
! 2. Redistributions in binary form must reproduce the above copyright
! notice, this list of conditions and the following disclaimer in
! the documentation and/or other materials provided with the
! distribution.
!
! 3. The end-user documentation included with the redistribution,
! if any, must include the following acknowledgment:
! "This product includes software developed for project
! Krysalis (http://www.krysalis.org/)."
! Alternately, this acknowledgment may appear in the software itself,
! if and wherever such third-party acknowledgments normally appear.
!
! 4. The names "Krysalis" and "Nicola Ken Barozzi" and
! "Krysalis Centipede" must not be used to endorse or promote products
! derived from this software without prior written permission. For
! written permission, please contact [email protected].
!
! 5. Products derived from this software may not be called "Krysalis",
! "Krysalis Centipede", nor may "Krysalis" appear in their name,
! without prior written permission of Nicola Ken Barozzi.
!
! 6. This software may contain voluntary contributions made by many
! individuals, who decided to donate the code to this project in
! respect of this licence.
!
! THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
! WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
! DISCLAIMED. IN NO EVENT SHALL THE KRYSALIS PROJECT OR
! ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
! LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
! USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
! ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
! OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
! OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! SUCH DAMAGE.
! ====================================================================*/
--- 101,163 ----
*/
private File getLocalAntletFile() {
! File antletDir = getAntletDir();
! File targetDir = new File(antletDir, getName());
! File target = new File(targetDir, "xbuild.xml");
! return target.exists()?target:null;
! }
!
!
! /**
! * @return
! */
! private File getAntletDir() {
! String dirName = getProject().getProperty("ant.home");
! File antDir = new File(dirName);
! File antletDir = new File(new File(antDir, "tools"), "antlet");
! if (!antletDir.exists()) {
! antletDir.mkdirs();
! }
! return antletDir;
}
}
/*
! * The Krysalis Patchy Software License, Version 1.1_01 Copyright (c) 2002
! * Nicola Ken Barozzi. All rights reserved.
! *
! * This Licence is compatible with the BSD licence as described and approved by
! * http://www.opensource.org/, and is based on the Apache Software Licence
! * Version 1.1.
! *
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions are met: 1.
! * Redistributions of source code must retain the above copyright notice, this
! * list of conditions and the following disclaimer. 2. Redistributions in
! * binary form must reproduce the above copyright notice, this list of
! * conditions and the following disclaimer in the documentation and/or other
! * materials provided with the distribution. 3. The end-user documentation
! * included with the redistribution, if any, must include the following
! * acknowledgment: "This product includes software developed for project
! * Krysalis (http://www.krysalis.org/)." Alternately, this acknowledgment may
! * appear in the software itself, if and wherever such third-party
! * acknowledgments normally appear. 4. The names "Krysalis" and "Nicola Ken
! * Barozzi" and "Krysalis Centipede" must not be used to endorse or promote
! * products derived from this software without prior written permission. For
! * written permission, please contact [email protected]. 5. Products
! * derived from this software may not be called "Krysalis", "Krysalis
! * Centipede", nor may "Krysalis" appear in their name, without prior written
! * permission of Nicola Ken Barozzi. 6. This software may contain voluntary
! * contributions made by many individuals, who decided to donate the code to
! * this project in respect of this licence.
! *
! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
! * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
! * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
! * KRYSALIS PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
! * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
! * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
! * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
! * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! */
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.