SlideShare a Scribd company logo
Alfresco SDK 
2014/10/02 
Yoshihiko Aochi 
Solution Engineer, Alfresco Japan
Maven䛸䛿 
• http://maven.apache.org/ 
• 䝥䝻䝆䜵䜽䝖䛾⎔ቃᵓ⠏䚸ᡂᯝ≀⏕ᡂ䜢ᨭ᥼ 
䛩䜛䝒䞊䝹䚹 
• 䝣䜯䜲䝹䛾⨨䛟ሙᡤ➼䛾䛂Ỵ䜎䜚䛤䛸䛃䛾୰䛷䚸 
ຠ⋡䜘䛟㛤Ⓨ䜢㐍䜑䜛䛣䛸䛜䛷䛝䜛䚹
Alfresco䛾Maven䛷䛾㛤Ⓨ 
• 䜂䛺ᙧ䛛䜙䝥䝻䝆䜵䜽䝖䠄䜰䞊䝔䜱䝣䜯䜽䝖䠅䜢సᡂ 
• Tomcat䜔DB䛾‽ഛ䛜䛔䜙䛺䛔 
+ ᚲせ䛺䜒䛾䛿඲䛶⮬ືⓗ䛻䝎䜴䞁䝻䞊䝗 
• 㛤Ⓨ⎔ቃ䛾౫Ꮡ䛺䛧(Eclipse, Netbeans, IDEA etc.) 
• Community∧䚸Enterprise∧䛹䛱䜙䛷䜒฼⏝ྍ⬟ 
䚷㻌䠄䜶䞁䝍䞊䝥䝷䜲䝈∧䛿ㄆドᚲせ䚹ㄆド䜻䞊䛸䜰䜽䝉 
䝇᪉ἲ䛻䛴䛔䛶䛿Support Portal䜢ཧ↷䠅
‽ഛ 
• Maven 3.0.3䜎䛯䛿䛭䜜௨ୖ 
• Java 1.7
⎔ቃኚᩘ䛾タᐃ 
• JAVA_HOME 
• MAVEN_OPTS 
export MAVEN_OPTS=“-Xms1024m –Xmx4096m 
–XX:PermSize=1024m”
䜽䜲䝑䜽䝇䝍䞊䝖! 
AMP䝥䝻䝆䜵䜽䝖䜢స䜛 
http://docs.alfresco.com/4.2/tasks/dev-extensions-maven-sdk-quick-start.html 
mvn archetype:generate -DarchetypeCatalog=https:// 
artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog. 
xml -Dfilter=org.alfresco.maven.archetype: 
䝥䝻䝆䜵䜽䝖䛾సᡂ䜢ᑐヰᙧᘧ䛷సᡂ
AMP䛾䝃䞁䝥䝹䝥䝻䝆䜵䜽䝖䛾archetype 
䜢㑅ᢥ 
[INFO] 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building Maven Stub Project (No POM) 1 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO]  maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom  
[INFO] 
[INFO]  maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom  
[INFO] 
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- 
[INFO] Generating project in Interactive mode 
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart: 
1.0) 
Choose archetype: 
1: https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml - 
org.alfresco.maven.archetype:alfresco-amp-archetype (Sample project with full support for lifecycle and rapid 
development of AMPs (Alfresco Module Packages)) 
2: https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml - 
org.alfresco.maven.archetype:alfresco-allinone-archetype (Sample multi-module project for All-in-One development on 
the Alfresco plaftorm. Includes modules for: Repository, AMP, Share, Solr, Web Quick Start and embedded Jetty run) 
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 1 
Choose org.alfresco.maven.archetype:alfresco-amp-archetype version:
᭱᪂䛾archetype version䜢㑅ᢥ 
䠄䝕䝣䜷䝹䝖䠅 
Choose org.alfresco.maven.archetype:alfresco-amp-archetype 
version: 
1: 1.0 
2: 1.0.1 
3: 1.0.2 
4: 1.1.0 
5: 1.1.1 
Choose a number: 5: 
䛣䛣䛿Enter䜢ᢲ䛧䛶䛭䛾䜎䜎䝕䝣䜷䝹䝖䛷䜒䜘䛔 
䠄ᚋ䛷ኚ᭦䛷䛝䜛䠅
௒䛛䜙సᡂ䛩䜛䝥䝻䝆䜵䜽䝖䛾groupId䛸 
artifactId䜢タᐃ 
Define value for property 'groupId': : jp.alfresco 
Define value for property 'artifactId': : sample-amp 
䜰䞊䝔䜱䝣䜯䜽䝖䠖maven䛷స䜙䜜䜛䝥䝻䝆䜵䜽䝖䛸䛭䛾ᡂᯝ≀ 
groupId: 
䛣䛾䜰䞊䝔䜱䝣䜯䜽䝖䜢సᡂ䛧䛯⤌⧊䛾ID䠄౛䛘䜀䚸఍♫䝗䝯䜲䞁䠅 
ar2factId: 
䛣䛾䜰䞊䝔䜱䝣䜯䜽䝖䛾Id
䝍䞊䝀䝑䝖䛸䛺䜛war䜔Alfresco䛾䝞䞊 
䝆䝵䞁䛜䝕䝣䜷䝹䝖䛷タᐃ䛥䜜䜛! 
[INFO] Using property: version = 1.0-SNAPSHOT 
[INFO] Using property: package = (not used) 
[INFO] Using property: alfresco_target_amp_client_war = alfresco 
[INFO] Using property: alfresco_target_amp_client_war_groupId = org.alfresco 
[INFO] Using property: alfresco_target_amp_client_war_version = 4.2.e 
[INFO] Using property: alfresco_target_groupId = org.alfresco 
[INFO] Using property: alfresco_target_version = 4.2.e 
Confirm properties configuration: 
groupId: jp.alfresco 
artifactId: sample-amp 
version: 1.0-SNAPSHOT 
package: (not used) 
alfresco_target_amp_client_war: alfresco 
alfresco_target_amp_client_war_groupId: org.alfresco 
alfresco_target_amp_client_war_version: 4.2.e 
alfresco_target_groupId: org.alfresco 
alfresco_target_version: 4.2.e 
Y: : 
 
䛣䛣䛿Enter䜢ᢲ䛧䛶䛭䛾䜎䜎䝕䝣䜷䝹䝖䛷䜒䜘䛔 
䠄ᚋ䛷ኚ᭦䛷䛝䜛䠅
タᐃ䛧䛯artifactId䛾ྡ๓䛷䝕䜱䝺䜽䝖䝸䛜 
䛷䛝䜛! 
YoshiMac:mvn aochi$ ls 
sample-amp
AMP䝃䞁䝥䝹䜢䛭䛾䜎䜎ື䛛䛩 
䝃䞁䝥䝹䝁䞊䝗䛜ධ䛳䛶䛔䜛䛾䛷䚸䛭䜜䜢ື䛛䛫䜛 
mvn 
integra2on-­‐test 
-­‐Pamp-­‐to-­‐war 
䝤䝷䜴䝄䛷䜰䜽䝉䝇 
h;p://localhost:8080/alfresco
Eclipse䜢౑䛳䛯⎔ቃᵓ⠏ 
‽ഛ 
• Eclipse 
Kelper 
J2EE䛰䛸maven䜒ධ䛳䛶䛔䜛 
• m2e 
Maven 
dependency 
plugin
M2e Maven Dependency Plugin䛾 
䜲䞁䝇䝖䞊䝹
M2e Maven Dependency Plugin䛾 
䜲䞁䝇䝖䞊䝹 
“Add” 
䛷 
h;p://ianbrandt.github.io/m2e-­‐maven-­‐dependency-­‐plugin/snapshots/ 
䛾䝃䜲䝖䜢㏣ຍ 
䝏䜵䝑䜽䜢ධ䜜䛶”Next”
Maven䝥䝻䝆䜵䜽䝖䛾䜲䞁䝫䞊䝖
Maven䝥䝻䝆䜵䜽䝖䛾㑅ᢥ
䜲䞁䝫䞊䝖ᚋ䛾䝽䞊䜽䝇䝨䞊䝇
䝥䝻䝆䜵䜽䝖䛾㝵ᒙᵓ㐀 
䝣䜯䜲䝹䠋䝕䜱䝺䜽䝖䝸 ㄝ䚷䚷䚷䚷䚷᫂ 
src/main/java Java䝁䞊䝗䜢⨨䛟ሙᡤ䚹 
Alfresco.war䛜䝍䞊䝀䝑䝖䛾ሙྜ䚸 
䛣䛣䛻⨨䛛䜜䛯䝁䞊䝗䛿jar໬䛥䜜 
䛶WEB-­‐INF/lib䛻㓄⨨䛥䜜䜛 
src/main/amp ampෆ䛾䝣䜯䜲䝹䛿䛣䛣䛻⨨䛟䠄ᚋ 
㏙䠅 
src/test/java 䝔䝇䝖⏝䛾䝁䞊䝗䜢⨨䛟ሙᡤ 
src/test/resources 䝔䝇䝖⏝䛾䝸䝋䞊䝇䝣䜯䜲䝹䜢⨨䛟 
ሙᡤ 
pom.xml 䛣䛾䝥䝻䝆䜵䜽䝖䛾᝟ሗ䛜グ㍕䛥 
䜜䜛䝣䜯䜲䝹䚹䠄౫Ꮡᛶ䚸䝍䞊䝀䝑䝖 
➼䠅
Alfresco䛾䝍䞊䝀䝑䝖䝞䞊䝆䝵䞁䜢ኚ᭦䛩䜛 
(pom.xml) 
ኚ᭦ᚋ䚸୍ᗘ䜽䝸䞊䞁䛩䜛 
mvn 
clean 
-­‐Ppurge
What’s new in Alfresco SDK 2.0 
• Alfresco Maven SDK䛾ḟ䛾䝞䞊䝆䝵䞁 
• ⌧ᅾCommunity∧䛾䜏䚹Enterprise∧ 
䛿௒᭶䝸䝸䞊䝇ணᐃ 
• Spring-loaded䜢౑䛳䛯䝩䝑䝖䝁䞊䝗䝸 
䝻䞊䝗䛜ྍ⬟
‽ഛ 
• spring-loaded䛾䝎䜴䞁䝻䞊䝗 
https://github.com/spring-projects/spring-loaded 
• MAVEN_OPTS䛾タᐃ 
export MAVEN_OPTS=-javaagent:/spring-loaded䜢⨨䛔䛯 
䝣䜯䜲䝹䝟䝇/springloaded-1.2.0.RELEASE.jar -noverify - 
Xmx1024m -Xmx4096m -XX:PermSize=1024m
䝥䝻䝆䜵䜽䝖䛾సᡂ 
$ mvn archetype:generate -DarchetypeCatalog=https:// 
artifacts.alfresco.com/nexus/content/groups/public-snapshots/archetype-catalog. 
xml -Dfilter=org.alfresco.maven.archetype: 
 
pom.xml䛾ኚ᭦ 
parent 
groupIdorg.alfresco.maven/groupId 
ar2factIdalfresco-­‐sdk-­‐parent/ar2factId 
version2.0.0-­‐beta-­‐1/version 
/parent 
2014/10/02⌧ᅾ 
2.0.0-­‐beta-­‐3䛜᭱᪂∧ 
᭱᪂䝞䞊䝆䝵䞁䛿௨ୗ䜢☜ㄆ䛟䛰䛥䛔䠖 
h;ps://ar2facts.alfresco.com/nexus/content/groups/public/alfresco-­‐sdk-­‐aggregator/latest/index.html
Demo
For more info. 
• GitHub 
https://github.com/Alfresco/alfresco-sdk 
• Developer Document 
https://artifacts.alfresco.com/nexus/content/groups/ 
public/alfresco-sdk-aggregator/latest/index.html 
• Alfresco Documentation 
http://docs.alfresco.com/4.2/concepts/dev-extensions- 
maven-sdk-intro.html
QA
⿵㊊
SLF4J䛾౫Ꮡᛶ䛾ゎỴ (pom.xml)! 
᝟ሗ: WSSERVLET14: JAX-WS servlet initializing 
8 09, 2014 6:36:32 ༗ᚋ㻌org.apache.catalina.core.ApplicationContext log 
᝟ሗ: Marking servlet axis as unavailable 
8 09, 2014 6:36:32 ༗ᚋ㻌org.apache.catalina.core.StandardContext loadOnStartup 
㔜኱: Servlet /alfresco threw load() exception 
org.apache.commons.discovery.DiscoveryException: Class 
org.apache.commons.logging.impl.SLF4JLogFactory does not implement 
org.apache.commons.logging.LogFactory 
at org.apache.commons.discovery.tools.ClassUtils.verifyAncestory(ClassUtils.java:180) 
at org.apache.commons.discovery.tools.SPInterface.verifyAncestory(SPInterface.java:201) 
at org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:195) 
at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579) 
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418) 
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378) 
at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45) 
at java.security.AccessController.doPrivileged(Native Method) 
at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41) 
at org.apache.axis.components.logger.LogFactory.clinit(LogFactory.java:33) 
䠄㏵୰␎䠅 
8 09, 2014 6:36:33 ༗ᚋ㻌org.apache.coyote.AbstractProtocol start 
᝟ሗ: Starting ProtocolHandler [http-bio-8080]
SLF4J䛾౫Ꮡᛶ䛾ゎỴ㻌(pom.xml)

More Related Content

PDF
HotPush with Ionic 2 and CodePush
PDF
Building aosp
PDF
iOS Parallel Automation - Viktar Karanevich - Mobile Test Automation Meetup (...
PDF
Apache Yetus: Intro to Precommit for HBase Contributors
PDF
FrenchKit 2017: Server(less) Swift
PPTX
owasp top 10
PDF
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
PPTX
Provisionator 3000
HotPush with Ionic 2 and CodePush
Building aosp
iOS Parallel Automation - Viktar Karanevich - Mobile Test Automation Meetup (...
Apache Yetus: Intro to Precommit for HBase Contributors
FrenchKit 2017: Server(less) Swift
owasp top 10
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
Provisionator 3000

What's hot (11)

PPTX
Infrastructure Automation with Chef & Ansible
PDF
Console Apps: php artisan forthe:win
PPTX
OSDC2014: Testing Server Infrastructure with #serverspec
PPTX
Play with Alfresco ADF 2.0.0 Angular
PDF
DEFCON 18- These Aren't the Permissions You're Looking For
ODP
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
PPTX
Monitor-Driven Development Using Ansible
PDF
React Ecosystem
PPTX
Automated Deployments with Ansible
PDF
Making Joomla Insecure - Explaining security by breaking it
PPTX
Web components Introduction
Infrastructure Automation with Chef & Ansible
Console Apps: php artisan forthe:win
OSDC2014: Testing Server Infrastructure with #serverspec
Play with Alfresco ADF 2.0.0 Angular
DEFCON 18- These Aren't the Permissions You're Looking For
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Monitor-Driven Development Using Ansible
React Ecosystem
Automated Deployments with Ansible
Making Joomla Insecure - Explaining security by breaking it
Web components Introduction
Ad

Similar to Alfresco sdk 2.0 (20)

PPTX
20091112 - Mars Jug - Apache Maven
PDF
Java Builds with Maven and Ant
PDF
JavaFX Advanced
PPT
Introduction To Eclipse RCP
PPT
Using Maven2
PPTX
Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...
PPTX
Riga Dev Day - Automated Android Continuous Integration
PDF
Slides Aquarium Paris 2008
ODP
JavaFXScript
PDF
Fargate 를 이용한 ECS with VPC 1부
PDF
Plugins 2.0: The Overview
PPTX
Perfecting Your Development Tools: Updates to the Helix Plugin for Jenkins
PDF
🐲 Here be Stacktraces — Flink SQL for Non-Java Developers
PPTX
Apache Maven - eXo VN office presentation
PDF
Alfresco Day Barcelona 2016 - Developer Track - Herramientas para administrad...
PDF
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
PDF
JavaOne - The JavaFX Community and Ecosystem
PPTX
Build r
PDF
CPANTS: Kwalitative website and its tools
PPTX
Learn you some Ansible for great good!
20091112 - Mars Jug - Apache Maven
Java Builds with Maven and Ant
JavaFX Advanced
Introduction To Eclipse RCP
Using Maven2
Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...
Riga Dev Day - Automated Android Continuous Integration
Slides Aquarium Paris 2008
JavaFXScript
Fargate 를 이용한 ECS with VPC 1부
Plugins 2.0: The Overview
Perfecting Your Development Tools: Updates to the Helix Plugin for Jenkins
🐲 Here be Stacktraces — Flink SQL for Non-Java Developers
Apache Maven - eXo VN office presentation
Alfresco Day Barcelona 2016 - Developer Track - Herramientas para administrad...
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
JavaOne - The JavaFX Community and Ecosystem
Build r
CPANTS: Kwalitative website and its tools
Learn you some Ansible for great good!
Ad

Recently uploaded (20)

PPTX
Online Work Permit System for Fast Permit Processing
PPT
Introduction Database Management System for Course Database
PDF
Nekopoi APK 2025 free lastest update
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
ai tools demonstartion for schools and inter college
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Digital Strategies for Manufacturing Companies
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
top salesforce developer skills in 2025.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Online Work Permit System for Fast Permit Processing
Introduction Database Management System for Course Database
Nekopoi APK 2025 free lastest update
Upgrade and Innovation Strategies for SAP ERP Customers
Navsoft: AI-Powered Business Solutions & Custom Software Development
ai tools demonstartion for schools and inter college
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Adobe Illustrator 28.6 Crack My Vision of Vector Design
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Digital Strategies for Manufacturing Companies
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PTS Company Brochure 2025 (1).pdf.......
How Creative Agencies Leverage Project Management Software.pdf
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
ISO 45001 Occupational Health and Safety Management System
How to Choose the Right IT Partner for Your Business in Malaysia
top salesforce developer skills in 2025.pdf
Understanding Forklifts - TECH EHS Solution
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf

Alfresco sdk 2.0

  • 1. Alfresco SDK 2014/10/02 Yoshihiko Aochi Solution Engineer, Alfresco Japan
  • 2. Maven䛸䛿 • http://maven.apache.org/ • 䝥䝻䝆䜵䜽䝖䛾⎔ቃᵓ⠏䚸ᡂᯝ≀⏕ᡂ䜢ᨭ᥼ 䛩䜛䝒䞊䝹䚹 • 䝣䜯䜲䝹䛾⨨䛟ሙᡤ➼䛾䛂Ỵ䜎䜚䛤䛸䛃䛾୰䛷䚸 ຠ⋡䜘䛟㛤Ⓨ䜢㐍䜑䜛䛣䛸䛜䛷䛝䜛䚹
  • 3. Alfresco䛾Maven䛷䛾㛤Ⓨ • 䜂䛺ᙧ䛛䜙䝥䝻䝆䜵䜽䝖䠄䜰䞊䝔䜱䝣䜯䜽䝖䠅䜢సᡂ • Tomcat䜔DB䛾‽ഛ䛜䛔䜙䛺䛔 + ᚲせ䛺䜒䛾䛿඲䛶⮬ືⓗ䛻䝎䜴䞁䝻䞊䝗 • 㛤Ⓨ⎔ቃ䛾౫Ꮡ䛺䛧(Eclipse, Netbeans, IDEA etc.) • Community∧䚸Enterprise∧䛹䛱䜙䛷䜒฼⏝ྍ⬟ 䚷㻌䠄䜶䞁䝍䞊䝥䝷䜲䝈∧䛿ㄆドᚲせ䚹ㄆド䜻䞊䛸䜰䜽䝉 䝇᪉ἲ䛻䛴䛔䛶䛿Support Portal䜢ཧ↷䠅
  • 4. ‽ഛ • Maven 3.0.3䜎䛯䛿䛭䜜௨ୖ • Java 1.7
  • 5. ⎔ቃኚᩘ䛾タᐃ • JAVA_HOME • MAVEN_OPTS export MAVEN_OPTS=“-Xms1024m –Xmx4096m –XX:PermSize=1024m”
  • 6. 䜽䜲䝑䜽䝇䝍䞊䝖! AMP䝥䝻䝆䜵䜽䝖䜢స䜛 http://docs.alfresco.com/4.2/tasks/dev-extensions-maven-sdk-quick-start.html mvn archetype:generate -DarchetypeCatalog=https:// artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog. xml -Dfilter=org.alfresco.maven.archetype: 䝥䝻䝆䜵䜽䝖䛾సᡂ䜢ᑐヰᙧᘧ䛷సᡂ
  • 7. AMP䛾䝃䞁䝥䝹䝥䝻䝆䜵䜽䝖䛾archetype 䜢㑅ᢥ [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom [INFO] [INFO] maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom [INFO] [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Interactive mode [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart: 1.0) Choose archetype: 1: https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml - org.alfresco.maven.archetype:alfresco-amp-archetype (Sample project with full support for lifecycle and rapid development of AMPs (Alfresco Module Packages)) 2: https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml - org.alfresco.maven.archetype:alfresco-allinone-archetype (Sample multi-module project for All-in-One development on the Alfresco plaftorm. Includes modules for: Repository, AMP, Share, Solr, Web Quick Start and embedded Jetty run) Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 1 Choose org.alfresco.maven.archetype:alfresco-amp-archetype version:
  • 8. ᭱᪂䛾archetype version䜢㑅ᢥ 䠄䝕䝣䜷䝹䝖䠅 Choose org.alfresco.maven.archetype:alfresco-amp-archetype version: 1: 1.0 2: 1.0.1 3: 1.0.2 4: 1.1.0 5: 1.1.1 Choose a number: 5: 䛣䛣䛿Enter䜢ᢲ䛧䛶䛭䛾䜎䜎䝕䝣䜷䝹䝖䛷䜒䜘䛔 䠄ᚋ䛷ኚ᭦䛷䛝䜛䠅
  • 9. ௒䛛䜙సᡂ䛩䜛䝥䝻䝆䜵䜽䝖䛾groupId䛸 artifactId䜢タᐃ Define value for property 'groupId': : jp.alfresco Define value for property 'artifactId': : sample-amp 䜰䞊䝔䜱䝣䜯䜽䝖䠖maven䛷స䜙䜜䜛䝥䝻䝆䜵䜽䝖䛸䛭䛾ᡂᯝ≀ groupId: 䛣䛾䜰䞊䝔䜱䝣䜯䜽䝖䜢సᡂ䛧䛯⤌⧊䛾ID䠄౛䛘䜀䚸఍♫䝗䝯䜲䞁䠅 ar2factId: 䛣䛾䜰䞊䝔䜱䝣䜯䜽䝖䛾Id
  • 10. 䝍䞊䝀䝑䝖䛸䛺䜛war䜔Alfresco䛾䝞䞊 䝆䝵䞁䛜䝕䝣䜷䝹䝖䛷タᐃ䛥䜜䜛! [INFO] Using property: version = 1.0-SNAPSHOT [INFO] Using property: package = (not used) [INFO] Using property: alfresco_target_amp_client_war = alfresco [INFO] Using property: alfresco_target_amp_client_war_groupId = org.alfresco [INFO] Using property: alfresco_target_amp_client_war_version = 4.2.e [INFO] Using property: alfresco_target_groupId = org.alfresco [INFO] Using property: alfresco_target_version = 4.2.e Confirm properties configuration: groupId: jp.alfresco artifactId: sample-amp version: 1.0-SNAPSHOT package: (not used) alfresco_target_amp_client_war: alfresco alfresco_target_amp_client_war_groupId: org.alfresco alfresco_target_amp_client_war_version: 4.2.e alfresco_target_groupId: org.alfresco alfresco_target_version: 4.2.e Y: : 䛣䛣䛿Enter䜢ᢲ䛧䛶䛭䛾䜎䜎䝕䝣䜷䝹䝖䛷䜒䜘䛔 䠄ᚋ䛷ኚ᭦䛷䛝䜛䠅
  • 12. AMP䝃䞁䝥䝹䜢䛭䛾䜎䜎ື䛛䛩 䝃䞁䝥䝹䝁䞊䝗䛜ධ䛳䛶䛔䜛䛾䛷䚸䛭䜜䜢ື䛛䛫䜛 mvn integra2on-­‐test -­‐Pamp-­‐to-­‐war 䝤䝷䜴䝄䛷䜰䜽䝉䝇 h;p://localhost:8080/alfresco
  • 13. Eclipse䜢౑䛳䛯⎔ቃᵓ⠏ ‽ഛ • Eclipse Kelper J2EE䛰䛸maven䜒ධ䛳䛶䛔䜛 • m2e Maven dependency plugin
  • 14. M2e Maven Dependency Plugin䛾 䜲䞁䝇䝖䞊䝹
  • 15. M2e Maven Dependency Plugin䛾 䜲䞁䝇䝖䞊䝹 “Add” 䛷 h;p://ianbrandt.github.io/m2e-­‐maven-­‐dependency-­‐plugin/snapshots/ 䛾䝃䜲䝖䜢㏣ຍ 䝏䜵䝑䜽䜢ධ䜜䛶”Next”
  • 19. 䝥䝻䝆䜵䜽䝖䛾㝵ᒙᵓ㐀 䝣䜯䜲䝹䠋䝕䜱䝺䜽䝖䝸 ㄝ䚷䚷䚷䚷䚷᫂ src/main/java Java䝁䞊䝗䜢⨨䛟ሙᡤ䚹 Alfresco.war䛜䝍䞊䝀䝑䝖䛾ሙྜ䚸 䛣䛣䛻⨨䛛䜜䛯䝁䞊䝗䛿jar໬䛥䜜 䛶WEB-­‐INF/lib䛻㓄⨨䛥䜜䜛 src/main/amp ampෆ䛾䝣䜯䜲䝹䛿䛣䛣䛻⨨䛟䠄ᚋ ㏙䠅 src/test/java 䝔䝇䝖⏝䛾䝁䞊䝗䜢⨨䛟ሙᡤ src/test/resources 䝔䝇䝖⏝䛾䝸䝋䞊䝇䝣䜯䜲䝹䜢⨨䛟 ሙᡤ pom.xml 䛣䛾䝥䝻䝆䜵䜽䝖䛾᝟ሗ䛜グ㍕䛥 䜜䜛䝣䜯䜲䝹䚹䠄౫Ꮡᛶ䚸䝍䞊䝀䝑䝖 ➼䠅
  • 21. What’s new in Alfresco SDK 2.0 • Alfresco Maven SDK䛾ḟ䛾䝞䞊䝆䝵䞁 • ⌧ᅾCommunity∧䛾䜏䚹Enterprise∧ 䛿௒᭶䝸䝸䞊䝇ணᐃ • Spring-loaded䜢౑䛳䛯䝩䝑䝖䝁䞊䝗䝸 䝻䞊䝗䛜ྍ⬟
  • 22. ‽ഛ • spring-loaded䛾䝎䜴䞁䝻䞊䝗 https://github.com/spring-projects/spring-loaded • MAVEN_OPTS䛾タᐃ export MAVEN_OPTS=-javaagent:/spring-loaded䜢⨨䛔䛯 䝣䜯䜲䝹䝟䝇/springloaded-1.2.0.RELEASE.jar -noverify - Xmx1024m -Xmx4096m -XX:PermSize=1024m
  • 23. 䝥䝻䝆䜵䜽䝖䛾సᡂ $ mvn archetype:generate -DarchetypeCatalog=https:// artifacts.alfresco.com/nexus/content/groups/public-snapshots/archetype-catalog. xml -Dfilter=org.alfresco.maven.archetype: pom.xml䛾ኚ᭦ parent groupIdorg.alfresco.maven/groupId ar2factIdalfresco-­‐sdk-­‐parent/ar2factId version2.0.0-­‐beta-­‐1/version /parent 2014/10/02⌧ᅾ 2.0.0-­‐beta-­‐3䛜᭱᪂∧ ᭱᪂䝞䞊䝆䝵䞁䛿௨ୗ䜢☜ㄆ䛟䛰䛥䛔䠖 h;ps://ar2facts.alfresco.com/nexus/content/groups/public/alfresco-­‐sdk-­‐aggregator/latest/index.html
  • 24. Demo
  • 25. For more info. • GitHub https://github.com/Alfresco/alfresco-sdk • Developer Document https://artifacts.alfresco.com/nexus/content/groups/ public/alfresco-sdk-aggregator/latest/index.html • Alfresco Documentation http://docs.alfresco.com/4.2/concepts/dev-extensions- maven-sdk-intro.html
  • 26. QA
  • 28. SLF4J䛾౫Ꮡᛶ䛾ゎỴ (pom.xml)! ᝟ሗ: WSSERVLET14: JAX-WS servlet initializing 8 09, 2014 6:36:32 ༗ᚋ㻌org.apache.catalina.core.ApplicationContext log ᝟ሗ: Marking servlet axis as unavailable 8 09, 2014 6:36:32 ༗ᚋ㻌org.apache.catalina.core.StandardContext loadOnStartup 㔜኱: Servlet /alfresco threw load() exception org.apache.commons.discovery.DiscoveryException: Class org.apache.commons.logging.impl.SLF4JLogFactory does not implement org.apache.commons.logging.LogFactory at org.apache.commons.discovery.tools.ClassUtils.verifyAncestory(ClassUtils.java:180) at org.apache.commons.discovery.tools.SPInterface.verifyAncestory(SPInterface.java:201) at org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:195) at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579) at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418) at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378) at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45) at java.security.AccessController.doPrivileged(Native Method) at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41) at org.apache.axis.components.logger.LogFactory.clinit(LogFactory.java:33) 䠄㏵୰␎䠅 8 09, 2014 6:36:33 ༗ᚋ㻌org.apache.coyote.AbstractProtocol start ᝟ሗ: Starting ProtocolHandler [http-bio-8080]