Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Task to search and replace in all .classpath files
Task to search and replace in all .classpath files [message #1818806] Sun, 29 December 2019 17:14 Go to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
After importing all projects with Oomph, I want to run a m2e update classpath task and subsequently adjust the classpath files to compile to bin / bin-test rather then target/classes.
Usually I'd do this with an m2e plugin but that's not possible with tycho given https://github.com/tesla/m2eclipse-tycho/pull/45 is not yet available.

Is it possible with Oomph default setup tasks to do a search and replace for all occurrences of target/classes in all .classpath files in a workspace?
Re: Task to search and replace in all .classpath files [message #1818824 is a reply to message #1818806] Mon, 30 December 2019 06:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31149
Registered: July 2009
Senior Member
There is a Text Modify task that can be used to modify the resource's contents, but there is no mechanism for creating/performing n occurrences of such a task or of any task.
Re: Task to search and replace in all .classpath files [message #1818840 is a reply to message #1818824] Mon, 30 December 2019 10:04 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
I could work on something that supports regex patterns (cf java.nio.file.FileSystem.getPathMatcher(String) ) in the URI. Would that be interesting as a core functionality of Oomph?
Re: Task to search and replace in all .classpath files [message #1818849 is a reply to message #1818840] Mon, 30 December 2019 11:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31149
Registered: July 2009
Senior Member
I suppose that if the TextModify task had a boolean to indicate that the URL is a "pattern" then internal to the implementation one could have a getURLs() and the other stuff (isNeeded/perform) could all be done in a loop...

But I would have to maintain it forever. :-P
Re: Task to search and replace in all .classpath files [message #1818850 is a reply to message #1818849] Mon, 30 December 2019 11:36 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
I take this as a yes ... I'll make sure to inject some regression for the fun of it. ;)
Previous Topic:Error installing 2019-6
Next Topic:How to create a repository id in a generated target?
Goto Forum:
  


Current Time: Mon May 25 21:57:59 GMT 2020

Powered by FUDForum. Page generated in 0.02065 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top