cancel
Showing results for 
Search instead for 
Did you mean: 

TaskService

Vinit_Shah
Champ in-the-making
Champ in-the-making

Hi Team,

I want to use TaskService for one of operation, but not able to import org.nuxeo.ecm.platform.task package and as a result TaskService also not found.

Which maven dependency I need to include to solve this problem ?

Appreciating your help. Thank you.

Note*: we are using Nuxeo LTS 2021.1.19 version.

Regards, Vinit Shah

2 REPLIES 2

Konrad_Krenzlin
Confirmed Champ
Confirmed Champ

I hope there is some better way of doing it, or better tooling, because I also struggle with this and it makes the development tedious. For now what I am doing is:

Note: You need the complete sources including the addons. Also I am doing this for LTS2019 but the process should be the same.

  1. Find the corresponding java file in the sources i.e. ./nuxeo-features/nuxeo-platform-task/nuxeo-platform-task-api/src/main/java/org/nuxeo/ecm/platform/task/TaskService.java
  2. open the the associated pom.xml i.e. ./nuxeo-features/nuxeo-platform-task/nuxeo-platform-task-api/pom.xml
  3. note the parent group id org.nuxeo.ecm.platform and the artificatId (not the parent one) nuxeo-platform-task-api
  4. Add these as a dependency in your pom.xml
    <dependency>
      <groupId>org.nuxeo.ecm.platform</groupId>
      <artifactId>nuxeo-platform-task-api</artifactId>
    </dependency>

If you specifiy nuxeo (e.g. nuxeo-addons-parent) as your parent you should not need a version tag (e.g. <version>10.10</version>).

But: More often this is not enough and you keep doing these steps again and again for different missing dependencies. Sometimes there is a parent artificat that is more appropirate to use instead of listing all the single dependencies.

Thanks [Konrad Krenzlin](https