You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by lightbulb432 <ve...@hotmail.com> on 2007/02/13 23:52:48 UTC

DTD or XSD for build files

Is DTD or XSD validation of the Ant build files possible from within an IDE?
It seems to be possible, but I'm wondering how that happens. The taskdef
element's name attribute defines the element used later in the Ant build
files. It seems different from the standard way of defining element names in
a DTD/XSD and defining namespaces and things like that...

Is there a way to make validation work using DTDs or XSDs for external
validation, or can they not be used at all with Ant build files? Or have I
missed something completely and DTDs / XSDs can be used?

Fairly new to all this, so just wondering...
-- 
View this message in context: http://www.nabble.com/DTD-or-XSD-for-build-files-tf3224110.html#a8955279
Sent from the Ant - Users mailing list archive at Nabble.com.


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


RE: Switching to 'root' user

Posted by jason heddings <ro...@heddway.com>.
We have a build system that creates and installs RPM's...  The installation
must be done as root, and leads to mixed ownership of files if we only sudo
that portion.  That is what we are currently doing and it causes us lots of
problems.

For example, some RPMS we build from our own source and some we use from 3rd
parties...  When doing the build, we end up with files owned by the
developer and the RPM install has files owned by root.  We can get around
this with a lot of calls to "chown" but that makes the build files pretty
nasty.

--jah
 

-----Original Message-----
From: Anderson, Rob (Global Trade) [mailto:Rob.Anderson@nike.com] 
Sent: Wednesday, 14 February, 2007 11:34
To: Ant Users List
Subject: RE: Switching to 'root' user

What are you trying to accomplish as root? Running ant as root should
probably not be necessary. There are probably only a few commands that
need to run as root. I would suggest configuring sudo to only allow
execution of those specific commands (with NOPASSWD), and in your
build.xml file use the exec task to run sudo.

-Rob Anderson

> -----Original Message-----
> From: jason heddings [mailto:rocket@heddway.com] 
> Sent: Wednesday, February 14, 2007 9:15 AM
> To: 'Ant Users List'
> Subject: Switching to 'root' user
> 
> Is it possible to run 'ant' as a regular user, but in the 
> build file change the process to run as 'root' instead?  I 
> could just prefix the ant command with 'sudo' but I'd like to 
> try to accomplish this "behind the scenes" of our developers.
>  
> Thanks,
> --jah
> 
> 
> 
> ---------------------------------------------------------------------
> 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





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


RE: Switching to 'root' user

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
What are you trying to accomplish as root? Running ant as root should
probably not be necessary. There are probably only a few commands that
need to run as root. I would suggest configuring sudo to only allow
execution of those specific commands (with NOPASSWD), and in your
build.xml file use the exec task to run sudo.

-Rob Anderson

> -----Original Message-----
> From: jason heddings [mailto:rocket@heddway.com] 
> Sent: Wednesday, February 14, 2007 9:15 AM
> To: 'Ant Users List'
> Subject: Switching to 'root' user
> 
> Is it possible to run 'ant' as a regular user, but in the 
> build file change the process to run as 'root' instead?  I 
> could just prefix the ant command with 'sudo' but I'd like to 
> try to accomplish this "behind the scenes" of our developers.
>  
> Thanks,
> --jah
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Switching to 'root' user

Posted by jason heddings <ro...@heddway.com>.
Is it possible to run 'ant' as a regular user, but in the build file change
the process to run as 'root' instead?  I could just prefix the ant command
with 'sudo' but I'd like to try to accomplish this "behind the scenes" of
our developers.
 
Thanks,
--jah



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


Re: AW: DTD or XSD for build files

Posted by Steve Loughran <st...@apache.org>.
lightbulb432 wrote:
> True, that's what I figured.
> 
> Within the "myOwnTask" element, however, couldn't an XSD be defined for that
> based on the allowable attributes and subelements, so you get the benefit of
> autocompletion and validation in your IDE? But I guess if that's not how
> it's done then I shouldn't pursue it...

XSD is a worst-in-class XML type language that doesnt map well to ant's 
type system; having support for it would only encourage people to use it 
in their own applications. If Ant were to have a schema langauge, it 
would be relaxng with a schematron file to go with.


> Eclipse seems to nicely autocomplete the tags nonetheless...I guess it has
> it's own way of doing that by looking at the tasks you define...

Its called introspection.


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


Re: AW: DTD or XSD for build files

Posted by lightbulb432 <ve...@hotmail.com>.
True, that's what I figured.

Within the "myOwnTask" element, however, couldn't an XSD be defined for that
based on the allowable attributes and subelements, so you get the benefit of
autocompletion and validation in your IDE? But I guess if that's not how
it's done then I shouldn't pursue it...

Eclipse seems to nicely autocomplete the tags nonetheless...I guess it has
it's own way of doing that by looking at the tasks you define...



Jan.Materne wrote:
> 
> I dont think that it's "really" possible ...
> 
> <project>
>     <taskname name="myOwnTask" classname="MyOwnTask"/>
>     <presetdef name="copy2"><copy todir="standard"/></presetdef>
>     <macrodef name="foo">
>         <attribute name="bar"/>
>         ...
>     </macrodef>
> 
>     <myOwnTask completelyUnknownAttribute="" ... />
>     <copy2 file="file"/>
>     <foo bar=""/>
> </project>
> 
> 
> How you would define a DTD or XSD _before_ writing the buildfile?
> 
> 
> Jan
> 
> 
>>-----Ursprüngliche Nachricht-----
>>Von: lightbulb432 [mailto:veerukrishnan@hotmail.com] 
>>Gesendet: Dienstag, 13. Februar 2007 23:53
>>An: user@ant.apache.org
>>Betreff: DTD or XSD for build files
>>
>>
>>Is DTD or XSD validation of the Ant build files possible from 
>>within an IDE?
>>It seems to be possible, but I'm wondering how that happens. 
>>The taskdef
>>element's name attribute defines the element used later in the 
>>Ant build
>>files. It seems different from the standard way of defining 
>>element names in
>>a DTD/XSD and defining namespaces and things like that...
>>
>>Is there a way to make validation work using DTDs or XSDs for external
>>validation, or can they not be used at all with Ant build 
>>files? Or have I
>>missed something completely and DTDs / XSDs can be used?
>>
>>Fairly new to all this, so just wondering...
>>-- 
>>View this message in context: 
>>http://www.nabble.com/DTD-or-XSD-for-build-files-tf3224110.html
> #a8955279
>>Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>>---------------------------------------------------------------------
>>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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/DTD-or-XSD-for-build-files-tf3224110.html#a8967526
Sent from the Ant - Users mailing list archive at Nabble.com.


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