@@ -18,18 +18,58 @@ Openapi specification maven artifacts (`packaging=yaml`) can be installed (local
1818Configure github package repo access
1919https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-with-a-personal-access-token
2020
21+ Example ` <profile> ` section of ` settings.xml ` for using ` cdoc2-openapi ` :
22+ ``` xml
23+ <profile >
24+ <id >github</id >
25+ <repositories >
26+ <repository >
27+ <id >central</id >
28+ <url >https://repo1.maven.org/maven2</url >
29+ </repository >
30+ <repository >
31+ <id >github</id >
32+ <url >https://maven.pkg.github.com/open-eid/cdoc2-openapi</url >
33+ </repository >
34+ </repositories >
35+ </profile >
36+ ```
37+
38+ Note: When pulling, the package index is based on the organization level, not the repository level.
39+ https://stackoverflow.com/questions/63041402/github-packages-single-maven-repository-for-github-organization
40+
41+
42+ Test that ` settings.xml ` is properly configured:
2143``` bash
2244mvn dependency::get -Dartifact=ee.cyber.cdoc2.openapi:cdoc2-key-capsules-openapi:2.1.0:yaml
2345```
2446
2547Optionally specifying
2648` -DremoteRepositories=github::::https://maven.pkg.github.com/open-eid/cdoc2-openapi `
2749
28- Copy:
50+ Or from Maven pom.xml:
51+
52+ ``` xml
53+ <dependency >
54+ <groupId >ee.cyber.cdoc2.openapi</groupId >
55+ <artifactId >cdoc2-key-capsules-openapi</artifactId >
56+ <version >2.1.0</version >
57+ <type >yaml</type >
58+ </dependency >
59+ ```
60+
61+ Copy into project directory:
2962``` bash
30- mvn dependency::copy -Dartifact=ee.cyber.cdoc2.openapi:cdoc2-key-capsules-openapi:2.0 .0:yaml -DoutputDirectory=./target/openapi
63+ mvn dependency::copy -Dartifact=ee.cyber.cdoc2.openapi:cdoc2-key-capsules-openapi:2.1 .0:yaml -DoutputDirectory=./target/openapi
3164```
3265
66+ ### Usage from Java Maven projects for code generation
67+
68+ See:
69+ * https://github.com/open-eid/cdoc2-java-ref-impl/blob/master/cdoc2-client/pom.xml
70+ * https://github.com/open-eid/cdoc2-capsule-server/blob/master/cdoc2-server-openapi/pom.xml
71+
72+
3373
3474## Usage from non-Java projects
3575
@@ -55,7 +95,7 @@ That will trigger `.github/workflows/maven-publish.yml` that will call `mvn depl
5595Deploy/publish OpenApi manually:
5696` mvn -Dproject.distributionManagement.repository.id=github -Dproject.distributionManagement.repository.url=https://maven.pkg.github.com/open-eid/cdoc2-openapi deploy `
5797
58- where ` project.distributionManagement.repository.id ` is <id > under <server > section of settings.xml .
98+ where ` project.distributionManagement.repository.id ` is ` <id> ` under ` <server> ` section fo settings.xml .
5999In most cases, this parameter will be required for authentication.
60100
61101Or use maven deploy: deploy-file directly to deploy single file:
@@ -77,11 +117,6 @@ Refer: https://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.htm
77117mvn dependency:purge-local-repository -DmanualInclude=ee.cyber.cdoc2.openapi:cdoc2-key-capsules-openapi
78118```
79119
80- ## Usage from Java Maven projects for code generation
81-
82- See:
83- * https://github.com/open-eid/cdoc2-java-ref-impl/blob/master/cdoc2-client/pom.xml
84- * https://github.com/open-eid/cdoc2-capsule-server/blob/master/cdoc2-server-openapi/pom.xml
85120
86121
87122
0 commit comments