1
1
% Getting Started with the Alfresco Maven SDK
2
2
% Jeff Potts, [ Metaversant Group] ( https://www.metaversant.com )
3
- % May, 2020
3
+ % July, 2021
4
4
5
5
License
6
6
=======
@@ -71,12 +71,13 @@ to write code that runs within either of those web applications, the Alfresco
71
71
Maven SDK is where you need to start.
72
72
73
73
A quick word about versions. This tutorial assumes you are using Alfresco Maven
74
- SDK 4.1 which works with Alfresco 6.2 and higher. If you are using a version of
75
- Alfresco older than 6.2 but greater than or equal to 6.0.1, you can use version
76
- 4.0 of the SDK. If you are using a version of Alfresco older than 6.0.1 but
77
- greater than or equal to 4.2.7, you can use version 3.0.1 of the SDK. The
78
- biggest difference between 4.0 and 3.0.1 is the use of Docker instead of an
79
- embedded Tomcat and in-memory database.
74
+ SDK 4.2 which works with Alfresco 7.0. If you are using a version of Alfresco
75
+ older than 7.0 but greater than or equal to 6.2, you can use version 4.1 of the
76
+ SDK. If you are using a version of Alfresco older than 6.2 but greater than or
77
+ equal to 6.0.1, you can use version 4.0 of the SDK. If you are using a version
78
+ of Alfresco older than 6.0.1 but greater than or equal to 4.2.7, you can use
79
+ version 3.0.1 of the SDK. The biggest difference between 4.0 and 3.0.1 is the
80
+ use of Docker instead of an embedded Tomcat and in-memory database.
80
81
81
82
If you are using a version of Alfresco newer than 4.0 but older than 4.2.7 you
82
83
can use version 2.x of the SDK. You can use the 2.x version of the SDK with this
@@ -93,12 +94,12 @@ Let me show you how easy it can be to get started with Alfresco development
93
94
using the Alfresco Maven SDK. Before I start I'm going to assume you have the
94
95
following installed:
95
96
96
- * MacOS 10.15 .4
97
+ * MacOS 11 .4
97
98
* Java OpenJDK 11.0.2
98
- * Apache Maven 3.6.3
99
- * Alfresco Maven SDK 4.1 (No download necessary)
100
- * Docker 19.03.8
101
- * Docker Compose 1.25.4
99
+ * Apache Maven 3.8.1
100
+ * Alfresco Maven SDK 4.2 (No download necessary)
101
+ * Docker 20.10.6
102
+ * Docker Compose 1.29.1
102
103
103
104
You don't need to download anything else. Seriously. Not even Alfresco.
104
105
@@ -136,7 +137,7 @@ several available:
136
137
(2 in this example) and hit enter.
137
138
138
139
4 . If Maven asks you to specify the version of the archetype you want, choose
139
- 4.0 .
140
+ 4.2 .
140
141
141
142
5 . Maven now asks for a groupId. You should be thinking "Java package". My
142
143
examples always assume I am working at a fictitious company called SomeCo,
@@ -285,7 +286,7 @@ In 3.0.1 you may see some stack traces after running `mvn install`. If you
285
286
scroll up a bit, you'll see that the tests ran successfully. The stack traces
286
287
are a known issue related to Tomcat shutdown hooks and can safely be ignored.
287
288
288
- In 4.0 , the containers need to be running before executing the tests. We'll
289
+ In SDK 4.x , the containers need to be running before executing the tests. We'll
289
290
cover that in the next section.
290
291
291
292
Unit & Integration Tests
@@ -409,10 +410,12 @@ Inside the project directory, you'll see:
409
410
* * pom.xml* In the root of the project directory you'll see pom.xml. This tells
410
411
Maven everything it needs to know about your project. Remember those settings
411
412
you specified when you created the project from the archetype? You can make
412
- changes to those settings here. For example, version 4.0 of the archetype
413
- assumes you are working with Alfresco Community Edition 6 .0.7 . If you wanted to
413
+ changes to those settings here. For example, version 4.2 of the archetype
414
+ assumes you are working with Alfresco Community Edition 7 .0.0 . If you wanted to
414
415
work with a different version, you would simply change those properties and then
415
- tell Maven to update and it will take care of the rest.
416
+ tell Maven to update and it will take care of the rest. Check the Alfresco docs
417
+ to make sure the version of Alfresco you are trying to use is compatible with
418
+ the version of the SDK you are using.
416
419
417
420
Now look at "maven-sdk-tutorial-platform". In it, you'll find:
418
421
0 commit comments