You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Roli bluewin <ro...@bluewin.ch> on 2004/03/11 22:26:37 UTC

simulating multiple output dirs

Hello

 

I would like to move some of the compiled classes to another directory.
Thereby I have the following problem

After running java:compile  I use ant:move to move away some class files.
This works but when I rerun java:compile the class files which have been
moved away are not recompiled?! Any hints??

 

Thank you

 

 


Re: AW: simulating multiple output dirs

Posted by Brian Enigma <en...@netninja.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

     I do not notice anything in your pre/post goals that really jumps  
out at me as being incorrect.  I was faced with a similar situation a  
week or two ago  
(http://nagoya.apache.org/eyebrowse/ReadMsg? 
listName=users@maven.apache.org&msgNo=10997): multiple packages in a  
project, and some class files needing to go one place, some to another,  
etc.  I instead used multiple project.xml files (with a single  
super-project.xml that runs all the smaller project.xml files).  Each  
of these small project.xml files would filter on the input side, using  
<sourceModifications>, rather than filter on the output side, for  
instance by moving things around or selectively jar'ing classes, or  
whatever.  Maybe this alternate method might work to get you toward  
your final result?  If you think it will help, let me know off-list and  
I can send you a couple of the build files for the above-mentioned  
project.
  -Brian

On Mar 11, 2004, at 11:27 PM, Roland Berger wrote:

> Hi Brian
>
> Yes, that's the way I'm doing it (see below). I have to say that those
> sources which are not recompiled after the move, are in the second  
> source
> dir which is added to 'maven.compile.src.set' in the preGoal to
> java:compile. May be the second source dir is the problem!?
>
> WDYT
>
> Thank's
> Roland
>
>   <preGoal name="java:compile">
>         <ant:path id="persistent.source.dir"
> location="${persistent.src.dir}"/>
>         <maven:addPath id="maven.compile.src.set"
> refid="persistent.source.dir"/>
>   </preGoal>
>
>   <!--  POST GOAL JAVA:COMPILE-->
>   <postGoal name="java:compile">
>      <ant:move todir="${enhancer.input.dir}">
>       <fileset dir="${maven.build.dest}">
>         <include  
> name="ch/sardusvini/shop/productspec/business/*.class"/>
>       </fileset>
>       <fileset dir="${maven.build.dest}">
>         <include name="ch/sardusvini/shop/ordering/business/*.class"/>
>       </fileset>
>     </ant:move>
>   </postGoal>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFAUeN50dKNWt3rpSURAkw2AJ9/IpscJPbMcJldxuF5yikQ0SDtHgCZAfW0
aZPaZ90HErb7CidIdtNEM9g=
=0h/U
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


AW: simulating multiple output dirs

Posted by Roland Berger <ro...@bluewin.ch>.
Hi Brian

Yes, that's the way I'm doing it (see below). I have to say that those
sources which are not recompiled after the move, are in the second source
dir which is added to 'maven.compile.src.set' in the preGoal to
java:compile. May be the second source dir is the problem!?

WDYT

Thank's
Roland

  <preGoal name="java:compile">
        <ant:path id="persistent.source.dir"
location="${persistent.src.dir}"/>
        <maven:addPath id="maven.compile.src.set"
refid="persistent.source.dir"/>
  </preGoal>

  <!--  POST GOAL JAVA:COMPILE-->
  <postGoal name="java:compile">
     <ant:move todir="${enhancer.input.dir}">
      <fileset dir="${maven.build.dest}">
        <include name="ch/sardusvini/shop/productspec/business/*.class"/>
      </fileset>
      <fileset dir="${maven.build.dest}">
        <include name="ch/sardusvini/shop/ordering/business/*.class"/>
      </fileset>
    </ant:move>
  </postGoal>

-----Ursprungliche Nachricht-----
Von: Brian Enigma [mailto:enigma@netninja.com]
Gesendet: Freitag, 12. Marz 2004 02:34
An: Maven Users List
Betreff: Re: simulating multiple output dirs


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

     Are you implementing this as your own custom goal (with a prereq or
attainGoal, perhaps), as a postGoal, or by some other method?  I would
think that a <postGoal name="java:compile"> could contain your Ant move
tasks without any of the described problems.
  -Brian

On Mar 11, 2004, at 1:26 PM, Roli bluewin wrote:
> I would like to move some of the compiled classes to another directory.
> Thereby I have the following problem
>
> After running java:compile  I use ant:move to move away some class
> files.
> This works but when I rerun java:compile the class files which have
> been
> moved away are not recompiled?! Any hints??
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFAURN/0dKNWt3rpSURAlK3AJwMvmhah9UptoACuVJ1NBNgtZehHQCg0Z5z
/R/VlNtQvW/dZmEBm1eVWFE=
=iE9U
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: simulating multiple output dirs

Posted by Brian Enigma <en...@netninja.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

     Are you implementing this as your own custom goal (with a prereq or 
attainGoal, perhaps), as a postGoal, or by some other method?  I would 
think that a <postGoal name="java:compile"> could contain your Ant move 
tasks without any of the described problems.
  -Brian

On Mar 11, 2004, at 1:26 PM, Roli bluewin wrote:
> I would like to move some of the compiled classes to another directory.
> Thereby I have the following problem
>
> After running java:compile  I use ant:move to move away some class 
> files.
> This works but when I rerun java:compile the class files which have 
> been
> moved away are not recompiled?! Any hints??
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFAURN/0dKNWt3rpSURAlK3AJwMvmhah9UptoACuVJ1NBNgtZehHQCg0Z5z
/R/VlNtQvW/dZmEBm1eVWFE=
=iE9U
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org