This is an automated email from the ASF dual-hosted git repository.
gk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/turbine-archetypes.git
The following commit(s) were added to refs/heads/master by this push:
new 8936b5e fix mark up urls, formatting, readd deleted development
section
8936b5e is described below
commit 8936b5ee0e88ea70843018c135bf6fed06cbdac6
Author: gemkall <[email protected]>
AuthorDate: Wed Jul 28 11:10:01 2021 +0200
fix mark up urls, formatting, readd deleted development section
---
README.md | 5 ++--
.../archetype-resources/docs/DOCKER-README.md | 25 +++++++++-------
.../resources/archetype-resources/docs/README.md | 33 ++++++++++++++++++++--
3 files changed, 48 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index 7580d3e..92fd86f 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ These instructions will get you a copy of the project up and
running on your loc
### Prerequisites
* Java 8 JDK or later
-* [MySQL](https://www.mysql.com/) - Database Server or [Docker]
(https://docs.docker.com/get-docker/)
+* [MySQL](https://www.mysql.com/) - Database Server or
[Docker](https://docs.docker.com/get-docker/)
* [Maven](https://maven.apache.org/) - Dependency Management
You should have Java 8 or later installed. The archetype sets up a new
application using MySQL as the default database store. However, you can adjust
this to use any database supported by Apache Torque 5.x. If not using Docker,
you should therefore be at least have a database instance where you have access
rights to create a new database schema and populate it with the tables the
application generates. Finally, this is a maven archetype, so of course you
should install a local version [...]
@@ -25,7 +25,8 @@ The location of the remote catalog file is:
http://repo.maven.apache.org/maven2/
Step-by-step instructions on how to accomplish this can be found here:
https://howtodoinjava.com/eclipse/how-to-import-maven-remote-archetype-catalogs-in-eclipse/
-Follow further instructions here: [README]
(src/main/resources/archetype-resources/README.md).
+Follow further instructions here:
[ARCHETYPE-README](src/main/resources/archetype-resources/docs/README.md)
and/or
[ARCHETYPE-DOCKER-README](src/main/resources/archetype-resources/docs/DOCKER-README.md).
+
#### Development
diff --git a/src/main/resources/archetype-resources/docs/DOCKER-README.md
b/src/main/resources/archetype-resources/docs/DOCKER-README.md
index c6eea76..4e121a8 100644
--- a/src/main/resources/archetype-resources/docs/DOCKER-README.md
+++ b/src/main/resources/archetype-resources/docs/DOCKER-README.md
@@ -26,14 +26,17 @@ To run the build with maven do this outside of the
container using following mvn
- Change into directory target/docker-resources andf check the file
docker-compose.yml, e.g. with
- cd <project>/target/docker-resources
-
- docker compose config
+```sh
+cd <project>/target/docker-resources
+docker compose config
+```
- Build and start the services
- docker compose build --no-cache
- docker compose up
+```sh
+docker compose build --no-cache
+docker compose up
+```
First time building might take a couple of minutes.
@@ -103,8 +106,8 @@ If previously build, you may want to delete all volumes
(this will delete all ta
docker-compose down -v
- - Build it
-
+- Build it
+
docker-compose build --no-cache
.. optionally build it separately
@@ -191,18 +194,19 @@ Error starting userland proxy: mkdir
/port/tcp:0.0.0.0:13306:tcp:...:3306: input
-
https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
-## More Internals, Helpful Docker commands
+### More Internals, Helpful Docker commands
-### Resetting / Preparation (optional)
+#### Resetting / Preparation (optional)
docker-compose rm -v
-### Delete all images
+#### Delete all images
docker rmi $(docker images -q)
### Still more docker commands ...
+```sh
docker volume inspect <containerid>
// delete intermediate images, volumes
@@ -217,6 +221,7 @@ Error starting userland proxy: mkdir
/port/tcp:0.0.0.0:13306:tcp:...:3306: input
# stops all running containers
docker stop $(docker ps -a -q)
+```
## License
diff --git a/src/main/resources/archetype-resources/docs/README.md
b/src/main/resources/archetype-resources/docs/README.md
index a1855da..d215d6e 100644
--- a/src/main/resources/archetype-resources/docs/README.md
+++ b/src/main/resources/archetype-resources/docs/README.md
@@ -1,4 +1,4 @@
-# Quick Guide to using the new Turbine 5.1 maven archetype for skeleton
application generation
+# Quick Guide to using the new Turbine 5.x maven archetype for skeleton
application generation
Maven Archetype to generate a webapp utilizing Turbine 5.x
@@ -18,7 +18,7 @@ You should have Java 8 or later installed. The archetype
sets up a new applicat
Turbine Version: Turbine 5.1 Turbine-webapp-5.x
-### Integration Test (if you checked out this Archetype Generate Repository)
+### Integration Test (if you checked out this [Archetype Generate
Repository](https://github.com/apache/turbine-archetypes.git))
mvn integration-test
@@ -37,9 +37,11 @@ beginning the application setup below.
As we are using MySQL by default you need to create the database in MySQL
(server version should be at least 5.5, because of new sql driver), e.g. with
+```sh
mysql -u <user> -p
mysql> create database helloWorld;
mysql> \q
+```
or other tools. The database should have been started and the database user
granted enough rights.
@@ -76,7 +78,32 @@ N.B. Set docker variable to true to enable Docker setup in
building the artifact
to immediately enable docker setup, when generating the archetype.
Currently only port 3306 is supported, if you do not want ot change the port
seetings for the db container in docker-compose.yml
-
+
+### Development
+
+You may use
+
+```sh
+mvn archetype:generate -DarchetypeCatalog=local
+```
+
+to avoid declaring the *archetype* variables.
+
+This requires you provide a local catalog in $HOME\.m2\archetype-catalog.xml.
Find further information here:
https://maven.apache.org/archetype/archetype-models/archetype-catalog/archetype-catalog.html.
+
+##### Example
+
+```xml
+<archetype-catalog ...>
+ <archetype>
+ <groupId>org.apache.turbine</groupId>
+ <artifactId>turbine-webapp-5.1</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <description>This archetype sets up a web application project based on
Apache Turbine 5.x</description>
+ </archetype>
+ </archetypes>
+</archetype-catalog>
+```
## Project Start and Usage