SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler offline
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)

Mais conteúdo relacionado

Mais procurados

DEFCON 18- These Aren't the Permissions You're Looking For
DEFCON 18- These Aren't the Permissions You're Looking ForDEFCON 18- These Aren't the Permissions You're Looking For
DEFCON 18- These Aren't the Permissions You're Looking For
Michael Scovetta
 
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Atlassian
 

Mais procurados (12)

Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansible
 
Console Apps: php artisan forthe:win
Console Apps: php artisan forthe:winConsole Apps: php artisan forthe:win
Console Apps: php artisan forthe:win
 
OSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspecOSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspec
 
Play with Alfresco ADF 2.0.0 Angular
Play with Alfresco ADF 2.0.0 AngularPlay with Alfresco ADF 2.0.0 Angular
Play with Alfresco ADF 2.0.0 Angular
 
DEFCON 18- These Aren't the Permissions You're Looking For
DEFCON 18- These Aren't the Permissions You're Looking ForDEFCON 18- These Aren't the Permissions You're Looking For
DEFCON 18- These Aren't the Permissions You're Looking For
 
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
 
Monitor-Driven Development Using Ansible
Monitor-Driven Development Using AnsibleMonitor-Driven Development Using Ansible
Monitor-Driven Development Using Ansible
 
React Ecosystem
React EcosystemReact Ecosystem
React Ecosystem
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with Ansible
 
Making Joomla Insecure - Explaining security by breaking it
Making Joomla Insecure - Explaining security by breaking itMaking Joomla Insecure - Explaining security by breaking it
Making Joomla Insecure - Explaining security by breaking it
 
Chef - Infrastructure Automation for the Masses
Chef - Infrastructure Automation for the Masses�Chef - Infrastructure Automation for the Masses�
Chef - Infrastructure Automation for the Masses
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components Introduction
 

Semelhante a Alfresco sdk 2.0

Slides Aquarium Paris 2008
Slides Aquarium Paris 2008Slides Aquarium Paris 2008
Slides Aquarium Paris 2008
julien.ponge
 

Semelhante a Alfresco sdk 2.0 (20)

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

Último

%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Último (20)

What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 

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]