Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gravitee-io/gravitee-service-maven-archetype


https://github.com/gravitee-io/gravitee-service-maven-archetype

security-scan

Last synced: 10 days ago
JSON representation

Awesome Lists containing this project

README

        

= gravitee-service-maven-archetype

ifdef::env-github[]
image:https://ci.gravitee.io/buildStatus/icon?job=gravitee-io/gravitee-service-maven-archetype/master["Build status", link="https://ci.gravitee.io/job/gravitee-io/job/gravitee-service-maven-archetype/"]
image:https://f.hubspotusercontent40.net/hubfs/7600448/gravitee-github-button.jpg["Join the community forum", link="https://community.gravitee.io?utm_source=readme", height=20]
endif::[]

Maven Archetype to create a Gravitee Service

== Get started

Archetype is already registered into the http://central.sonatype.org/pages/ossrh-guide.html[OSS repositories]. Don't forget to activate them in your Maven settings.

== Service generation

You could generate your Service like this:

```bash
mvn archetype:generate\
-DarchetypeGroupId=io.gravitee.maven.archetypes\
-DarchetypeArtifactId=gravitee-service-maven-archetype\
-DarchetypeVersion=1.0.0\
-DartifactId=foo-service\
-DgroupId=my.gravitee.service\
-Dversion=1.0.0-SNAPSHOT\
-DpolicyName=FooService
```

Once executed and parameters confirmed, the above command will create the ``foo-service`` directory containing the following structure:

```
.
├── pom.xml
├── README.adoc
└── src
├── assembly
│ └── service-assembly.xml
├── main
│ ├── java
│ │ └── my
│ │ └── gravitee
│ │ └── extension
│ │ └── service
│ │ └── FooService.java
│ └── resources
│ └── plugin.properties
└── test
└── java
└── my
└── gravitee
└── extension
└── service
└── FooServiceTest.java
```

Hereafter a description about the different generated files:

|===
| File | Description |

| pom.xml | The main Maven POM file |
| README.adoc | The main entry point for documentation of the Service |
| service-assembly.xml | The common Maven assembly descriptor for any Services |
| FooService.java | The Service class, from which the business behavior is implemented |
| plugin.properties | The Service descriptor file |
| FooServiceTest.java | The Service unit test Java class |
|===