0.0.12 • Published 3 years ago

generator-jhipster-agilekip v0.0.12

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

generator-jhipster-agilekip

Introduction

This is a JHipster blueprint, that is meant to be used in a JHipster application.

Installation modes

There are two installation options:

  1. Using a docker image
  2. Using NPM

Installation using Docker

The easiest way to install and use the agilekip generator is through the official docker image. When you use this approach, the container already has all the tools required by the generator (Java, JHipster, npm, etc).

1. Installation: Create a docker container

docker container run \
    --name agilekip.v0.0.10.test \
    -v $PWD:/home/jhipster/app \
    -d -t agilekip/generator-jhipster-agilekip:v0.0.11

2. Usage

The previous command is the only step to install the Agilekip generator through the official docker image. However, we found a drawback in this installation mode that requires a workaround when you generating an application.

The bug is that when generating an application in a mapped docker volume, the command npm install does not working. So the workaround is to generate the application in a directory inside the container (not mapped into a host directory) and, after the generation, move the just generated application to the shared volume.

-- directory structure --
/home
   /jhipster
       /app (shared volume)
       /local-app (not shared volume)

So basically the workaround consists in generating the application in the local-app and, after the generation, move it to the app directory.

cd ..
mkdir local-app && cd local-app
mkdir myApp && cd myApp
jhipster --blueprint agilekip (follow the wizard...)
cd ../..
mv local-app/myApp app/ (this is very time consuming command... it can take 20 to 25 min)

After generating and moving the application to the app directory, we can use other generator commands without problem. This bug is only during the generation of the application.

Installation using NPM

To use this strategy, you should have JHipster 7.0.1 and its related tools already installed:

1. Installation: Install JHipster, its related tools, and Agilekip generator.

As this is a JHipster 7.0.1 blueprint, we expect you have JHipster 7.0.1 and its related tools already installed:

To install the Agilekip generator:

npm install -g generator-jhipster-agilekip

2. Usage

After installing through npm you can generate an application using the following command.

jhipster --blueprint agilekip 

Installation using source-code

1. Installation: Install JHipster, its related tools, and clone the Agilekip generator git.

To use the Agilekip generator in dev mode (not released) follow the steps below. As this is a JHipster 7.0.1 blueprint, we expect you have JHipster 7.0.1 and its related tools already installed:

Clone the blueprint git repository

git clone https://github.com/AgileKip/generator-jhipster-agilekip.git

Link the blueprint via npm

cd generator-jhipster-agilekip

npm link

npm install

2. Usage (to generate an application)

After installing through npm you can generate an application using the following command.

jhipster --blueprint agilekip 

Running (dev mode)

After these steps, your application is ready to be executed. You can executed it from your host machine (outside the docker container as you run any other conventional app). If you prefer execute inside the docker container, you should attach two bash shell and execute:

Shell 1:

./mvnw

Shell 2:

npm start

Installation from source-code

To use this blueprint in dev mode (not released) follow the steps below:

  1. Create a docker container from a compatible JHipster image
  2. Clone the blueprint git repository
  3. Link the blueprint via npm

1. Create a docker container

Create a docker from the docker image v7.0.1. Don't forget to change the home user directory.

docker container run \
    --name jhipster.v7.0.1 \
    -v $PWD:/home/jhipster/app \
    -d -t jhipster/jhipster:v7.0.1

docker container exec -it jhipster.v7.0.1 bash

All the next commands should be executed in the docker shell attached to the container that you have just created.

2. Clone the blueprint git repository

git clone https://github.com/AgileKip/generator-jhipster-pais.git

3. Link the blueprint via npm

cd generator-jhipster-pais

npm link

npm install

Usage

To use this blueprint, run the below command

jhipster --blueprint pais

Running local Blueprint version for development

During development of blueprint, please note the below steps. They are very important.

  1. Link your blueprint globally

Note: If you do not want to link the blueprint (step 3) to each project being created, use NPM instead of Yarn as yeoman doesn't seem to fetch globally linked Yarn modules. On the other hand, this means you have to use NPM in all the below steps as well.

cd pais
npm link
  1. Link a development version of JHipster to your blueprint (optional: required only if you want to use a non-released JHipster version, like the master branch or your own custom fork)

You could also use Yarn for this if you prefer

cd generator-jhipster
npm link

cd pais
npm link generator-jhipster
  1. Create a new folder for the app to be generated and link JHipster and your blueprint there
mkdir my-app && cd my-app

npm link generator-jhipster-pais
npm link generator-jhipster (Optional: Needed only if you are using a non-released JHipster version)

jhipster -d --blueprint pais

License

Apache-2.0 © Ulisses Telemaco