You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: maven-sdk/maven-sdk-tutorial/maven-sdk-tutorial-platform-docker/src/main/docker/alfresco-global.properties
<p>This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.</p>
<p>The goal of the Maven-based SDK is to make it extremely easy for you to get started with Alfresco development. It consists of a project template (an "archetype" in Maven parlance) and some built-in smarts that make Maven understand how to create AMPs and deploy them to Alfresco.</p>
85
84
<p>If you are writing your own custom application that is separate from the Alfresco and Share WARs you don't need the Alfresco Maven SDK. But if you intend to write code that runs within either of those web applications, the Alfresco Maven SDK is where you need to start.</p>
86
-
<p>A quick word about versions. This tutorial assumes you are using Alfresco Maven SDK 4.0 which works with Alfresco 6.0.1 and higher. If you are using a version of Alfresco older than 6.0.1 but greater than or equal to 4.2.7, you can use version 3.0.1 of the SDK. The biggest difference between 4.0 and 3.0.1 is the use of Docker instead of an embedded Tomcat and in-memory database.</p>
85
+
<p>A quick word about versions. This tutorial assumes you are using Alfresco Maven SDK 4.1 which works with Alfresco 6.2 and higher. If you are using a version of Alfresco older than 6.2 but greater than or equal to 6.0.1, you can use version 4.0 of the SDK. If you are using a version of Alfresco older than 6.0.1 but greater than or equal to 4.2.7, you can use version 3.0.1 of the SDK. The biggest difference between 4.0 and 3.0.1 is the use of Docker instead of an embedded Tomcat and in-memory database.</p>
87
86
<p>If you are using a version of Alfresco newer than 4.0 but older than 4.2.7 you can use version 2.x of the SDK. You can use the 2.x version of the SDK with this and other tutorials if you must, but you'll almost surely be affected by some differences. If you are using a version of Alfresco older than 4.x you'll have to use the old Ant-based SDK. The rest of this document won't apply to you.</p>
88
87
<p>Now you have a high-level understanding of Apache Maven, AMPs, and the Alfresco Maven SDK. It's time to see them in action.</p>
89
88
<h1id="your-first-project">Your First Project</h1>
90
89
<p>Let me show you how easy it can be to get started with Alfresco development using the Alfresco Maven SDK. Before I start I'm going to assume you have the following installed:</p>
91
90
<ul>
92
-
<li>Java 1.8.0_201</li>
93
-
<li>Apache Maven 3.3.9</li>
94
-
<li>Alfresco Maven SDK 4.0 (No download necessary)</li>
95
-
<li>Docker 18.09.2</li>
96
-
<li>Docker Compose 1.23.2</li>
91
+
<li>MacOS 10.15.4</li>
92
+
<li>Java OpenJDK 11.0.2</li>
93
+
<li>Apache Maven 3.6.3</li>
94
+
<li>Alfresco Maven SDK 4.1 (No download necessary)</li>
95
+
<li>Docker 19.03.8</li>
96
+
<li>Docker Compose 1.25.4</li>
97
97
</ul>
98
98
<p>You don't need to download anything else. Seriously. Not even Alfresco.</p>
99
99
<p>Here are the steps:</p>
@@ -167,7 +167,7 @@ <h2 id="other-commands-for-invoking-the-build">Other Commands for Invoking the B
167
167
<h2id="unit-integration-tests">Unit & Integration Tests</h2>
168
168
<p>You may have noticed that the default project includes a simple unit test in the platform module and some integration tests in the integration-tests module. By default, Maven will automatically run the unit tests and integration tests in your project unless you include <code>-DskipTests</code>.</p>
169
169
<p>It's a good practice to make sure that your project always includes unit tests and to run them every time you build. Many organizations run CI (Continuous Integration) tools that depend on this being the case. Running <code>mvn test</code> will compile and run the project's unit tests.</p>
170
-
<p>To run integration tests using SDK 4.0, first start up the server using <code>run.sh build_start</code>. Once it is running, do <code>run.sh test</code> to run the integration tests. You'll see something like:</p>
170
+
<p>To run integration tests using the SDK, first start up the server using <code>run.sh build_start</code>. Once it is running, do <code>run.sh test</code> to run the integration tests. You'll see something like:</p>
<li><p>Specify the directory that contains the maven-sdk-tutorial folder. Eclipse will inspect that folder and show your project in the projects list. Make sure the checkbox next to the project name is checked, then click Next.</p>
207
206
<divclass="figure">
208
207
<imgsrc="./images/select-maven-project.png" />
209
-
210
208
</div></li>
211
209
</ol>
212
210
<p>After clicking Finish, the project is imported into your Eclipse workspace.</p>
@@ -253,30 +251,25 @@ <h1 id="creating-projects-from-within-eclipse">Creating Projects from Within Ecl
253
251
<li><p>Specify $TUTORIAL_HOME, then click next.</p>
254
252
<divclass="figure">
255
253
<imgsrc="./images/new-maven-project.png" />
256
-
257
254
</div></li>
258
255
<li><p>Click Configure so we can add Alfresco's catalog to the list.</p>
259
256
<divclass="figure">
260
257
<imgsrc="./images/select-an-archetype.png" />
261
-
262
258
</div></li>
263
259
<li>Click Add Remote Catalog</li>
264
260
<li><p>Specify "https://nexus.alfresco.com/nexus/content/groups/public/archetype-catalog.xml" as the Catalog File. Specify "Alfresco Archetypes" as the description. Then, click OK and OK again to close the Preferences panel.</p>
265
261
<divclass="figure">
266
262
<imgsrc="./images/add-archetype-catalog.png" />
267
-
268
263
</div></li>
269
264
<li>Now select "Alfresco Archetypes" in the catalog and you'll see a bunch of archetypes show up in the list.</li>
270
265
<li>Specify "org.alfresco.maven.archetype" in the filter and you'll see the same archetypes that were presented to you as options on the command line at the start of the tutorial.</li>
271
266
<li><p>Select the alfresco-share-jar-archetype and click Next.</p>
272
267
<divclass="figure">
273
268
<imgsrc="./images/select-amp-archetype.png" />
274
-
275
269
</div></li>
276
270
<li><p>Specify "com.someco" for the groupId and "maven-sdk-tutorial-share" as the artifactId, then click Finish.</p>
<p>Now your new customization project is in your workspace. The next time you create a project using the archetype, it will be a few less steps because you won't have to add the catalog.</p>
@@ -289,7 +282,7 @@ <h1 id="other-topics-to-explore-on-your-own">Other Topics to Explore on Your Own
289
282
</ul>
290
283
<h1id="where-to-find-more-information">Where to Find More Information</h1>
291
284
<ul>
292
-
<li>The <ahref="https://docs.alfresco.com/5.2/concepts/sdk-intro.html">official documentation</a> on the Alfresco Maven SDK is on <ahref="https://docs.alfresco.com"class="uri">https://docs.alfresco.com</a>.</li>
285
+
<li>The <ahref="https://docs.alfresco.com/5.2/concepts/sdk-intro.html">official documentation</a> on the Alfresco Maven SDK is on <ahref="https://docs.alfresco.com">https://docs.alfresco.com</a>.</li>
293
286
<li>The <ahref="https://ecmarchitect.com/alfresco-developer-series">Alfresco Developer Series</a> on <ahref="https://ecmarchitect.com">ECM Architect</a> has free tutorials on custom content models, actions, behaviors, workflows, and web scripts.</li>
0 commit comments