-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group all dependencies in the parent pom.xml #40
Conversation
@jamezp Wdyt? On one hand, there is a single place to update any dependencies/plugins but on the other hand, the creation of the archetypes is a bit more complex (their |
Just for my understanding: when we build the archetype, the property values in archetype-resources/pom.xml (e.g. |
@WolfgangHG not exactly. The first part is correct: the property values are stored in the parent pom.xml The archetype-resources Does that clarify it? (If this PR is approved, I'll add this comment to the archetypes README so that we know why the projects are structured this way.) |
441572e
to
e06ee95
Compare
OK, I hope I got it ;-). Would have to see it myself, but not before late this evening... |
rename version.jboss.bom to version.wildfly.bom Signed-off-by: Jeff Mesnil <jmesnil@redhat.com>
e06ee95
to
fc90c2e
Compare
@WolfgangHG There is no hurry to do that change but that was the last thing I was missing to lower the maintenance of the archetypes :) I amended the PR to add some documentation (https://github.com/wildfly/wildfly-archetypes/compare/e06ee95a3f72c312a3f30ae87844fe7a7d8b36b9..fc90c2eaccd858061018847ca7e2b1553dd7cc4b) |
@jmesnil Wait - there is something strange... This maven command fails: Error:
It works for the 29.0.0.Final-SNAPSHOT version:
The jar file for the archetype is in the repository and "archetype-catalog.xml" contains. But something is wrong with it, and I have no idea what. Might also be caused by the previous change to the directory names. The log for the successful checks from your pull request also seems to have an issue. See the line where it falls back to "29.0.0.Final" from remote repository.
The "webapp" archetype works for me. |
I think we should add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good. The only question I added about failsafe vs surefire is just a minor question.
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>${version.failsafe.plugin}</version> | ||
</plugin> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be surefire or failsafe? I don't have a strong opinion, I'm just curious :)
@jamezp The integration tests for the EAR must be "surefire", see https://github.com/wildfly/wildfly-archetypes/blob/main/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/README.txt, last paragraph. And don't forget the problem the the EAR archetype does not seem to work... |
90bf01a
to
accb4ee
Compare
Signed-off-by: Jeff Mesnil <jmesnil@redhat.com>
accb4ee
to
efb1c68
Compare
@WolfgangHG I'm not able to replicate this issue.
Could that be the issue? Your logs have
I followed your suggestion and all tests to use the local catalog and the last run looks correct:
|
@jmesnil About your "C:\Users\USERNAME" comment: I anonymized the paths, but forgot one ;-). I understand why it did not work for me: I just built the ear archetype, but I did not call "mvn clean install" in the root directory. So, "org.wildfly.archetype:wildfly-archetypes" was not in my local repository. This is the file "wildfly-jakartaee-ear-archetype-29.0.0.Final-SNAPSHOT.pom" in my local repository:
And this "wildfly-jakartaee-ear-archetype-30.0.0.Final-SNAPSHOT.pom", which introduces a new parent dependency that was missing before:
The new file "wildfly-archetypes-30.0.0.Final-SNAPSHOT.pom" file in my local repository contains all the versions and the dependency management that should actually be only contained in the "archetype-resources\pom.xml" file. Isn't this a bunch of unnecessary dependencies, which is not necessary to create the archetype, but Do we need a parent element at all in the final archetype? Probably it is necessary for building the archetype project, but not when deploying the generated archetype. |
@jmesnil Could you fix the "copy additional files" calls in the batch files of the ear archetype - currently they fail and don't do anything: Those four lines should be changed to "ejb" instead of "multi-ejb":
|
Signed-off-by: Jeff Mesnil <jmesnil@redhat.com>
Sorry, I forgot them. I did not have access to a Windows machine. |
We need it if we want to group all dependencies that are used across the archetypes. This provides a single point of control in the parent The alternative would be to remove the dependency to this parent and have all 3 archetypes define individually the same dependencies (wildfly, failsafe, surefire, etc.). |
Batch files work again, thanks. I still have a bad feeling about the archetype pom file being cluttered with stuff that is only required at build time, but not for the user of the archetype. But I don't have enough knowledge of maven to give a better suggestion. Just a bit of brainstorming: would it be possible to create a dummy maven project in this repository that mainly declares the versions and dependencies and is a "catch all" for dependabot. The three archetype projects are again as dumb as before. |
That's the intent of the
In its current state, the archetypes already have a parent pom ( The key point to me is that this has no impact on the generated Maven project. They will be strictly identical to the one that are generated now. When the user uses the archetype to generate them, they will pull an additional artifact from Maven (the new |
OK, I see. From my point of view we can accept your pull request ;-) |
@WolfgangHG thanks for the thorough review |
This will simplify the maintenance of the archetypes.
I've also renamed version.jboss.bom to version.wildfly.bom as this is the version that controls the
org.wildfly.boms
dependencies.