Alfresco Maven - 简单模块罐

时间:2016-11-03 07:05:07

标签: maven alfresco

我正在尝试按照描述创建一个露天扩展jar模块 http://docs.alfresco.com/5.1/concepts/dev-extensions-packaging-techniques-jar-files.html并使用https://github.com/Alfresco/alfresco-sdk-samples/tree/master/samples/alfresco-simple-module/repo上提供的示例简单模块 但是当我将SDK从2.1.0更改为2.2.0时,该项目没有构建抱怨

原因:org.apache.ibatis.builder.BuilderException:无法获取资源:alfresco / ibatis /#resource.dialect#/ activities-insert-SqlMap.xml

任何建议都非常感谢。

此致 格维

1 个答案:

答案 0 :(得分:1)

尝试以下pom.xml更改:

  • 更改Alfresco SDK版本:

    <parent>
        <groupId>org.alfresco.maven</groupId>
        <artifactId>alfresco-sdk-parent</artifactId>
        <version>2.2.0</version>
    </parent>
    
  • 自定义Alfresco版本:

    <properties>
        <!-- The SDK 2.2.x is supported only for Alfresco 5.1.x Community 
             and above or Alfresco Enterprise 5.1 and above -->
        <alfresco.version>5.1.e</alfresco.version> <!-- or 5.2.b-EA -->
        <!-- ... -->
    </properties>
    
  • 添加H2数据库脚本依赖项:

    <dependencies>
        <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>alfresco-repository</artifactId>
        </dependency>
    
        <!-- Bring in the H2 Database scripts -->
        <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>alfresco-repository</artifactId>
            <version>${alfresco.version}</version>
            <classifier>h2scripts</classifier>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    
    </dependencies>
    
  • 修复alfresco-rad的版本:

        <dependency>
            <groupId>org.alfresco.maven</groupId>
            <artifactId>alfresco-rad</artifactId>
            <version>${maven.alfresco.version}</version>
        </dependency>
    

...或者只是克隆my fork with these changes:)

现在,删除文件夹alf_data_devtarget并运行:

 mvn clean package