【问题标题】:Alfresco Maven - Simple Module JarAlfresco Maven - 简单模块 Jar
【发布时间】:2016-11-03 07:05:07
【问题描述】:

我正在尝试创建一个露天扩展 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

非常感谢任何建议。

问候, 卡维

【问题讨论】:

  • @imagine 在提出此案之前,我确实检查了您指出的链接。提到的链接是指使用 ALL IN ONE 项目,但我使用的是 Alfresco Extension jar 模块项目,我还尝试在我的 pom 中添加建议的依赖项,但它没有用。
  • 保持SDK版本不变是否有效?通常,更改 SDK 版本需要的不仅仅是更改版本。

标签: maven alfresco


【解决方案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_dev 和 target 并运行:

 mvn clean package

【讨论】:

    猜你喜欢
    • 2013-03-11
    • 1970-01-01
    • 2018-11-28
    • 2011-02-11
    • 2021-01-04
    • 1970-01-01
    • 2011-01-13
    • 2014-10-21
    • 1970-01-01
    相关资源
    最近更新 更多