net.savantly.mesh:mesh-seeding-plugin

A parent pom for distribution management of OSS projects

License

License

Categories

Categories

Ant Build Tools Net
GroupId

GroupId

net.savantly.mesh
ArtifactId

ArtifactId

mesh-seeding-plugin
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

A parent pom for distribution management of OSS projects
Project URL

Project URL

https://github.com/savantly-net/mesh-seeding-plugin
Project Organization

Project Organization

savantly.net
Source Code Management

Source Code Management

https://github.com/savantly-net/mesh-seeding-plugin

Download mesh-seeding-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/net.savantly.mesh/mesh-seeding-plugin/ -->
<dependency>
    <groupId>net.savantly.mesh</groupId>
    <artifactId>mesh-seeding-plugin</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/net.savantly.mesh/mesh-seeding-plugin/
implementation 'net.savantly.mesh:mesh-seeding-plugin:0.0.1'
// https://jarcasting.com/artifacts/net.savantly.mesh/mesh-seeding-plugin/
implementation ("net.savantly.mesh:mesh-seeding-plugin:0.0.1")
'net.savantly.mesh:mesh-seeding-plugin:jar:0.0.1'
<dependency org="net.savantly.mesh" name="mesh-seeding-plugin" rev="0.0.1">
  <artifact name="mesh-seeding-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.savantly.mesh', module='mesh-seeding-plugin', version='0.0.1')
)
libraryDependencies += "net.savantly.mesh" % "mesh-seeding-plugin" % "0.0.1"
[net.savantly.mesh/mesh-seeding-plugin "0.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.antlr : stringtemplate jar 4.0.2

provided (2)

Group / Artifact Type Version
com.gentics.mesh » mesh-plugin-dep jar
com.gentics.mesh » mesh-service-jwt-auth jar

test (3)

Group / Artifact Type Version
junit : junit jar
com.gentics.mesh » mesh-test-common jar
com.gentics.mesh » mesh-core jar

Project Modules

There are no modules declared in this project.

Mesh Seeding Plugin

Quick start

Download the latest release mesh-seeding-plugin-x.x.x.jar

Put the jar file in your mesh plugins folder.
When mesh starts up, an empty plugin configuration file will be generated.

Configuration

This is an example of a configuration file that creates a project, microschema, schema, nodes, groups, roles, and associates groups to roles. The configuration file is parsed when mesh starts and the plugin is initialized.

meshScripts:
  test1:
    projectName: example
    microSchemaFiles:
      7b28ec90585140a8a8ec905851b0a8ec: "schemas/example_microschema.json"
    schemaFiles:
      5bdb2a9db6594a8e9b2a9db6593a8ef1: "schemas/example.json"
    nodeFiles:
      b60a50dbe8354acd8a50dbe835bacd09: "nodes/example_node1.json"
      a59ac0b6338f42c69ac0b6338f22c646: "nodes/example_node2.json"
      73aeb52bc5344345aeb52bc5345345c1: "nodes/example_node3.json"
    roles:
      - editor
      - contributor
    groups:
      - editor
      - contributor
    rolesToGroups:
      editor: editor
      contributor: contributor

If an artifact already exists, it passes over it.
The 'keys' in the json fields represent the IDs that will be assigned to the given artifact.
For example, 7b28ec90585140a8a8ec905851b0a8ec: "schemas/example_microschema.json" will generate the microschema with the id of 7b28ec90585140a8a8ec905851b0a8ec.

Since the IDs are provided manually - they can be referenced from inside the json schema/node json docs.

See the test resources for more examples -
src/test/resources

Development

The plugin could be improved by replacing the blocking calls with non-blocking calls.
Also, an enhancement might be to allows nested configuration structures to more easily identify dependencies.

Feel free to create PRs!

net.savantly.mesh

Savantly

Savantly custom software solutions for your business

Versions

Version
0.0.1