... |
... |
@@ -10,84 +10,80 @@ |
10 |
10 |
|
11 |
11 |
== Projekt-Setup == |
12 |
12 |
|
13 |
|
-Zu Beginn der Entwicklung eines Plugins ist es nötig das entsprechende Entwicklungsprojekt aufzusetzten und zu konfigurieren. Für letzteres kommt hierbei das Build-Management-Tool [[Apache Maven>>url:https://maven.apache.org/||rel="__blank"]] zum Einsatz. Um die entsprechenden Abhängigkeiten zu {{formcycle case="dat"/}} bereitzustellen ist ein Repository unter der URL [[https:~~/~~/artifactory.xima-services.de/artifactory/fc-plugin-dev>>url:https://artifactory.xima-services.de/artifactory/fc-plugin-dev]] zu benutzen. Dieses beinhaltet alle öffentlich zur Verfügung stehenden Artefakte welche dem Plugin zur Laufzeit bereitgestellt und während der Entwicklung benötigt werden. Augangspunkt ist hierbei das Artefakt //fc-plugin-common//, welches die einzelnen Plugin-Schnittstellen beinhaltet und auch auf [[unserere Downloadseite zur Verfügung steht>>url:http://artifactory.xima-services.de/artifactory/fc-plugin-dev/de/xima/fc/fc-plugin-common/]]. Ein Auszug des Project Object Models (pom.xml) sieht dem entsprechend beispielhaft wie folgt aus: |
|
13 |
+Zu Beginn der Entwicklung eines Plugins ist es nötig das entsprechende Entwicklungsprojekt aufzusetzten und zu konfigurieren. |
14 |
14 |
|
15 |
|
-{{panel title="Beispiel für pom.xml" fullwidth="true" initial="hidden" triggerable="true"}} |
16 |
|
-{{code language="xml"}} |
17 |
|
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
18 |
|
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
15 |
+Für letzteres empfehlen wir hierbei das Build-Management-Tool [[Apache Maven>>url:https://maven.apache.org/||rel="__blank"]] zum Einsatz. Andere Build-Tools können prinzipiell benutzt werden, hier können wir aber keine Hilfe bereitstellen. |
19 |
19 |
|
20 |
|
-... |
|
17 |
+Um die entsprechenden Abhängigkeiten zu {{formcycle case="dat"/}} bereitzustellen, ist das Repository unter der URL [[https:~~/~~/artifactory.xima-services.de/artifactory/fc-plugin-dev>>url:https://artifactory.xima-services.de/artifactory/fc-plugin-dev]] zu benutzen. Dieses enthält alle öffentlich zur Verfügung stehenden Artefakte, welche dem Plugin zur Laufzeit bereitgestellt und während der Entwicklung benötigt werden. Ausgangspunkt ist hierbei das Artefakt //fc-plugin-common//, welches die einzelnen Plugin-Schnittstellen beinhaltet und auch auf [[unserere Downloadseite zur Verfügung steht>>url:http://artifactory.xima-services.de/artifactory/fc-plugin-dev/de/xima/fc/fc-plugin-common/]]. |
21 |
21 |
|
22 |
|
- <properties> |
23 |
|
- <!-- Configuration --> |
24 |
|
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|
19 |
+Damit das Repository auch beim Bauen mit Maven verwendet wird, sollte folgendes in die Maven-Konfigurationsdatei //settings.xml// geschrieben werden. Diese Datei findet sich in der Regeln im //.m2//-Ordner im Home-Verzeichnis des aktuellen Nutzers. Unter Linux //~/.m2/settings.xml// und unter Windows //%homepath%\.m2\settings.xml//: |
25 |
25 |
|
26 |
|
- <!-- Dependencies --> |
27 |
|
- <xfc.version>7.0.9</xfc.version> |
|
21 |
+{{panel title="~/.m2/settings.xml" fullwidth="true" initial="hidden" triggerable="true"}} |
|
22 |
+{{code language="xml"}} |
|
23 |
+<?xml version="1.0" encoding="UTF-8"?> |
|
24 |
+<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0" |
|
25 |
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
28 |
28 |
|
29 |
|
- <!-- Plugins --> |
30 |
|
- <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version> |
31 |
|
- <maven-jar-plugin.version>3.1.0</maven-jar-plugin.version> |
32 |
|
- </properties> |
|
27 |
+ <!-- Add XIMA artifactory --> |
|
28 |
+ <profiles> |
|
29 |
+ <profile> |
|
30 |
+ <repositories> |
|
31 |
+ <repository> |
|
32 |
+ <snapshots> |
|
33 |
+ <enabled>false</enabled> |
|
34 |
+ </snapshots> |
|
35 |
+ <id>xima</id> |
|
36 |
+ <name>libs-release</name> |
|
37 |
+ <url>https://artifactory.xima-services.de/artifactory/fc-plugin-dev</url> |
|
38 |
+ </repository> |
|
39 |
+ </repositories> |
|
40 |
+ <pluginRepositories> |
|
41 |
+ <pluginRepository> |
|
42 |
+ <snapshots> |
|
43 |
+ <enabled>false</enabled> |
|
44 |
+ </snapshots> |
|
45 |
+ <id>xima</id> |
|
46 |
+ <name>plugins-release</name> |
|
47 |
+ <url>https://artifactory.xima-services.de/artifactory/fc-plugin-dev</url> |
|
48 |
+ </pluginRepository> |
|
49 |
+ </pluginRepositories> |
|
50 |
+ <id>xima-artifactory</id> |
|
51 |
+ </profile> |
|
52 |
+ </profiles> |
33 |
33 |
|
34 |
|
- <repositories> |
35 |
|
- <repository> |
36 |
|
- <id>xima</id> |
37 |
|
- <name>fc-plugin-dev</name> |
38 |
|
- <url>https://artifactory.xima-services.de/artifactory/fc-plugin-dev</url> |
39 |
|
- </repository> |
40 |
|
- </repositories> |
|
54 |
+ <!-- Enable XIMA artifactory by default --> |
|
55 |
+ <activeProfiles> |
|
56 |
+ <activeProfile>xima-artifactory</activeProfile> |
|
57 |
+ </activeProfiles> |
41 |
41 |
|
42 |
|
- <dependencies> |
43 |
|
- <dependency> |
44 |
|
- <groupId>de.xima.fc</groupId> |
45 |
|
- <artifactId>fc-plugin-common</artifactId> |
46 |
|
- <version>${xfc.version}</version> |
47 |
|
- <scope>provided</scope> |
48 |
|
- </dependency> |
49 |
|
- </dependencies> |
|
59 |
+ <!-- FORMCYCLE specific Maven plugins provided by XIMA --> |
|
60 |
+ <pluginGroups> |
|
61 |
+ <pluginGroup>de.xima.fc.maven.plugin</pluginGroup> |
|
62 |
+ </pluginGroups> |
|
63 |
+</settings> |
|
64 |
+{{/code}} |
|
65 |
+{{/panel}} |
50 |
50 |
|
51 |
|
- <build> |
52 |
|
- <plugins> |
53 |
|
- <plugin> |
54 |
|
- <groupId>org.apache.maven.plugins</groupId> |
55 |
|
- <artifactId>maven-compiler-plugin</artifactId> |
56 |
|
- <version>${maven-compiler-plugin.version}</version> |
57 |
|
- <configuration> |
58 |
|
- <release>11</release> |
59 |
|
- <encoding>UTF-8</encoding> |
60 |
|
- </configuration> |
61 |
|
- </plugin> |
|
67 |
+In der //pom.xml// des Plugin-Projekts kann die Abhängigkeit dann wie folgt eingebunden werden: |
62 |
62 |
|
63 |
|
- <plugin> |
64 |
|
- <groupId>org.apache.maven.plugins</groupId> |
65 |
|
- <artifactId>maven-jar-plugin</artifactId> |
66 |
|
- <version>${maven-jar-plugin.version}</version> |
67 |
|
- <configuration> |
68 |
|
- <archive> |
69 |
|
- <manifest> |
70 |
|
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries> |
71 |
|
- </manifest> |
72 |
|
- <manifestEntries> |
73 |
|
- <formcycle-version-requirement>${xfc.version}</formcycle-version-requirement> |
74 |
|
- <Build-Time>${maven.build.timestamp}</Build-Time> |
75 |
|
- </manifestEntries> |
76 |
|
- </archive> |
77 |
|
- </configuration> |
78 |
|
- </plugin> |
|
69 |
+{{code language="xml"}} |
|
70 |
+ <properties> |
|
71 |
+ <xfc.version>7.0.10</xfc.version> |
|
72 |
+ </properties> |
79 |
79 |
|
80 |
|
- </plugins> |
81 |
|
- </build> |
82 |
|
-</project> |
83 |
|
- |
|
74 |
+ <dependencies> |
|
75 |
+ <dependency> |
|
76 |
+ <groupId>de.xima.fc</groupId> |
|
77 |
+ <artifactId>fc-plugin-common</artifactId> |
|
78 |
+ <version>${xfc.version}</version> |
|
79 |
+ <scope>provided</scope> |
|
80 |
+ </dependency> |
|
81 |
+ </dependencies> |
84 |
84 |
{{/code}} |
85 |
|
-{{/panel}} |
86 |
86 |
|
87 |
87 |
Ferner steht je nach Tiefe der Integration in die bestehende Umgebung von {{formcycle case="dat"/}} und dessen Benutzung als höchste Implementierung das Artefakt //fc-logic// zur Verfügung. Dieses wird wie folgt als weitere (oder einzige) Abhängigkeit definiert: |
88 |
88 |
|
89 |
89 |
{{code language="xml"}} |
90 |
|
-... |
91 |
91 |
<dependency> |
92 |
92 |
<groupId>de.xima.fc</groupId> |
93 |
93 |
<artifactId>fc-logic</artifactId> |
... |
... |
@@ -94,7 +94,6 @@ |
94 |
94 |
<version>${xfc.version}</version> |
95 |
95 |
<scope>provided</scope> |
96 |
96 |
</dependency> |
97 |
|
-... |
98 |
98 |
{{/code}} |
99 |
99 |
|
100 |
100 |
Eine entsprechende Benutzung ist vor allem bei der Verwendung der Datenbankschnittstelle sowie bei der Implementierung von eigenen Verarbeitungen nötig. Eine Vorlage für ein somit entstehendes Project Object Model finden Sie [[hier>>attach:pom.xml||rel="__blank"]]. |
... |
... |
@@ -107,6 +107,8 @@ |
107 |
107 |
|
108 |
108 |
Basierend auf der hiermit zur Verfügung stehenden Infrastruktur steht der Entwicklung von eigenen Plugin-Implementierungen nichts mehr im Wege. Die Installation erfolgt anschließend je nach Verwendungszweck über die Oberflächen [[Mandant-Plugins>>doc:Formcycle.UserInterface.Client.Plugins]] oder [[System-Plugins>>doc:Formcycle.SystemSettings.UserInterface.SystemPlugins]]. |
109 |
109 |
|
110 |
|
-== Demo-Plugins == |
|
105 |
+== Archetypes == |
111 |
111 |
|
112 |
|
-Um einen besseren Einstieg in die Plugin-Entwicklung zu finden, [[bieten wir auf unserer Downloadseite>>url:https://customer.formcycle.eu/index.php/s/PgdMrNOvbYEzhmr]] auch für jeden Plugintyp ein kommentiertes Demo-Maven-Projekt an. Sie können diese herunterladen und in der Entwicklungsumgebung ihrer Wahl einsehen und kompilieren. |
|
107 |
+TODO |
|
108 |
+ |
|
109 |
+Um einen besseren Einstieg in die Plugin-Entwicklung zu finden, [[bieten wir auf unserer Downloadseite>>url:https://customer.formcycle.eu/index.php/s/PgdMrNOvbYEzhmr]] |