Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » How to exclude folders on project import
How to exclude folders on project import [message #1737924] Thu, 14 July 2016 08:32 Go to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 197
Registered: July 2009
Location: Graz, Austria
Senior Member
I was trying to setup a project import task where some subfolders should not be imported.

  <setupTask
      xsi:type="projects:ProjectsImportTask">
    <sourceLocator
        rootFolder="${ease.git.clone.core.location}">
      <excludedPath>${ease.git.clone.core.location/developers}</excludedPath>
    </sourceLocator>
  </setupTask>


I was also trying regexp as exclude pattern ".*developers.*, but whatever I enter, projects from those folders still get imported. While I could setup import tasks on subfolder level I would love to use the more general approach with exclude patterns. Could you explain how this works?

thanks
Christian
Re: How to exclude folders on project import [message #1737939 is a reply to message #1737924] Thu, 14 July 2016 09:20 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6394
Registered: July 2009
Senior Member
Hi Christian,

IIRC. the excludedPath must not be patterns, but rather paths *relative* to the rootFolder.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 14.07.2016 um 11:32 schrieb Christian Pontesegger:
> I was trying to setup a project import task where some subfolders should not be imported.
>
>
> <setupTask
> xsi:type="projects:ProjectsImportTask">
> <sourceLocator
> rootFolder="${ease.git.clone.core.location}">
> <excludedPath>${ease.git.clone.core.location/developers}</excludedPath>
> </sourceLocator>
> </setupTask>
>
>
> I was also trying regexp as exclude pattern ".*developers.*, but whatever I enter, projects from those folders still
> get imported. While I could setup import tasks on subfolder level I would love to use the more general approach with
> exclude patterns. Could you explain how this works?
>
> thanks
> Christian
Re: How to exclude folders on project import [message #1774787 is a reply to message #1737939] Thu, 19 October 2017 15:20 Go to previous messageGo to next message
Kurt Smolderen is currently offline Kurt SmolderenFriend
Messages: 3
Registered: October 2016
Junior Member
Stumbled upon this thread when looking for a solution as I can't get this to work.My maven import task looks like:
<setupTask
    xsi:type="maven:MavenImportTask"
    projectNameTemplate="">
  <sourceLocator
      rootFolder="${git.clone.projects.location}"
      locateNestedProjects="true">
    <excludedPath>project1-ignore</excludedPath>
    <excludedPath>project2-ignore</excludedPath>
  </sourceLocator>
</setupTask>


but both projects are imported while being a direct subdirectory of the git.clone.projects.location. What would be the correct format?

Regards
Kurt
Re: How to exclude folders on project import [message #1774790 is a reply to message #1774787] Thu, 19 October 2017 15:47 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 29552
Registered: July 2009
Senior Member
It looks okay. It's used by org.eclipse.oomph.resources.impl.ProjectFactoryImpl.isExcludedPath(BackendContainer, BackendContainer) It looks like this one from Equinox.setup:
<?xml version="1.0" encoding="UTF-8"?>
<resources:SourceLocator
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:resources="http://www.eclipse.org/oomph/resources/1.0"
    xsi:schemaLocation="http://www.eclipse.org/oomph/resources/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Resources.ecore"
    rootFolder="${git.clone.equinox.p2.location}">
  <excludedPath>org.eclipse.equinox.p2.releng.buckminster</excludedPath>
  <excludedPath>bundles/org.eclipse.equinox.p2.testserver</excludedPath>
</resources:SourceLocator>

Failing that, you could instead create predicates (such as one that matches any project that doesn't have ignore in the name)...
Previous Topic:How to install locally Eclipse Oomph?
Next Topic:Access to ${target_home} in Oomph setup
Goto Forum:
  


Current Time: Tue Sep 25 17:02:01 GMT 2018

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

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

Back to the top