ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Day, Jem BGI SF" <Jem....@barclaysglobal.com>
Subject RE: Warn for includes not found?
Date Thu, 02 Oct 2003 20:36:57 GMT


It might make more sense to 'exclude' the files you don't want to 
compile, rather than trying to 'include' the ones you want.

Also, you could seperate you main and test code into seperate
directory structures. The you can have seperate ant targets
for bulding the main code, and the test code..

ie..

  src/main/org/company/MyClass.java
  src/test/org/company/TestMyClass.java

since both of these classes are in the same package
space then your inter-class access permissions are
preserved.

Just my $0.02

Jem..


-----Original Message-----
From: Leonardo Abreu de Barros [mailto:leobarros@email.com]
Sent: Wednesday, October 01, 2003 11:33 AM
To: ant-user@jakarta.apache.org
Subject: Re: Warn for includes not found?


Hi Sean,

I'm not sure if I understand your answer, so I'm sending you a snippet
to get things clearer.

I have the following xml: 
  <!-- Package bandeirabr.logic -->
  <property name="bandeirabr.logic" value="bandeirabr/logic"/>
  <patternset id="bandeirabr.logic">
    <include name="${bandeirabr.logic}/Role.java"/>
    <include name="${bandeirabr.logic}/User.java"/>
    <include name="${bandeirabr.logic}/UserException.java"/>
    <include name="${bandeirabr.logic}/Mispeled.java"/>
  </patternset>

  <target name="compile" depends="update">
    <javac srcdir="${src}" destdir="${build}" listfiles="true">
      <patternset refid="bandeirabr.logic"/>
    </javac>
  </target>

As you may see, the file "Mispeled.java" is missing an "l". In
consequence of this, it doesn't get compiled. What I need is something
that warns the programmer about his mistake.

thanks,
Leonardo.

--- In apache-ant@yahoogroups.com, "W. Sean Hennessy" <shennessy@g...>
wrote:
> Would not an exclude patternset help to identify file(s) that do not
match the naming convention in the javac patternset
> as a result of misspellings?
> The build.xml could then generate a warning if the exclude
patternset is not empty.
> 
> -----Original Message-----
> From: Leonardo Abreu de Barros [mailto:leobarros@e...] 
> Sent: Wednesday, October 01, 2003 8:14 AM
> To: ant-user@j...
> Subject: Warn for includes not found?
> 
> 
> Hi all,
> 
> I was requested to do something that I'm not sure if it's possible
using Ant... People here are giving a patternset to
> the javac task of source files to be compiled; this is because they
want to be allowed to have other java files in the
> source directories, test files for example, that shouldn't be
compiled during the project build. The problem is: when
> someone mispells a file name, Ant ignores it. As a result, the right
file isn't compiled. So, they want Ant to warn or
> crash when some include file is not found. Is there a simple way to
accomplish this?
> 
> thanks,
> Leonardo A. Barros
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@a...
> For additional commands, e-mail: user-help@a...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@a...
> For additional commands, e-mail: user-help@a...


---------------------------------------------------------------------
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


Mime
View raw message