# generator-camel

> Apache Camel + Spring Boot + Docker + Release plugin

Latest version **1.2.1** (published 2016-09-10) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install generator-camel
pnpm add generator-camel
yarn add generator-camel
bun add generator-camel
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2016-09-10 |
| First published | 2016-09-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Rodrigo Valerio |
| Maintainers | rsvalerio |
| Keywords | camel, java, apache, spring, yeoman-generator |

## Links

- npm: https://www.npmjs.com/package/generator-camel
- Repository: https://github.com/rsvalerio/generator-camel
- Issues: https://github.com/rsvalerio/generator-camel/issues
- npm.io page: https://npm.io/package/generator-camel

## Dependencies (4)

- [i](https://npm.io/package/i.md) ^0.3.5
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [yosay](https://npm.io/package/yosay.md) ^1.2.0
- [yeoman-generator](https://npm.io/package/yeoman-generator.md) ^0.24.1

## Alternatives

- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [persona-harness](https://npm.io/package/persona-harness.md) — 4.7K weekly downloads
- [@tsparticles/effect-bubble](https://npm.io/package/@tsparticles/effect-bubble.md) — 4.6K weekly downloads
- [f3d](https://npm.io/package/f3d.md) — 730 weekly downloads
- [spark-html-motion](https://npm.io/package/spark-html-motion.md) — 298 weekly downloads

## Recent versions

- 1.2.1 (latest) — 2016-09-10
- 1.2.0 — 2016-09-10
- 1.1.0 — 2016-09-08
- 1.0.0 — 2016-09-05
- 0.0.4 — 2016-09-04
- 0.0.3 — 2016-09-04
- 0.0.2 — 2016-09-04
- 0.0.1 — 2016-09-04

## README

[![NPM version][npm-image]][npm-url] [![Travis Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url]

# Apache Camel + Spring Boot + Docker project generator

 * Brings SpringBoot auto-configuration to Apache Camel
 * Auto-detection and spring context registration of producers templates, consumer templates and type converter, thanks to [Camel Spring Boot](http://camel.apache.org/spring-boot.html) component.
 * Generates an executable jar that can be easily started as Unix/Linux services using either init.d or systemd, thanks to [Spring Boot Maven Plugin](http://docs.spring.io/spring-boot/docs/1.4.0.RELEASE/maven-plugin/index.html).
 * Easy creation of docker image for the application, using spotify provided [Docker Maven Plugin](https://github.com/spotify/docker-maven-plugin)


## Installation

#### To generate a new project, we assume you have pre-installed

[Node.js](https://nodejs.org/)

```bash
brew install nodejs
``` 

[Yeoman](http://yeoman.io)

```bash
npm install -g yeoman
```

[Camel Generator](https://github.com/rsvalerio/generator-camel)

```bash
npm install -g generator-camel
```

#### To build the generated project, we assume you have pre-installed

[Maven](http://maven.apache.org/)

```bash
brew install maven
```

Docker - [Installation](https://docs.docker.com/engine/installation/)

## Usage

#### 1. Create new project:

```bash
mkdir myproject
cd myproject
yo camel
```

#### 2. Project structure

```bash
├── README.md                                          Project Readme file
├── pom.xml                                            Maven Project Object Model file
└── src
    ├── main
    │   ├── java
    │   │   └── com
    │   │       └── yourpackage
    │   │           ├── beans
    │   │           │   └── MyBean.java               Camel Bean Example
    │   │           └── routes
    │   │               ├── AppBootstrapRouter.java   Bootstrap the app
    │   │               └── MyRouter.java             Camel Route Example
    │   └── resources
    │       └── application.yml                       Properties (application.properties) file
    └── test
        ├── java
        └── resources
```

#### 3. Build the project

Generate the JAR package.

```bash
mvn package
```

Generate with the Docker image


```bash
mvn package docker:build
```

#### 4. Running the project

Using maven

```bash
mvn spring-boot:run
```

As a docker container

```bash
docker run -t appName
```

[As a Linux service](http://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html#deployment-service)

[As a Windows Service](http://docs.spring.io/spring-boot/docs/current/reference/html/deployment-windows.html)

#### 5. Release (optional)

1 - Initialize local git repository and do the first commit, at project root directory

```bash
git init
git add .
git commit -am'Initial commit'
```

2 - Start a local maven and git servers using docker-compose.

```bash
cd src/main/docker/ci
docker-compose up -d
```

3 - Create the remote source code repository 

```bash
docker-compose exec --user gitblit gitblit git init /opt/gitblit-data/git/appName.git --bare
```

4 - Doing a simple release (will ask for release versions information)

```bash
mvn release:prepare
mvn release:perform
```

[Maven Release Plugin](http://maven.apache.org/maven-release/maven-release-plugin/) use <servers> tag in settings.xml as credentials to authenticate on each server, SCM repository and maven repository server e.g.

```xml
	<servers>
		<server>
			<id>gitblit</id>
			<username>admin</username>
			<password>admin</password>
		</server>
		<server>
			<id>nexus</id>
			<username>admin</username>
			<password>admin123</password>
		</server>
	</servers>
```

With maven 3.2.1+, the password can be encrypted as. Details [here](https://maven.apache.org/guides/mini/guide-encryption.html).

```bash
mvn --encrypt-master-password
mvn --encrypt-password
```


## Building this generator

#### Install dependencies
```bash
npm install
```

#### Build
```bash
gulp
```

#### Test
```bash
gulp test
```



## License

Apache-2.0 © [Rodrigo Valerio]()


[npm-image]: https://badge.fury.io/js/generator-camel.svg
[npm-url]: https://npmjs.org/package/generator-camel

[travis-image]: https://travis-ci.org/rsvalerio/generator-camel.svg?branch=master
[travis-url]: https://travis-ci.org/rsvalerio/generator-camel

[daviddm-image]: https://david-dm.org/rsvalerio/generator-camel.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/rsvalerio/generator-camel

[coveralls-image]: https://coveralls.io/repos/github/rsvalerio/generator-camel/badge.png
[coveralls-url]: https://coveralls.io/github/rsvalerio/generator-camel

---
_Source: https://npm.io/package/generator-camel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
