TaskService
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
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.
- 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
- open the the associated
pom.xml
i.e../nuxeo-features/nuxeo-platform-task/nuxeo-platform-task-api/pom.xml
- note the parent group id
org.nuxeo.ecm.platform
and the artificatId (not the parent one)nuxeo-platform-task-api
- Add these as a dependency in your
pom.xml
If you specifiy nuxeo (e.g.<dependency> <groupId>org.nuxeo.ecm.platform</groupId> <artifactId>nuxeo-platform-task-api</artifactId> </dependency>
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.