maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donnchadh Ó Donnabháin" <donnch...@gmail.com>
Subject Re: Eclipse & target directory
Date Tue, 12 Dec 2006 18:01:51 GMT
Here's a quick and dirty Eclipse Monkey (http://www.eclipse.org/dash/)
script to make all target folders derived. Update site for Eclipse
Monkey is http://download.eclipse.org/technology/dash/update/


--- Came wiffling through the eclipsey wood ---
/*
 * Menu: Maven > Make Maven Targets Derived
 * Kudos: Donnchadh Ó Donnabháin
 * License: EPL 1.0
 * DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.dash.doms
 */

function main() {
  var files = resources.filesMatching(".*/pom\\.xml");
  var targetFolder;

  for each( file in files ) {
    if (targetFolder = file.eclipseObject.parent.findMember("target")) {
    	targetFolder.setDerived(true);
    }
  }
}
--- And burbled as it ran! ---

Once you've installed eclipse monkey, copy the contents of this
message and select 'Monkey > Paste Script'. You will now have a new
menu item 'Monkey > Maven > Make Maven Targets Derived'

As I said it's quick and dirty so feel free to improve on it.

  Donnchadh

On 10/17/06, Daniel Serodio <daniel.listas@xxx.com.br> wrote:
> Douglas Ferguson wrote:
> > Awesome! Thanks.
> >
> The only problem is that this breaks when the "target" folder is
> re-created (for example, if you run "mvn clean", because this
> information ("is derived") is stored in the folder's metadata.
> I've requested the ``ability to "remember" that a resource is derived
> when said resource is deleted´´
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=154089), but it seems
> like it's not going to happen (see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=150578).
>
> HTH,
> Daniel Serodio
> > Where does it store this value? I can't find it in any of the config files for the
project.
> >
> > Could this be added to eclipse:eclipse?
> >
> > -----Original Message-----
> > From: Donnchadh Ó Donnabháin [mailto:donnchadh@gmail.com]
> > Sent: Friday, September 08, 2006 8:48 AM
> > To: Maven Users List
> > Subject: Re: Eclipse & target directory
> >
> > In eclipse right-click on the target folder and select 'Properties...'
> > Then, in the Info page, check the 'derived' check box. This should
> > exlude it from searches and resource lookups. Probably error reporting
> > too but I haven't verified that
> >
> > Donnchadh
> >
> > On 9/5/06, Douglas Ferguson <douglas.ferguson@epsiia.com> wrote:
> >
> >> When using eclipse on war projects, the target directory will start to
> >> collect copies of jsp files, from war:war commands, etc.
> >>
> >>
> >> Is there a way to have eclipse ignore the files when searching and
> >> reporting errors?
> >>

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


Mime
View raw message