Campbell Ritchie wrote:
Not in its present state it can't. The formatting is really bad. Please format the whole thing correctly and post it again.Comal Rajagopalaratnam Muthukumar wrote:. . . I created java prg as under just to get a style-pattern /specimen sample
that can be developed further . . .
//package mtp;
Hi
Please go through the same code removing the two lines of code shown here below and
write the command to compile and execute the same compiled code to get the out put as under
// System.out.println ("Project proj:" + proj.getProject()); (this is to show it has a link with Ant api especially on execution)
//System.out.println ("Target targ:" + targ.getTarget()); (this is to show it has a link with Ant api especially on execution)
ie)
********************************
javac mtp/ChapterAntProjectTestDrive.java
java mtp/ChapterAntProjectTestDrive
**********************************
output
************************************
<project name="MyTask" base.dir="*.*" default="jar">
</project>
<target name="dist" depends="compile" />
</target>
**********************
As you see the build file so created contains only two lines of out put indicatiing a lot more to be java coded to get full build.xml
Also I mentioned (under the coded note)that this is not a classicalpattern of any type,but it is very raw And not formattedhully to any in its state and meant
for amateured developers only.
They are not to be treated as a regular pattern wih its format.
Thanks
AS
CRMK
No, thank you. It is your job to supply decent code, not mine.Comal Rajagopalaratnam Muthukumar wrote:. . . Please go through the same code removing the two lines . . .
So you are happy to write illegible code?And not formattedhully to any in its state and meant
for amateured developers only.
They are not to be treated as a regular pattern wih its format.
Thanks
AS
CRMK
Knute Snortum wrote:Your program really needs to be formatted correctly, I agree with Campbell here. Besides that, you have a method that looks like a constructor, and you are comparing variables to themselves.
Hi
This is the final modihied prg for your perusal with thanks
Building a buildfile for ant via java prg programatically using ant api
is rather rare and ant is not to be treated as a programming language
So formating the code was not main crieteria since execution and out put
were given priority while coding
Thanks
As
CRMK
Comal Rajagopalaratnam Muthukumar wrote:
Knute Snortum wrote:Your program really needs to be formatted correctly, I agree with Campbell here. Besides that, you have a method that looks like a constructor, and you are comparing variables to themselves.
Hi
In order to be a a result oriented lines of code as below
I have used File class
Also used less space
for perusal with thanks
As
CRMK
Hi
Though the java prg shown below is supposed to give buildfile
but it only compiles ok
So in order to validate this java prog
the build.xml (manually made) is used
It shows ok and build a jar file
So if any one is able to edit further this java program
to render build.xml
it is appreciatd with thanks
As
CRMK
Campbell Ritchie wrote:
Not in its present state it can't. The formatting is really bad. Please format the whole thing correctly and post it again.Comal Rajagopalaratnam Muthukumar wrote:. . . I created java prg as under just to get a style-pattern /specimen sample
that can be developed further . . .
Hi
So far we discussed about build file using java prg .
Though the programtic attempt ended with formaating error
Also no further try/edit was made by any one!Hence inplace of build.xml
a new way to explore ant build script file which were meticulaosly
coded with formating in particular But even here result is rather not so clear since the Null pointer
exception prevails proving that it is quite monumental.
In the event of making it successfull, i shall remain thankful
This is for your perusal with thanks
As
CRMK
Tim Moores wrote:I guess it's too late now, but https://coderanch.com/wiki/660363/Ant-Task contains a simple Ant task written in Java.
The lesson might be to search the FAQ before asking questions
Better late than nevever, but who will bell the cat!!!
Hi
The ant build file is helpless inspite of all the precautions duly
adhered thus leaving for any body who can give some shape
to make the java prog execute its task.to offer my bonus
Thanks
The details are as under viz., buildfile,java prg and the succesful out put
with a minute error
As
CRMK
