Re: AW: Need documentation change for if / unless

2008-02-05 Thread Dean Schulze
Rainer,

You couldn't be more wrong about the lack of documentation of the non-use of 
the ${} notation in if / unless.

The section about targets DOES NOT say that you don't use the ${} notation for 
if / unless.  It does say this, however:

'This is done by placing the property name between ${ and } in the 
attribute value.'

which leads you to believe that you need ${} notation wherever you need a 
property in an attribute, such as in if / unless.

How about helping your users out and making it clear that you don't use ${} 
notation with if / unless, in marked contrast to everywhere else in Ant.

Since if / unless are apparently the only place in Ant where you don't use ${} 
notation that fact should also be pointed out explicitly so people don't forget 
the ${} notation elsewhere.




Rainer Noack [EMAIL PROTECTED] wrote: Hi Dean,

${} refers to the value of a property.
if / unless attributes refers to the existence (i.e. name) of a property.

IMHO, the different notation is reasonable.

However, this syntax and behaviour is pointed out explicitely in the manual:
-Using Ant-Targets

Cheers

Rainer

-Ursprüngliche Nachricht-
Von: Dean Schulze [mailto:[EMAIL PROTECTED] 
Gesendet: Samstag, 2. Februar 2008 16:15
An: dev@ant.apache.org
Betreff: Need documentation change for if / unless


I filed this bug regarding the use of the if and unless attributes of
:

http://issues.apache.org/bugzilla/show_bug.cgi?id=44315

Matt Benson pointed out that the problem is that you don't use the ${}
notation when naming a property in an if or unless attribute.  This is
confusing because everywhere else in Ant when you reference a property you
use the ${} notation.

The documentation for Targets doesn't mention this:

http://ant.apache.org/manual/using.html#targets

The fact that you don't use ${} notation for the if / unless attributes
needs be made explicit in the documentation.

Are there any other places where you use a property without using the ${}
notation?  If so these also need to be made explicit.  If the if / unless
attributes are the only place where this applies that should also be noted
in the documentation for if / unless.

Thanks.

Dean


   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it
now.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



   
-
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.

Need documentation change for if / unless

2008-02-02 Thread Dean Schulze

I filed this bug regarding the use of the if and unless attributes of target:

http://issues.apache.org/bugzilla/show_bug.cgi?id=44315

Matt Benson pointed out that the problem is that you don't use the ${} notation 
when naming a property in an if or unless attribute.  This is confusing because 
everywhere else in Ant when you reference a property you use the ${} notation.

The documentation for Targets doesn't mention this:

http://ant.apache.org/manual/using.html#targets

The fact that you don't use ${} notation for the if / unless attributes needs 
be made explicit in the documentation.

Are there any other places where you use a property without using the ${} 
notation?  If so these also need to be made explicit.  If the if / unless 
attributes are the only place where this applies that should also be noted in 
the documentation for if / unless.

Thanks.

Dean


   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: [Ant-contrib-developers] Re: Ant-contrib for ANT1.6

2003-12-11 Thread Dean Hiller
I don't know which list this came from so I am replying to this 
cross-post.  PLEASE DO NOT reply to everyone.  Instead just reply to the 
ant-contrib list if you have more questions. 

I fixed the issue with compilewithwalls not being compatible with 1.3.  
You can build from source until a new release of ant-contrib comes out.  
I apologize for that mistake.  I likewise don't pay attention to the 
bugs and only read e-mails on the ant-contrib-developer list.
thanks,
dean

Stefan Bodewig wrote:
On Wed, 10 Dec 2003, Jose Alberto Fernandez
[EMAIL PROTECTED] wrote:
 

(I have filed bugs on antcontrib's site)
   

Cross-posting to the dev list may have been more efficient.  I for one
don't use SF's bug tracking system at all and only look over the
reports there once every few weeks.
 

If there is anyone out here that can influence the project
out there,
   

Well, Peter and myself are committers, but releases have been put
together (and decided on) by Matt and only Matt so far.
I'll forward you post to the dev list and will look into the JDK
issue.
Stefan
---
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/
___
Ant-contrib-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers
 



Re: ant task submission....compilewithwalls

2003-08-27 Thread Dean Hiller
   ok, I am a moron.  I think I ran into the top of that when looking 
for guidelines and must not have looked down far enough.  My apologies 
for being annoying.
   Anyways, what you are saying kind of worries me.  I have no where to 
really post this then?  I have a feeling this ant task is just going to 
end up being used by me because I can't put it in some open source 
repository to share it with others.  this is a self-contained task 
unlike most other tasks out there so I don't think it would be too hard 
to include it.  People can still e-mail me for support which is why I 
put my e-mail there, or just assign me the bugs that come in or something.
   How should I handle this then?  I have attached the new task, which 
has the apache licenses.  I formatted the code to the java standard, and 
I added about 5 tests.  There are extra .java files for testing purposes 
which I put in src/etc also.  I packaged it so it can be unzipped easily 
into an ant structure as long as you have workareas/ant1.5.4.(I couldn't 
figure out that part of winzip-winzip illiterate).  I will file a bug 
and attach the zip file there too like the document you referred to me said.
thanks for all your input on this,
Dean

Steve Loughran wrote:
[EMAIL PROTECTED] wrote:
Confused by what you are asking. please see my questions below.


I wrote this task in a few hours.  (Testing took a little longer).  I
didn't think of using the depends and going that route.  That might have
been a good idea.  I would have had to do alot of comparisons.  That is
something I didn't have to do with the route I did take which was just
using javac on the different packages.  javac naturally failed the build
when it couldn't compile due to bad dependencies.
Is there a process for acceptance of a new task into ant?  How does this
work?  Still need to fix my bug and write a test case, but after that???
thanks for any input here.
dean

Yes, the rules are documented in your CVS tree; look for 
ant-task-guidelines.

The hard thing to do is convince everyone not that what you have 
written is a good idea, but that it should go into the repository. 
Nowadays the aim is to keep the explosion of optional tasks under 
control, primarily because it caused too much support grief. Instead 
we prefer for people to host their code wherever, and we point to it; 
This is why the core of ant being enhanced to make it easier to load 
plug in libraries.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

attachment: compilewithwalls.zip
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: ant task submission....compilewithwalls

2003-08-27 Thread Dean Hiller
interesting.  I never knew that existed.  That actually kind of scares 
me because I am someone who constantly investigates knew things out in 
the open source community like Abbot, Subversion, castor, and 
cruisecontrol(back when it was alpha).  Ant-contrib was something I 
never noticed.  It was not in ant's list of external docs nor was there 
a link from the manual.  There may be some really good tasks in there, 
but I never knew about it. 
   Can I suggest trying something new possibly?  ant-contrib might be a 
good idea, but is it possible to have the ant manual contain(ant 
repository still would NOT contain the jars such as ant-contrib, just docs)
1.  Core Tasks
2.  Optional Tasks
3.  External Self-Contained Tasks
4.  External Tasks
Then, people who write tasks can put the task in ant-contrib and post 
the documentation to ant, so at least it can get some visibility.  
People could also include download links to the jars from the manual, to 
download the additional things needed.  I think this would be very 
useful.  Another option might be to employ maven and have ant's build 
download the external docs?  In the meantime, I will send a mail off to 
ant-contrib.
   I have one more suggestion.  Ant contrib was saying I have to change 
the build file.  It would be really nice if the only thing we had to do 
was drop in the ant-contrib jar in the lib directory of ant, and ant 
used a different classloader to read out of unknown jars to check the 
tasks.properties file, and if there was one automatically add the tasks 
without changes to the build file.  I don't think it's that hard to do.  
Search lib directory for jars not called ant.jar and optional.jar, and 
then load that jar in a different class loader just to get the 
properties file and read it in to get all the tasks.  What do you think?
thanks,
dean

Erik Hatcher wrote:
On Tuesday, August 26, 2003, at 08:45  PM, Dean Hiller wrote:
   ok, I am a moron.  I think I ran into the top of that when looking 
for guidelines and must not have looked down far enough.  My 
apologies for being annoying.
   Anyways, what you are saying kind of worries me.  I have no where 
to really post this then?  I have a feeling this ant task is just 
going to end up being used by me because I can't put it in some open 
source repository to share it with others.  this is a self-contained 
task unlike most other tasks out there so I don't think it would be 
too hard to include it.  People can still e-mail me for support which 
is why I put my e-mail there, or just assign me the bugs that come in 
or something.
   How should I handle this then?

Perhaps lobbying to have it added to ant-contrib at Sourceforge?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ant task submission....compilewithwalls

2003-08-27 Thread Dean Hiller
interesting.  I have seen that before and know remember it.  I neveer 
looked into it because I thought it was for C/C++ and saw that and 
stayed away from it.  Almost wish the description didn't have C/C++ and 
I would have taken a look. 
thanks for the info,
dean

Stefan Bodewig wrote:
On Wed, 27 Aug 2003, Dean Hiller [EMAIL PROTECTED] wrote:
 

It was not in ant's list of external docs nor was there a link from
the manual.
   

It's linked from the related projects page.
 

I have one more suggestion.  Ant contrib was saying I have to change
the build file.  It would be really nice if the only thing we had to
do was drop in the ant-contrib jar
   

Work for this is in progress for CVS HEAD.  In particular, pretty much
of it is already in place but not yet documented at all.
It will work by using a different namespace for those tasks and a
special URI for the namespace that tells Ant where to look for the
antlib descriptor that contains task (and other) definitions.
Stefan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: ant task submission....compilewithwalls

2003-08-27 Thread Dean Hiller
with the upcoming changes in ant, I don't mind throwing it in 
ant-contrib.  If anybody wants to mode it to the ant optional tasks 
later, I am fine with that.  I am going to try to get it into 
ant-contrib now, and get on with my other tasks for my open source 
project.  If you do convince anyone though, let me know.  I would be 
happy to support this task with bug fix and it's respective test case.
thanks,
dean

Steve Loughran wrote:
Dean Hiller wrote:
   ok, I am a moron.  I think I ran into the top of that when looking 
for guidelines and must not have looked down far enough.  My 
apologies for being annoying.

No, dont worry about that.
   Anyways, what you are saying kind of worries me.  I have no where 
to really post this then?  I have a feeling this ant task is just 
going to end up being used by me because I can't put it in some open 
source repository to share it with others.  

I actually really like the idea. You are not just wrapping some 
existing code in Ant, you are bringing a whole new stage to the build 
process -that of validating that bits of your project are separate.

As I said, I think a .class based approach would also be interesting, 
but it has the weakness that it doesnt detect imported constants, 
which could be an issue in some projects.

And, since you have tests and docs, it is more mature than many 
submissions. Ones without tests are always trouble as the author 
thinks they are ready to ship, but whoever takes on the role of 
committing the stuff ends up being responsible for the tests. Which 
reminds me, I have to write those tests for assertion support in Java :)

So I'll ask what other people think...
this is a self-contained task unlike most other tasks out there so I 
don't think it would be too hard to include it.  People can still 
e-mail me for support which is why I put my e-mail there, or just 
assign me the bugs that come in or something.
   How should I handle this then?  I have attached the new task, 
which has the apache licenses.  I formatted the code to the java 
standard, and I added about 5 tests.  There are extra .java files for 
testing purposes which I put in src/etc also.  I packaged it so it 
can be unzipped easily into an ant structure as long as you have 
workareas/ant1.5.4.(I couldn't figure out that part of winzip-winzip 
illiterate).  I will file a bug and attach the zip file there too 
like the document you referred to me said.
thanks for all your input on this,
Dean


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ant task submission....compilewithwalls

2003-08-27 Thread Dean Hiller
I had another suggestion on this front.  Why don't we open up another 
module on apache for ant-contrib where the ant-contrib people have 
commiting access too?  Just trying to bring the ant-contrib project 
closer as it seems highly related to ant.  I found a task I had been 
looking for a long time ago and never knew about ant-contrib which had 
it.  I am just really dissapointed news about ant-contrib is not 
widespread(regardless of whether they accept my task or not, haven't 
asked them that yet). 
thanks for listening at any rate,
Dean

Erik Hatcher wrote:
On Tuesday, August 26, 2003, at 08:45  PM, Dean Hiller wrote:
   ok, I am a moron.  I think I ran into the top of that when looking 
for guidelines and must not have looked down far enough.  My 
apologies for being annoying.
   Anyways, what you are saying kind of worries me.  I have no where 
to really post this then?  I have a feeling this ant task is just 
going to end up being used by me because I can't put it in some open 
source repository to share it with others.  this is a self-contained 
task unlike most other tasks out there so I don't think it would be 
too hard to include it.  People can still e-mail me for support which 
is why I put my e-mail there, or just assign me the bugs that come in 
or something.
   How should I handle this then?

Perhaps lobbying to have it added to ant-contrib at Sourceforge?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ant task submission....compilewithwalls

2003-08-27 Thread Dean Hiller
yeah, I think you are probably right :).  I think the way it is now is 
fine.  I just never looked at ant-contrib due to it's description.
dean

[EMAIL PROTECTED] wrote:
   Can I suggest trying something new possibly?  ant-contrib 
might be a 
good idea, but is it possible to have the ant manual contain(ant 
repository still would NOT contain the jars such as 
ant-contrib, just docs)
1.  Core Tasks
2.  Optional Tasks
3.  External Self-Contained Tasks
4.  External Tasks
Then, people who write tasks can put the task in ant-contrib and post 
the documentation to ant, so at least it can get some visibility.  
People could also include download links to the jars from the 
manual, to 
download the additional things needed.  I think this would be very 
useful.  
   

I don´t think that is a good idea. There are so many different projects
with their tasks (and their own doc-style). Therefore you have
- multiple styles
- very often changes
But do you know the External Tools and Tasks page on the homepage?
http://ant.apache.org/external.html
 

   I have one more suggestion.  Ant contrib was saying I 
have to change 
the build file.  It would be really nice if the only thing we 
had to do 
was drop in the ant-contrib jar in the lib directory of ant, and ant 
used a different classloader to read out of unknown jars to check the 
tasks.properties file, and if there was one automatically add 
the tasks 
without changes to the build file.  I don't think it's that 
hard to do.  
Search lib directory for jars not called ant.jar and 
optional.jar, and 
then load that jar in a different class loader just to get the 
properties file and read it in to get all the tasks.  What do 
you think?
   

We (or more the other :-) are working on something called ant libs 
(or something similiar). I think that should do that job.

Jan
 



Re: ant task submission....compilewithwalls

2003-08-27 Thread Dean Hiller
At some point in the future, when the antlib concept is ready for
prime time, we may have tasks that are part of Ant but maintained and
distributed independently of Ant, which will remove many of the
obstacles you currently face.

COOL.
Apart from ant-contrib and other projects around Ant, you can always
get an account and starts a project at sourceforge or savannah (you
seem to like the GPL) or whichever.com or codehaus.org or ...
I wouldn't say I really like the GPL.  I know I love the apache one.  
Didn't mean to accidentally put that in there.  It was for something else.  
Each license has it's uses. :)
And you can keep explaining and convincing the Ant committers that
your task should become a part of Ant itself.
It's not that important.  I just believe I should post it somewhere for 
others to use.  I will be sending mail to ant-contrib right after this 
and see what happens.
thanks for all your guys' comments and help,
dean

Stefan Bodewig wrote:
On Tue, 26 Aug 2003, Dean Hiller [EMAIL PROTECTED] wrote:
 

My apologies for being annoying.
   

There is no other way to lobby people than to be annoying if they
don't react.  Don't worry 8-)
 

I have no where to really post this then?
   

Apart from ant-contrib and other projects around Ant, you can always
get an account and starts a project at sourceforge or savannah (you
seem to like the GPL) or whichever.com or codehaus.org or ...
And you can keep explaining and convincing the Ant committers that
your task should become a part of Ant itself.
At some point in the future, when the antlib concept is ready for
prime time, we may have tasks that are part of Ant but maintained and
distributed independently of Ant, which will remove many of the
obstacles you currently face.
Stefan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: how to programatically temporarily turn off logging

2003-08-26 Thread Dean Hiller
thanks Dominique.  I think I have to go your suggested route instead.  
The previous suggestion by Jan was really good, but turned out I would 
have to worry too much about cloning the project properties and alot of 
other stuff.  I did especially like the debug you added too  fits in 
right with what I want.
thanks,
dean

Dominique Devienne wrote:
A little hackish, but this works...
Redirects the INFO output to VERBOSE. --DD
 /** Silent version of lt;unzipgt;. */
 private static class SilentExpand extends Expand {
   public void log(String msg) {   
 super.log(msg, Project.MSG_VERBOSE);   
   }
   public void log(String msg, int level) {   
 super.log(msg, (level==Project.MSG_INFO? Project.MSG_VERBOSE: level));
   }
 } // END class DspModuleInstall.SilentExpand

 

-Original Message-
From: Dean Hiller [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 8:27 AM
To: [EMAIL PROTECTED]
Subject: how to programatically temporarily turn off logging
I have a task that uses the move tasks.  How do I turn off logging from
the Move task?
I typically will only let the move task log when the user selects
verbose or debug or something.  Otherwise, there is just too much
logging coming out of my new ant task.
thanks,
dean
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



ant task submission....compilewithwalls

2003-08-26 Thread Dean Hiller
Hello,
   What is the acceptance process of a new task?  I would like to put 
this task in the ant repository for anybody else who needs it.  I have 
attached the task, tests and doc for it.  I have put in the apache 
licenses and stuff also.
thanks,
dean

/*
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
 * reserved.
 *
 * 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 acknowlegement:
 *   This product includes software developed by the
 *Apache Software Foundation (http://www.apache.org/).
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names Ant and Apache Software
 *Foundation 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 Apache
 *nor may Apache appear in their names without prior written
 *permission of the Apache Group.
 *
 * 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 APACHE SOFTWARE FOUNDATION 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 software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * http://www.apache.org/.
 */
package org.apache.tools.ant.taskdefs.optional.walls;

import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;


/*
 * Created on Aug 24, 2003
 *
 * To change the template for this generated file go to
 * Windowgt;Preferencesgt;Javagt;Code Generationgt;Code and Comments
 */
/**
 * FILL IN JAVADOC HERE
 *
 * @author $Author: deanhiller $
 * @version $ProductVersion:$ $FileVersion:$ $Revision: $ $Date: $
 * @since $ProductVersionCreated:$ Aug 24, 2003
 */
public class Walls {

private List packages = new LinkedList();
private Map nameToPackage = new HashMap();

public void addConfiguredPackage(Package p) {

String pack = p.getPackage();
if(!pack.endsWith(.*)  !pack.endsWith(.**))
p.setFaultReason(The package='+pack+' must end with 
+.* or .** such as 
biz.xsoftware.* or 
+biz.xsoftware.**);

String[] depends = p.getDepends();
if(depends == null) {
nameToPackage.put(p.getName(), p);
packages.add(p);
return;
} 

//make sure all depends are in Map first
//circular references then are not a problem because they must
//put the stuff in order
for(int i = 0; i  depends.length; i++) {
Package dependsPackage = 
(Package)nameToPackage.get(depends[i]);

if(dependsPackage == null) {
p.setFaultReason(package name=+p.getName()+ 
did not have 
+depends[i]+ listed before it 
and cannot compile without it);
} else

p.addExcludesElement(dependsPackage.getPackage());
}

nameToPackage.put(p.getName(), p);
packages.add(p

Re: ant task submission....compilewithwalls

2003-08-26 Thread Dean Hiller




yeah, that's weird. I see the html file in my sent mail, but once I
received it back from the list, it is not there.

So anyways, here is the summary. In a project, there can be lots of
modules and it is important to make sure the designs are not violated.
certain packages depend on other certain packages. Sometimes we
accidentally put dependencies were we did not mean to put them. At an
architectural level we prevent this by putting stuff like server,
client, and api in three totally separate source trees so that the
client doesn't depend directly on the server but depends on the api
only. CompileWithWalls is designed to put up the walls at the design
level. Basically, lets say your server has a player, recorder and a
mediasession that uses both. player should not depend on recorder and
recorder should not depend on player.

Here are the packages.
biz.xsoftware.media.player
biz.xsoftware.media.recorder
biz.xsoftware.media

Currently if they are all in the same source tree, people may
accidentally introduce dependencies between recorder and player making
them unreusable and violating the design laid out. compilewithwalls is
defined like so to prevent this

compilewithwalls 
 walls 
 package name="modA" package="biz.xsoftware.mod.modA"/ 
 package name="modB" package="biz.xsoftware.mod.modB"/ 
 package name="mod" package="biz.xsoftware.mod"
depends="modA,modB"/ 
 /walls 
 javacNORMAL Javac task with same params/javac
/compilewithwalls

Notice closely that all the dependencies of the packages are clearly
stated in the walls element. If many people start to like this, there
may be a walls attribute later specifying the file with the walls
element of dependencies. The above guaranteed that modA will not be
able to put code in that depends on modB and vice versa. It also
allows code to be put in mod that depends on modA and modB.

Another common use would be in a common module. I just put these same
walls up and was disgusted by some package dependencies I accidentally
introduced. This helps me prevent myself from doing it.

Currently at work we prevent this same thing by having separate source
trees and people are complaining up a storm. The thing is when we went
to that structure we realized all these dependencies that we didn't
want existed. This helps with that problem of allowing one to keep one
source tree and put up walls that prevent other packages to be used
from certain packages that are supposed to be independent.

what do you think? I already know my company wants to use it, a friend
at another company wants to use it, and I want to use it on my open
source project also. I am curious what others think. I hope you will
try it on your common module and see what dependencies pop up.

I have attached the a zip this time with everything in it including the
html file so it doesn't get stripped.
thanks,
dean




Conor MacNeill wrote:

  On Tue, 26 Aug 2003 01:22 pm, Dean Hiller wrote:
  
  
Hello,
What is the acceptance process of a new task?  I would like to put
this task in the ant repository for anybody else who needs it.  I have
attached the task, tests and doc for it.  I have put in the apache
licenses and stuff also.
thanks,

  
  
I don't see any docs (may have been removed by list manager) Could you give us 
a quick summary of what this task is for?

Conor



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



attachment: ant-submission.zip
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: ant task submission....compilewithwalls

2003-08-26 Thread Dean Hiller
actually, you probably can't use the task right now without a 
workaround.  Found a bug that didn't exist in my eclipse environment 
with the task.  The work around if you want to try it is to create the 
build directory and put a file in the build directory.  For some reason, 
the task is deleting javac's destdir if destdir is empty.
Dean

Dean Hiller wrote:
yeah, that's weird.  I see the html file in my sent mail, but once I 
received it back from the list, it is not there.

So anyways, here is the summary.  In a project, there can be lots of 
modules and it is important to make sure the designs are not 
violated.  certain packages depend on other certain packages.  
Sometimes we accidentally put dependencies were we did not mean to put 
them.  At an architectural level we prevent this by putting stuff like 
server, client, and api in three totally separate source trees so that 
the client doesn't depend directly on the server but depends on the 
api only.  CompileWithWalls is designed to put up the walls at the 
design level.  Basically, lets say your server has a player, recorder 
and a mediasession that uses both.  player should not depend on 
recorder and recorder should not depend on player.

Here are the packages.
biz.xsoftware.media.player
biz.xsoftware.media.recorder
biz.xsoftware.media
Currently if they are all in the same source tree, people may 
accidentally introduce dependencies between recorder and player making 
them unreusable and violating the design laid out.  compilewithwalls 
is defined like so to prevent this

compilewithwalls
 walls
package name=modA package=biz.xsoftware.mod.modA/
package name=modB package=biz.xsoftware.mod.modB/
package name=mod  package=biz.xsoftware.mod 
depends=modA,modB/
 /walls
 javacNORMAL Javac task with same params/javac
/compilewithwalls

Notice closely that all the dependencies of the packages are clearly 
stated in the walls element.  If many people start to like this, there 
may be a walls attribute later specifying the file with the walls 
element of dependencies.  The above guaranteed that modA will not be 
able to put code in that depends on modB and vice versa.  It also 
allows code to be put in mod that depends on modA and modB.

Another common use would be in a common module.  I just put these same 
walls up and was disgusted by some package dependencies I accidentally 
introduced.  This helps me prevent myself from doing it.

Currently at work we prevent this same thing by having separate source 
trees and people are complaining up a storm.  The thing is when we 
went to that structure we realized all these dependencies that we 
didn't want existed.  This helps with that problem of allowing one to 
keep one source tree and put up walls that prevent other packages to 
be used from certain packages that are supposed to be independent.

what do you think?  I already know my company wants to use it, a 
friend at another company wants to use it, and I want to use it on my 
open source project also.  I am curious what others think.  I hope you 
will try it on your common module and see what dependencies pop up.

I have attached the a zip this time with everything in it including 
the html file so it doesn't get stripped.
thanks,
dean


Conor MacNeill wrote:
On Tue, 26 Aug 2003 01:22 pm, Dean Hiller wrote:
 

Hello,
   What is the acceptance process of a new task?  I would like to put
this task in the ant repository for anybody else who needs it.  I have
attached the task, tests and doc for it.  I have put in the apache
licenses and stuff also.
thanks,
   

I don't see any docs (may have been removed by list manager) Could you give us 
a quick summary of what this task is for?

Conor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ant task submission....compilewithwalls

2003-08-26 Thread dean
Confused by what you are asking. please see my questions below.

 Nicola Ken Barozzi wrote:

 Dean Hiller wrote, On 26/08/2003 13.59:
 ...

 Currently at work we prevent this same thing by having separate source
 trees and people are complaining up a storm.

 ...

 This helps with that problem of allowing one to keep one source tree
 and put up walls that prevent other packages to be used from certain
 packages that are supposed to be independent.


 I like it. :-)

 I have never liked keeping separate directories for things, even if I do
 it for the benefit it has in build separation.


 I like a good layout of project.model. and project.view. trees; any
 instance of .view packages in the model class is a complete failure of
 separation and easily caught. But having more rigorous meta-rules is
 interesting.

Yeah, so I thought, until a developer once put a dependency in that caused
me a huge headache to get it back out.

 Would it need to be a compile time process, or something you can do just
 by processing the source or even the class files, a la depends?

I wrote this task in a few hours.  (Testing took a little longer).  I
didn't think of using the depends and going that route.  That might have
been a good idea.  I would have had to do alot of comparisons.  That is
something I didn't have to do with the route I did take which was just
using javac on the different packages.  javac naturally failed the build
when it couldn't compile due to bad dependencies.

Is there a process for acceptance of a new task into ant?  How does this
work?  Still need to fix my bug and write a test case, but after that???
thanks for any input here.
dean




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ant task submission....compilewithwalls-1

2003-08-26 Thread Dean Hiller
sorry, my open source project's license slipped in because I use a template
for that project and forgot to change one file and take it out.
  I will resubmit this with the apache license.
thanks,
Dean
Steve Loughran wrote:
Dean,
GPL licenses arent allowed in Apache source; we cannot even import 
LGPL code.

/*
Copyright (c) 2002, Dean Hiller
All rights reserved.
*
IF YOU MAKE CHANGES TO THIS CODE AND DO NOT POST THEM, YOU WILL BE IN 
VIOLATION OF THE LICENSE I HAVE GIVEN YOU.  Contact
me at [EMAIL PROTECTED] if you need a different
license.
*

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
02111-1307, USA.

Also, just to clarify a point in the GNU license, this software can 
only be bundled with your software if your software is free.

*/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


reverse FileSet utility?

2003-08-25 Thread Dean Hiller
Is there a reverse FileSet Utility somewhere in the code?  Writing an 
ant task and I want to take a FileSet and make it's inverse.  I couldn't 
find one.
thanks,
dean


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: trying to get access to fileset from new task to javac task

2003-08-25 Thread Dean Hiller
I am compiling the same src directory every time, but with different 
patterns.

Javac uses the FileSet in MatchingTask.  I currently have a hack into 
MatchingTask adding
   public void putNewFileSet(FileSet set) {
   fileset = set;
   }
because I am not sure how to change out the FileSet of patterns.  Above 
works for me, but is there an easier way ***without changing the ant 
base*** to get what I want. 

Your last statement is exactly my intention.
thanks,
dean

Stefan Bodewig wrote:
On Sun, 24 Aug 2003, Dean Hiller [EMAIL PROTECTED] wrote:
 

I am writing a new task that happens to wrap javac and call it a few
times.  Is there any way to clear the FileSet?
   

javac doesn't use a FileSet at all, or it uses a fresh FileSet for all
src and srcdir entries - depends on how you look at it.
 

Short story is I want to reuse the same javac with all the same
parameters compiling a different fileset each time.
   

Compiling a different src directory?
 

Maybe it would be ok to put a public clearFileSet in
MatchingTask.java???
   

That would only affect the include/exclude patterns but nothing else.
Stefan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



how to programatically temporarily turn off logging

2003-08-25 Thread Dean Hiller
I have a task that uses the move tasks.  How do I turn off logging from 
the Move task?

I typically will only let the move task log when the user selects 
verbose or debug or something.  Otherwise, there is just too much 
logging coming out of my new ant task.
thanks,
dean


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: reverse FileSet utility?

2003-08-25 Thread Dean Hiller
actually I was looking for an easy way to take one FileSet and create 
another FileSet where everything was the opposite.  I needed to pass 
these FileSets to other ant tasks.  At any rate, I discovered a 
different method 5 seconds before your e-mail and just finished it.  It 
is not as clean as a
FileSet normal;
FileSet inverse = normal.getInverseFileSet();
call, but I think it will do fine for now.
thanks,
dean

Stefan Bodewig wrote:
On Sun, 24 Aug 2003, Dean Hiller [EMAIL PROTECTED] wrote:
 

Writing an ant task and I want to take a FileSet and make it's
inverse.
   

What is the inverse of a FileSet?
The set of files that are not in the FileSet?  See the not selector
or the getNotIncludedFiles and getExcludedFiles methods in
DirectoryScanner.
Stefan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



RE: how to programatically temporarily turn off logging

2003-08-25 Thread dean
thanks, sounds like a good idea.  I think that will work.
dean

 No idea, but a few thoughts:
 - don´t call perform(); instead call execute()
 - create a new Project instance with no loggers and call
 move.setProject(noLoggerProject)
 - maybe you can do something with the Redirector class


 Jan




 -Original Message-
 From: Dean Hiller [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 25, 2003 3:27 PM
 To: [EMAIL PROTECTED]
 Subject: how to programatically temporarily turn off logging


 I have a task that uses the move tasks.  How do I turn off
 logging from
 the Move task?

 I typically will only let the move task log when the user selects
 verbose or debug or something.  Otherwise, there is just too much
 logging coming out of my new ant task.
 thanks,
 dean



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



trying to get access to fileset from new task to javac task

2003-08-24 Thread Dean Hiller
I am writing a new task that happens to wrap javac and call it a few 
times.  Is there any way to clear the FileSet?  or possibly retrieve the 
FileSet from Javac's superclass(MatchingTask)?  The getImplicitFileset() 
was protected and there doesn't seem to be a clear function on the 
MatchingTask to clear the FileSet.  Couldn't find anything in Javac 
either.  Is there a way to clone Javac that I am not aware of???

Short story is I want to reuse the same javac with all the same 
parameters compiling a different fileset each time.  Maybe it would be 
ok to put a public clearFileSet in MatchingTask.java???  I do plan on 
submitting my ant task back into ant when done.
thanks for any advice on this,
dean


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]