Skip to main content Skip to complementary content

Filtering project items

Talend CI Builder allows you to filter and specify which project items to generate in order to make the POM generation faster.

The three main filter parameters you can use when generating POM files are:
  • -DitemFilter
  • -DprojectFilter
  • -Dfilter.include.dependencies=true

When the -DitemFilter parameter is not used, the -DprojectFilter parameter is used to select the project(s) where the POM files must be generated. When the -DitemFilter parameter is used, the -DprojectFilter parameter is used to select the project(s) for which the -DitemFilter parameter must be applied. However the POM files of the projects that are not stated in the -DprojectFilter value will be generated without any filters applied.

Procedure

  1. Check out your Git projects.
    For more information about how to check out a Git project, see Git Checkout.
  2. Run the mvn org.talend.ci:builder-maven-plugin:8.0.X:generateAllPoms command:
    • Using the -DitemFilter parameter to filter project items.

      Example of filter on Job types:

      • -DitemFilter=(type=process) to filter on all Standard Jobs
      • -DitemFilter=(type=process_mr) to filter on all Big Data Map/Reduce and Spark Batch Jobs
      • -DitemFilter=(type=process_storm) to filter on all Big Data Storm and Spark Streaming Jobs
      • -DitemFilter=(type=route) to filter on all Routes

      Example of filter on Job labels:

      • -DitemFilter=(type=process)and(label=jobA) to filter on one specific Job named jobA
      • -DitemFilter=(type=process)and(label%job*) to filter on Jobs whose names start with job

      Example of filter on Job paths:

      • -DitemFilter=(type=process)and(path=Integration) to filter on Jobs located in a subfolder Integration
      • -DitemFilter=(type=process)and(path%Integration*) to filter on Jobs located in subfolders with a name starting with Integration

      Example of filter on Job versions:

      • -DitemFilter=(type=process)and(version=lastVersion) to filter on the latest version of your Jobs

      You also have the possibility to remove old versions of your project items in the Project Settings of Talend Studio.

      Example of filter on the person who created the Job:

      -DitemFilter=(type=process)and(author=doc@talend.com) to filter on Jobs whose author ID is doc@talend.com

      Example of exclusion filter:

      • -DitemFilter=(!path=sandbox)and(type=process)and(label%jobA*)or(label%jobB*) to filter on Jobs with a name starting with jobA or jobB, but that are not in the sandbox folder
      • -DitemFilter=(!path%MainProcess/Import*)and(type=process)and(label%job*) to filter on Jobs with a name starting with job, but that are not in the subfolders with a name starting with Import under the MainProcess folder
      • -DitemFilter=(type=process)and(!label=job2)and(path%MainProcess/Export*) to filter on Jobs located in the subfolders with a name starting with Export under the MainProcess folder, and with the exception of the Job named job2
    • Using the additional -Dfilter.include.dependencies=true parameter to include all the dependencies of your filtered project items, and to make the POM generation faster.

      Example if you have one main project:

      -DitemFilter=my_parent_jobs -Dfilter.include.dependencies=true to generate the POM files of the stated parent Jobs and all related subJobs and Joblets.

      Example if you have several projects (with reference projects):

      -DprojectFilter="mainA|mainB" -DitemFilter=my_parent_job_in_mainA_or_main B -Dfilter.include.dependencies=true to generate the POM files of the stated parent Job and all related subJobs, Joblets of the projects stated in the -DprojectFilter parameter value, i.e:
      • parentJobA and its subJobs and Joblets which are also in project mainA.
      • parentJobB and its subJobs and Joblets which are also in project mainB.
      • if mainA has reference projects refA1 and refA2 and mainB has reference projects refB1 and refB2, then all items of refA1, refA2, refB1, and refB1 projects will be generated.

      Reference projects of the projects stated in -DprojectFilter will be fully generated without any filters applied.

    Information noteImportant: Do not enter the name of your reference project in the -DprojectFilter parameter value, otherwise the -DitemFilter parameter will be applied to this specific reference project, then you will need to add more conditions in the -DitemFilter parameter values in order to generate all necessary Jobs in the reference project.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!