是否有org.alfresco.repo的maven依赖?

时间:2014-12-19 09:44:13

标签: maven dependencies alfresco activiti

我正在尝试在创建新业务流程时为服务任务添加侦听器。我找到了以下示例:

package ru.psb.alfresco.workflow.listeners;

import org.activiti.engine.delegate.DelegateTask;
import org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener;

public  class ShowDocList extends ScriptTaskListener {

    private static final long serialVersionUID = 1L;
    org.alfresco.repo.jscript.ScriptLogger log = new org.alfresco.repo.jscript.ScriptLogger();

    @Override
    public void notify(DelegateTask arg0) {
        ...
    }

}

但是eclipse对导入org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener;

一无所知

那么我需要为此包添加什么依赖项?谷歌没有给我适当的结果。

1 个答案:

答案 0 :(得分:3)

org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener类包含在以下工件中:

org.alfresco:org.alfresco-repository

它在maven中心不可用,但可以在以下存储库中找到: https://maven.alfresco.com/nexus/content/groups/public/

所以在你的pom中你需要添加以下内容:

<project>
    ...
    <repositories>
        ...
        <!-- define the alfresco maven repository -->
        <repository>
            <id>Alfresco Maven Repository</id>
            <url>https://maven.alfresco.com/nexus/content/groups/public/</url>
        </repository>
        ...
    </repositories>

    ...
    <dependencies>
        <!-- add dependency to alfresco-repository -->
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-repository</artifactId>
            <version>5.0.c</version>
        </dependency>
    </dependencies>
    ...
</project>