Patrick --
Although it's not cross-platform, you could get the value of 'uname
-m'. On my Gentoo P4 laptop, it's i686 whereas System.getProperty(
"os.arch" ) gives i386. Same discrepancies for an Intel EM64T -- uname
-m gives x86_64, os.arch is amd64. Then again, I'm using an IBM amd64
JVM
Here are a couple of ideas:
*use a wrapper script to set a system environment variable, which you can
access with
*write a custom task that can make the determination in Java code
*use
Problem:
have ant tell me whether I am running on a 64 bit architecture.
I thought the solution was:
check for the value of the "os.arch" property.
Unfortunately, if I can make something out of the value returned on Windows
("amd64) I can't on Linux (it returns "i386" which is id
dear,
I create a simple task as indicated in the ANT book : "Ant: The Definitive
Guide", Second Edition
from O'Reilly. Something like
import java.io.IOException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
public
So, this is how I solved the problem. It's kind of a hack, but it works...
package com.briankuhn.ant.taskdefs;
import org.codehaus.groovy.ant.Groovy;
import org.apache.tools.ant.Project;
public class QuietGroovy extends Groovy {
public void log(String str) {
this.log(str, Project.MSG_VERBOSE
My question would be more why do your custom condition need to access
an arbitrary property. If it needs some input, it should take it in
the form of an attribute setter and use that. --DD
-
To unsubscribe, e-mail: [EMAIL PROTECTE
Hmm. to throw another iron in the fire, Ant uses
reflection to detect a setProject(oata.Project) method
on... anything. So you could just do that if you
don't want the baggage.
HTH,
Matt
--- Brian Kuhn <[EMAIL PROTECTED]> wrote:
> Yeah, I think that's the 'old' way of writing
> conditions. It's
Is there a way to stop a task from logging? I have the following macrodef
that uses the groovy ant task. Groovy spits out the message "[groovy]
statements executed successfully" and provides no way to turn it off. Is
there a way I can override its ability to log?
Thanks,
Brian
if ('@{abo
Have you tried implementing the "setProject(oata.Project)" method? One of
the committers could say for sure, but I think the introspector will call
that method, even if the class in question does not extend from
oata.ProjectComponent...
JEC
--
Jeffrey E. Care ([EMAIL PROTECTED])
WebSphere v7 R
Yeah, I think that's the 'old' way of writing conditions. It's pretty much
like writing a task. I was hoping to extend
org.apache.tools.ant.taskdefs.condition.Equals, which extends
java.lang.Object and implements
org.apache.tools.ant.taskdefs.condition.Condition. It doesn't look like
that's going t
IIRC so long as your condition impl. class extends form
oata.ProjectComponent you can get a handle to the project. One way to do
this would be to extend oata.taskdefs.condition.ConditionBase
--
Jeffrey E. Care ([EMAIL PROTECTED])
WebSphere v7 Release Engineer
WebSphere Build Tooling Lead (Proje
Hi all,
I'm writing a custom condition that needs to get the value of a property in
the project. How do I get a reference to the project from a condition? In a
custom task, I would call this.getProject().getProperty("foo"). Since
condition is an interface, I have no such option.
Thanks,
Brian
Cool. Thanks.
-Original Message-
From: Matt Benson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 11, 2005 4:50 PM
To: Ant Users List
Subject: RE: Sshexec: Auth fail
Actually... that was on ant-dev, the supplier was one
of the (AFAIU) key guys at JCraft, the writers of the
jsch packag
13 matches
Mail list logo