Skip to content

Commit 6457f0b

Browse files
committed
[feature] A new Maven Archetype for creating EXPath Packages in Elemental
0 parents  commit 6457f0b

51 files changed

Lines changed: 5713 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2.1
2+
3+
4+
orbs:
5+
maven: circleci/maven@2.0.0
6+
7+
8+
jobs:
9+
build-and-test:
10+
docker:
11+
- image: "cimg/openjdk:8.0"
12+
resource_class: "small"
13+
steps:
14+
- checkout
15+
- maven/with_cache:
16+
verify_dependencies: true
17+
steps:
18+
- steps:
19+
- run:
20+
name: "Maven - Build Package"
21+
command: mvn -V -DskipTests=true install
22+
- run:
23+
name: "Maven - Test Package"
24+
command: mvn verify
25+
26+
27+
workflows:
28+
build-and-test:
29+
jobs:
30+
- build-and-test

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: maven
4+
directory: "/"
5+
schedule:
6+
interval: daily

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
target/
3+
.idea/
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

LICENSE

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
Business Source License 1.1
2+
3+
Parameters
4+
5+
Licensor: Evolved Binary Ltd
6+
7+
Licensed Work: Elemental EXPath Package Archetype
8+
The Licensed Work is (c) 2024 Evolved Binary Ltd
9+
10+
Additional Use Grant: Production use of the Licensed Work for a permitted
11+
purpose. A Permitted Purpose is any purpose other than a
12+
Competing Use. A Competing Use means making the Software
13+
available to others in a commercial product or service
14+
that: substitutes for the Software; substitutes for any
15+
other product or service we offer using the Software
16+
that exists as of the date we make the Software
17+
available; or offers the same or substantially similar
18+
functionality as the Software.
19+
20+
Change Date: 2028-06-02
21+
22+
Change License: Apache License, Version 2.0
23+
24+
For information about alternative licensing arrangements for the Software,
25+
please visit: https://www.elemental.xyz
26+
27+
Notice
28+
29+
The Business Source License (this document, or the “License”) is not an Open
30+
Source license. However, the Licensed Work will eventually be made available
31+
under an Open Source License, as stated in this License.
32+
33+
License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
34+
“Business Source License” is a trademark of MariaDB Corporation Ab.
35+
36+
-----------------------------------------------------------------------------
37+
38+
Business Source License 1.1
39+
40+
Terms
41+
42+
The Licensor hereby grants you the right to copy, modify, create derivative
43+
works, redistribute, and make non-production use of the Licensed Work. The
44+
Licensor may make an Additional Use Grant, above, permitting limited
45+
production use.
46+
47+
Effective on the Change Date, or the fourth anniversary of the first publicly
48+
available distribution of a specific version of the Licensed Work under this
49+
License, whichever comes first, the Licensor hereby grants you rights under
50+
the terms of the Change License, and the rights granted in the paragraph
51+
above terminate.
52+
53+
If your use of the Licensed Work does not comply with the requirements
54+
currently in effect as described in this License, you must purchase a
55+
commercial license from the Licensor, its affiliated entities, or authorized
56+
resellers, or you must refrain from using the Licensed Work.
57+
58+
All copies of the original and modified Licensed Work, and derivative works
59+
of the Licensed Work, are subject to this License. This License applies
60+
separately for each version of the Licensed Work and the Change Date may vary
61+
for each version of the Licensed Work released by Licensor.
62+
63+
You must conspicuously display this License on each original or modified copy
64+
of the Licensed Work. If you receive the Licensed Work in original or
65+
modified form from a third party, the terms and conditions set forth in this
66+
License apply to your use of that work.
67+
68+
Any use of the Licensed Work in violation of this License will automatically
69+
terminate your rights under this License for the current and all other
70+
versions of the Licensed Work.
71+
72+
This License does not grant you any right in any trademark or logo of
73+
Licensor or its affiliates (provided that you may use a trademark or logo of
74+
Licensor as expressly required by this License).
75+
76+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
77+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
78+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
79+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
80+
TITLE.
81+
82+
MariaDB hereby grants you permission to use this License’s text to license
83+
your works, and to refer to it using the trademark “Business Source License”,
84+
as long as you comply with the Covenants of Licensor below.
85+
86+
Covenants of Licensor
87+
88+
In consideration of the right to use this License’s text and the “Business
89+
Source License” name and trademark, Licensor covenants to MariaDB, and to all
90+
other recipients of the licensed work to be provided by Licensor:
91+
92+
1. To specify as the Change License the GPL Version 2.0 or any later version,
93+
or a license that is compatible with GPL Version 2.0 or a later version,
94+
where “compatible” means that software provided under the Change License can
95+
be included in a program with software provided under GPL Version 2.0 or a
96+
later version. Licensor may specify additional Change Licenses without
97+
limitation.
98+
99+
2. To either: (a) specify an additional grant of rights to use that does not
100+
impose any additional restriction on the right granted in this License, as
101+
the Additional Use Grant; or (b) insert the text “None”.
102+
103+
3. To specify a Change Date.
104+
105+
4. Not to modify this License in any other way.

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Maven Archetype for EXPath Packages in Elemental
2+
3+
[![Build Status](https://dl.circleci.com/status-badge/img/gh/evolvedbinary/elemental-expath-package-archetype/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/evolvedbinary/elemental-expath-package-archetype/tree/main)
4+
[![License](https://img.shields.io/badge/license-BSL%201.1-blue.svg)](https://mariadb.com/bsl11/)
5+
[![Maven Central](https://img.shields.io/maven-central/v/xyz.elemental.expath/elemental-expath-package-archetype?logo=apachemaven&label=maven+central&color=green)](https://central.sonatype.com/search?namespace=xyz.elemental.expath)
6+
[![Slack](https://img.shields.io/badge/elemental-slack-56b6f8.svg?logo=slack)](https://join.slack.com/t/elemental-xyz/shared_invite/zt-34r53san4-fzHCV0vDT9lYSMChUdn3cQ)
7+
[![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-contributor%20covenant-5e0d73.svg?logo=contributorcovenant)](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html)
8+
9+
This [archetype](https://maven.apache.org/guides/introduction/introduction-to-archetypes.html) can be used to generate a skeleton project for building an EXPath Package that is deployable to [Elemental](https://github.com/evolvedbinary/elemental).
10+
11+
Whilst this repository contains the source code for the archetype, you do not need that to just use the archetype.
12+
The archetype has been deployed to Maven Central and will be downloaded for you when you invoke it.
13+
14+
## Usage
15+
From your Terminal or Command Line, change into a directory on your system where you keep your projects,
16+
and then run Maven with this archetype to create a Maven Project that you can use as a skeleton for your new EXPath Package.
17+
18+
```bash
19+
$ cd my-projects
20+
$ mvn archetype:generate \
21+
-DarchetypeGroupId=xyz.elemental.expath \
22+
-DarchetypeArtifactId=elemental-expath-package-archetype \
23+
-DarchetypeVersion=1.0.0
24+
```
25+
26+
Maven will then prompt you for a `groupId`, `artifactId`, `version`, and `package` for your project.
27+
You need only specify the `groupId` and `artifactId`, for the others you may accept the defaults (or modify them as you wish).
28+
29+
* `groupId` is similar to a Java package name. If you are going to publish your XAR publicly it should be some sub-coordinate of a domain name that you have responsibility for supplied in reverse order notation. For example, if your company is "*My Organisation Ltd*" you might own the domain name `myorganisation.com`, you might decide that a suitable subdomain for your EXPath Package might be `app.myorganisation.com`. **Note:** this subdomain does not have to be able to be de-referenced.
30+
31+
* `artifactId` is just a simple name without spaces for the App itself. Together the `groupId:appId` coordinate must be unique.
32+
33+
* `version` the version number of your package. In Maven terms `-SNAPSHOT` are development versions. Your first version should always be `1.0.0-SNAPSHOT`, whereby the first release subsequently becomes `1.0.0`.
34+
35+
36+
e.g.:
37+
38+
```bash
39+
Define value for property 'groupId': : com.myorganisation.app
40+
Define value for property 'artifactId': : my-app1
41+
Define value for property 'version': 1.0.0-SNAPSHOT: :
42+
Define value for property 'package': com.myorganisation.app: :
43+
Confirm properties configuration:
44+
groupId: com.myorganisation.app
45+
artifactId: my-app1
46+
version: 1.0.0-SNAPSHOT
47+
package: com.myorganisation.app
48+
Y: : y
49+
```
50+
51+
After running this process, a new directory will have been created for you that matches the `artifactId` name that you specified above.
52+
53+
NOTE: The project has been set up to expect to be under Git version control. If you are not already in a Git repository, you should then create one:
54+
55+
```bash
56+
$ cd my-app1
57+
$ git init
58+
$ git add .gitignore pom.xml src/ xar-assembly.xml xquery-license-style.xml LICENSE README.md
59+
$ git commit -m "Start of my EXPath Package"
60+
```
61+
62+
You should now consult the `README.md` of your `my-app1` for further instructions and documentation.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Elemental
2+
Copyright (C) 2024, Evolved Binary Ltd
3+
4+
admin@evolvedbinary.com
5+
https://www.evolvedbinary.com | https://www.elemental.xyz
6+
7+
Use of this software is governed by the Business Source License 1.1
8+
included in the LICENSE file and at www.mariadb.com/bsl11.
9+
10+
Change Date: ${change-date}
11+
12+
On the date above, in accordance with the Business Source License, use
13+
of this software will be governed by the Apache License, Version 2.0.
14+
15+
Additional Use Grant: Production use of the Licensed Work for a permitted
16+
purpose. A Permitted Purpose is any purpose other than a Competing Use.
17+
A Competing Use means making the Software available to others in a commercial
18+
product or service that: substitutes for the Software; substitutes for any
19+
other product or service we offer using the Software that exists as of the
20+
date we make the Software available; or offers the same or substantially
21+
similar functionality as the Software.

0 commit comments

Comments
 (0)