rieckpil / custom-maven-archetypes

:open_file_folder: Maven Archetypes to conveniently bootstrap new Java projects
https://rieckpil.de
MIT License
41 stars 21 forks source link

"Error: No such container: jsf-demo" when artifactId is jsf-demo #2

Closed tgotwig closed 4 years ago

tgotwig commented 4 years ago

Assuming my artifactId is jsf-demo: When I run buildAndRun.sh it get: Error: No such container: jsf-demo Everything seems to work fine but why I get this message?

rieckpil commented 4 years ago

Hey @TGotwig,

I assume you use the following archetype:

mvn archetype:generate -DarchetypeGroupId=de.rieckpil.archetypes \
    -DarchetypeArtifactId=jakartaee8 \
    -DarchetypeVersion=1.0.0\
    -DgroupId=<your project Group Id> \
    -DartifactId=<your project artifact Id>

The tiny buildAndRun.sh helper script tries to stop an already running container to deploy a new container after doing some code changes. So if you execute the script for the first time, there won't be any running container and that's why you get this message.

If you e.g. change your application and re-run the script (while your old container is still running), you won't see this message anymore.

Docker produces an error log output for this which won't stop the script from executing further.

tgotwig commented 4 years ago

Hey @rieckpil 🙋‍♂️

It is the following one for java 8 & jsf:

mvn archetype:generate -DarchetypeGroupId=de.rieckpil.archetypes \
    -DarchetypeArtifactId=javaee8 \
    -DarchetypeVersion=1.0.2 \
    -DgroupId=<your project Group Id> \
    -DartifactId=<your project artifact Id>

Ah yeah right, I thought so 🙂 but maybe there can be something done to avoid this initial error message 🤔

rieckpil commented 4 years ago

do you have a possible solution in mind?

tgotwig commented 4 years ago

Yeah will make pull-request later 🙂

rieckpil commented 4 years ago

Closing the issue as it is now fixed with https://github.com/rieckpil/custom-maven-archetypes/pull/3