Request - Native Java Script Support

2012-09-20 Thread Anders Rundgren
Dear Ant-Team,
I am an avid Ant user since more than 10 years back and I'm happy to see how it 
has progressed!

Recently I have begun writing very complex build scripts and found myself 
craving for a more programmatic solution which using Ant in standard 
configurations means using JavaScript or writing extensions.

In addition, I have also been using .NET tools like NAnt.

In NAnt there is no JavaScript support but there is support for native C#.

I find C# and Java much better for this purpose than JavaScript so my question 
is really:
Would it be completely unthinkable to add Java as a scripting language?
Since Ant already presumes JDK it doesn't sound completely undoable either.

Beanshell isn't an active project and I don't see any advantage with Beanshell 
compared to native Java.

Sincerely,
Anders Rundgren

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: Request - Native Java Script Support

2012-09-20 Thread Vimil Saju
Hi Anders,

Have you tried groovy script? I think groovy is completely compatible with 
java. That is any valid java code is valid groovy code too. 



 From: Anders Rundgren anders.rundg...@telia.com
To: dev@ant.apache.org 
Sent: Thursday, September 20, 2012 3:11 AM
Subject: Request - Native Java Script Support
 
Dear Ant-Team,
I am an avid Ant user since more than 10 years back and I'm happy to see how it 
has progressed!

Recently I have begun writing very complex build scripts and found myself 
craving for a more programmatic solution which using Ant in standard 
configurations means using JavaScript or writing extensions.

In addition, I have also been using .NET tools like NAnt.

In NAnt there is no JavaScript support but there is support for native C#.

I find C# and Java much better for this purpose than JavaScript so my question 
is really:
Would it be completely unthinkable to add Java as a scripting language?
Since Ant already presumes JDK it doesn't sound completely undoable either.

Beanshell isn't an active project and I don't see any advantage with Beanshell 
compared to native Java.

Sincerely,
Anders Rundgren

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Re: Request - Native Java Script Support

2012-09-20 Thread Anders Rundgren
On 2012-09-20 13:21, Vimil Saju wrote:
 Hi Anders,
 
 Have you tried groovy script? I think groovy is completely compatible with 
 java.
 That is any valid java code is valid groovy code too.

Hi Vimil,
I guess you refer to: http://groovy.codehaus.org ?

I haven't tried with Groovy script and my request is really about getting
a core feature already verified being useful in NAnt into the default Ant
installation so you can ship build scripts to anybody (having an upgraded
Ant NB...) without requiring yet another install.

It is quite possible that I'm wrong but it seems that this would something
like the javac and java targets combined so 90% of the code should already
be in place sort of :-)

IMO such a feature could extend the life of Ant considerably.  Nobody can beat
the power of a full-blown programming language!

Regards,
Anders

 
 
 
  From: Anders Rundgren anders.rundg...@telia.com
 To: dev@ant.apache.org 
 Sent: Thursday, September 20, 2012 3:11 AM
 Subject: Request - Native Java Script Support
  
 Dear Ant-Team,
 I am an avid Ant user since more than 10 years back and I'm happy to see how 
 it has progressed!
 
 Recently I have begun writing very complex build scripts and found myself 
 craving for a more programmatic solution which using Ant in standard 
 configurations means using JavaScript or writing extensions.
 
 In addition, I have also been using .NET tools like NAnt.
 
 In NAnt there is no JavaScript support but there is support for native C#.
 
 I find C# and Java much better for this purpose than JavaScript so my 
 question is really:
 Would it be completely unthinkable to add Java as a scripting language?
 Since Ant already presumes JDK it doesn't sound completely undoable either.
 
 Beanshell isn't an active project and I don't see any advantage with 
 Beanshell compared to native Java.
 
 Sincerely,
 Anders Rundgren
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
 For additional commands, e-mail: dev-h...@ant.apache.org
 


-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: Request - Native Java Script Support

2012-09-20 Thread Jeffrey E Care
Anders Rundgren anders.rundg...@telia.com wrote on 09/20/2012 07:55:13 
AM:

 I haven't tried with Groovy script and my request is really about 
getting
 a core feature already verified being useful in NAnt into the default 
Ant
 installation so you can ship build scripts to anybody (having an 
upgraded
 Ant NB...) without requiring yet another install.
 
 It is quite possible that I'm wrong but it seems that this would 
something
 like the javac and java targets combined so 90% of the code should 
already
 be in place sort of :-)
 
 IMO such a feature could extend the life of Ant considerably.  Nobody 
can beat
 the power of a full-blown programming language!

Why not just write a custom task? 

Re: Request - Native Java Script Support

2012-09-20 Thread Anders Rundgren
On 2012-09-20 15:11, Jeffrey E Care wrote:
 Anders Rundgren anders.rundg...@telia.com wrote on 09/20/2012 07:55:13 
 AM:
 
 I haven't tried with Groovy script and my request is really about getting
 a core feature already verified being useful in NAnt into the default Ant
 installation so you can ship build scripts to anybody (having an upgraded
 Ant NB...) without requiring yet another install.

 It is quite possible that I'm wrong but it seems that this would something
 like the javac and java targets combined so 90% of the code should 
 already
 be in place sort of :-)

 IMO such a feature could extend the life of Ant considerably.  Nobody can 
 beat
 the power of a full-blown programming language!
 
 Why not just write a custom task? 

Jeffrey,

I guess I knew that this idea wouldn't get a big hooray...

If you had tried NAnt you would probably agree that in-line Java
is cooler than custom tasks because you (can) have the entire script
in one file.

The proposal wasn't to satisfy my own needs but to serve a large base
of Ant users who are considering jumping the ship for Maven and other
tools.

Oh well.

Anders


-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: Request - Native Java Script Support

2012-09-20 Thread Jeffrey E Care
Anders Rundgren anders.rundg...@telia.com wrote on 09/20/2012 09:27:10 
AM:

 I guess I knew that this idea wouldn't get a big hooray...
 
 If you had tried NAnt you would probably agree that in-line Java
 is cooler than custom tasks because you (can) have the entire script
 in one file.
 
 The proposal wasn't to satisfy my own needs but to serve a large base
 of Ant users who are considering jumping the ship for Maven and other
 tools.

I doubt I would agree.

In my experience anything sufficiently complicated that it can't be 
handled by the standard tasks is going to require non-trivial custom code. 
No matter what technology I'm using to implement that custom code (e.g. 
javascript, java, groovy) I'm not going to want to clutter up my build.xml 
with it. I'm going to want to use my regular development tools to write 
that code.

Having operated in both the Ant  Maven worlds my answer is the same: if I 
need to do something custom in Ant I'm going to want to write a 
full-fledged custom task instead of trying to inline it in my build.xml; 
if I need to do something custom in Maven I'm going to want to write a 
full-fledged mojo instead of trying to inline it in my POM.

Re: Request - Native Java Script Support

2012-09-20 Thread Matt Benson
Some years ago Stefan Bodewig and Jan Materne worked on this:

http://svn.apache.org/repos/asf/ant/sandbox/javafront/

YMMV

Matt

On Thu, Sep 20, 2012 at 11:45 AM, Jeffrey E Care ca...@us.ibm.com wrote:
 Anders Rundgren anders.rundg...@telia.com wrote on 09/20/2012 09:27:10
 AM:

 I guess I knew that this idea wouldn't get a big hooray...

 If you had tried NAnt you would probably agree that in-line Java
 is cooler than custom tasks because you (can) have the entire script
 in one file.

 The proposal wasn't to satisfy my own needs but to serve a large base
 of Ant users who are considering jumping the ship for Maven and other
 tools.

 I doubt I would agree.

 In my experience anything sufficiently complicated that it can't be
 handled by the standard tasks is going to require non-trivial custom code.
 No matter what technology I'm using to implement that custom code (e.g.
 javascript, java, groovy) I'm not going to want to clutter up my build.xml
 with it. I'm going to want to use my regular development tools to write
 that code.

 Having operated in both the Ant  Maven worlds my answer is the same: if I
 need to do something custom in Ant I'm going to want to write a
 full-fledged custom task instead of trying to inline it in my build.xml;
 if I need to do something custom in Maven I'm going to want to write a
 full-fledged mojo instead of trying to inline it in my POM.

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: Request - Native Java Script Support

2012-09-20 Thread Anders Rundgren
On 2012-09-20 18:45, Jeffrey E Care wrote:
 Anders Rundgren anders.rundg...@telia.com wrote on 09/20/2012 09:27:10 
 AM:
 
 I guess I knew that this idea wouldn't get a big hooray...

 If you had tried NAnt you would probably agree that in-line Java
 is cooler than custom tasks because you (can) have the entire script
 in one file.

 The proposal wasn't to satisfy my own needs but to serve a large base
 of Ant users who are considering jumping the ship for Maven and other
 tools.
 
 I doubt I would agree.
 
 In my experience anything sufficiently complicated that it can't be 
 handled by the standard tasks is going to require non-trivial custom code. 
 No matter what technology I'm using to implement that custom code (e.g. 
 javascript, java, groovy) I'm not going to want to clutter up my build.xml 
 with it. I'm going to want to use my regular development tools to write 
 that code.
 
 Having operated in both the Ant  Maven worlds my answer is the same: if I 
 need to do something custom in Ant I'm going to want to write a 
 full-fledged custom task instead of trying to inline it in my build.xml; 
 if I need to do something custom in Maven I'm going to want to write a 
 full-fledged mojo instead of trying to inline it in my POM.
 

We all do our choices.  The request was simply about extending the
range of those :-)

Anders

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org