04-25-2019 09:29 PM
安照以下步骤:
# 1. alfresco-sdk下载
git clone https://github.com/Alfresco/alfresco-sdk.git
# 2. 构建,要跳过test,test中会有连接配置中数据库等操作,之后我们再说改配置文件的问题,这里跳过
cd alfresco-sdk
mvn clean install -Dmaven.test.skip=true
# 3. 生成扩展项目
mvn archetype:generate -DarchetypeCatalog=local
# 4. 提示选择原型,选择all-in-one,具体区别可以参照官方文档
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: local -> org.alfresco.maven.archetype:alfresco-platform-jar-archetype (Sample project with full support for lifecycle and rapid development of Platform/Repository JARs and AMPs (Alfresco Module Packages))
2: local -> org.alfresco.maven.archetype:alfresco-share-jar-archetype (Share project with full support for lifecycle and rapid development of JARs and AMPs (Alfresco Module Packages))
3: local -> org.alfresco.maven.archetype:alfresco-allinone-archetype (Sample multi-module project for All-in-One development on the Alfresco plaftorm. Includes modules for Platform/Repository JAR and Share JAR)
4: local -> org.alfresco.maven.archetype:activiti-jar-archetype (DEPRECATED - UNSUPPORTED - EXPERIMENTAL)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): **3**
# 5. 设置groupId,根据自己情况起,这里我们叫customalfresco
Define value for property 'groupId': customalfresco
# 6. 设置artifactId,同样根据自己情况来,这里我们叫firstblood
Define value for property 'artifactId': firstblood
# 7. 设置package名,默认使用groupId,看自己情况,默认的话直接回车
Define value for property 'package' customalfresco: :
# 8. 确认配置,Y
Confirm properties configuration:
groupId: customalfresco
artifactId: firstblood
version: 1.0-SNAPSHOT
package: customalfresco
Y: : y
# 9. 等待
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: alfresco-allinone-archetype:3.0.2-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: customalfresco
[INFO] Parameter: artifactId, Value: firstblood
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: customalfresco
[INFO] Parameter: packageInPathFormat, Value: customalfresco
[INFO] Parameter: package, Value: customalfresco
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: groupId, Value: customalfresco
[INFO] Parameter: artifactId, Value: firstblood
[INFO] Parent element not overwritten in D:\work\projects\alfresco\source-zip\alfresco-sdk-master\firstblood\firstblood-platform-jar\pom.xml
[INFO] Parent element not overwritten in D:\work\projects\alfresco\source-zip\alfresco-sdk-master\firstblood\firstblood-share-jar\pom.xml
[INFO] Parent element not overwritten in D:\work\projects\alfresco\source-zip\alfresco-sdk-master\firstblood\integration-tests\pom.xml
[INFO] Project created from Archetype in dir: D:\work\projects\alfresco\source-zip\alfresco-sdk-master\firstblood
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Alfresco SDK ....................................... SUCCESS [07:02 min]
[INFO] Rapid Application Development Support .............. SKIPPED
[INFO] Alfresco Maven Plugin .............................. SKIPPED
[INFO] Alfresco SDK - Platform JAR Archetype .............. SKIPPED
[INFO] Alfresco SDK - Share JAR Archetype ................. SKIPPED
[INFO] Alfresco SDK - All-in-One Archetype ................ SKIPPED
[INFO] DEPRECATED - UNSUPPORTED - EXPERIMENTAL: Alfresco SDK - Activiti JAR Archetype SKIPPED
[INFO] AIO - SDK 3.0 ...................................... SKIPPED
[INFO] Alfresco Platform/Repository JAR Module ............ SKIPPED
[INFO] Alfresco Share JAR Module .......................... SKIPPED
[INFO] Integration Tests Module ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:04 min
[INFO] Finished at: 2018-07-19T23:20:36+08:00
[INFO] Final Memory: 20M/224M
[INFO] ------------------------------------------------------------------------
再把项目导入idea后,运行提示如下:
Explore our Alfresco products with the links below. Use labels to filter content by product module.