https://github.com/aamend/morphir-spark-archetype
https://github.com/aamend/morphir-spark-archetype
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aamend/morphir-spark-archetype
- Owner: aamend
- License: apache-2.0
- Created: 2022-10-03T14:28:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-23T04:14:54.000Z (over 3 years ago)
- Last Synced: 2025-05-22T22:41:07.797Z (about 1 year ago)
- Language: Elm
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Morphir Spark Archetype
*This project was created to make development of [Morphir](https://morphir.finos.org/) applications easier
using [maven archetypes](https://maven.apache.org/guides/introduction/introduction-to-archetypes.html). Not only we
package ELM code to follow JVM based project best practices, but wraps morphir lifecycle to maven goals in order to
enforce CI/CD and actionable models.*
[](https://finosfoundation.atlassian.net/wiki/display/FINOS/Incubating)
[]()
[](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22morphir-spark-archetype)
## Compile
```shell
mvn clean install
```
## Release
```shell
mvn release:prepare
mvn release:perform
```
This will publish our archetype to maven central, hence accessible as an official maven package.
## Usage
```shell
mvn archetype:generate \
-DarchetypeGroupId=org.finos.morphir \
-DarchetypeArtifactId=morphir-spark-archetype \
-DarchetypeVersion=1.0-SNAPSHOT \
-DgroupId=com.aamend.morphir \
-DartifactId=reporting \
[-DmorphirVersion=18.1.0]
```
This command will generate a new morphir project `reporting` under group `com.aamend.morphir`. This project will be
compiled / tested / packaged using standard maven operations (provided native morphir-elm library installed and
available on path - see below)
### Generated project
The project generated from this archetype (`com.aamend.morphir:reporting:1.0-SNAPSHOT`) will be maven compatible and as
such will comply with the following commands
- `mvn package`: compile *.elm code to scala (spark) and scala to byte code (packaged as a jar)
- `mvn test`: runs unit tests expressed as `morphir-tests.json` (skipped if no file is found)
- `mvn install`: deploy generated jar `com.aamend.morphir_reporting_1.0-SNAPSHOT.jar` to local `~/.m2`
- `mvn deploy`: deploy generated jar to target ``
- `mvn release`: leverage maven release plugins (if specified) to release a new spark ready package
- etc.
Note that these maven commands will be executed conditional to npm and native morphir-elm dependencies to be available
```shell
sudo apt-get -y -q install npm
npm install -g morphir-elm
```
## Author
Databricks, Inc.
## License
Copyright 2022 Databricks, Inc.
Distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
SPDX-License-Identifier: [Apache-2.0](https://spdx.org/licenses/Apache-2.0)