[#185] Update archetype for WildFly subsystem#194
[#185] Update archetype for WildFly subsystem#194jmesnil wants to merge 1 commit intowildfly:mainfrom
Conversation
49be316 to
f61a2bf
Compare
|
It's annoying to review the code from the archetype so generating a project and looking at the end result might help. Once you have pulled the PR and do a and then |
f61a2bf to
ac17540
Compare
|
Just a note that the subsystem archetype is now tested directly from Maven (starting at https://github.com/wildfly/wildfly-archetypes/actions/runs/19531283932/job/55914645866?pr=194#step:4:3568 and finishing successfully at https://github.com/wildfly/wildfly-archetypes/actions/runs/19531283932/job/55914645866?pr=194#step:4:7647) |
ac17540 to
c17888a
Compare
| @@ -0,0 +1,22 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
modules/system/layers/base is for WildFly core modules, that is perhaps just fine. But you could add your module at the root of the modules directory.
In such a case, modules.all would be not available, you would use the module name as default package.
There was a problem hiding this comment.
when I use instead
<default-packages>
<package name="${package}"/>
</default-packages>
and move the module at the root of modules, I get the error:
[ERROR] Failed to execute goal org.wildfly.galleon-plugins:wildfly-galleon-maven-plugin:8.0.2.Final:build-feature-pack (bar-build-feature-pack) on project bar-feature-pack: Failed
to write to /Users/jmesnil/Developer/wildfly-archetypes/wildfly-subsystem-archetype/target/test-classes/projects/basic/project/bar/bar-feature-pack/target/layout/org.wildfly.foo/ba
r-feature-pack/1.0-SNAPSHOT/feature-pack.xml: Package org.wildfly.foo.bar is not found in org.wildfly.foo:bar-feature-pack:1.0-SNAPSHOT -> [Help 1]
Do I have to explicitly create a package to bundle the module?
There was a problem hiding this comment.
Ah, yes, build-feature-pack goal expects the modules to be in system/layers/base or addOns, addOns is perhaps a better place than system?
There was a problem hiding this comment.
if I want to provision the modules in the add-ons directory, I need to specify the layers.conf right?
c17888a to
e1e2b41
Compare
|
The old archetype was tested by a script that created a project from the archetype and "installed" it to a WildFly instance. This is not part of the new archetype? So, currently it is only verified that it builds, but not that it actually works? Also, the end user "Readme.md" does not seem to contain the steps necessary to install the subsystem and/or the feature pack. |
The new archetype is definitely tested when Maven runs. It installs the archetype, generate a project and run |
It relies on provisioning with the wildfly maven plugin. |
e1e2b41 to
688be3b
Compare
|
@jmesnil I pulled the pull request and made a run. You are right, the subsystem is deployed to the server. Sorry, my previous comment came from someone not having any knowledge of subsystems or featurepacks ;-). During build, I found those warnings when the test project is created: And later, this was printed: I don't see a "bar-test.war" being created. Where does it come from? |
Rewrite it from scratch based on the latest WildFly API. This creates a multimodule Maven project: * xxx-extension * Provides the code for the WildFly extension and its subsystem. It build a simple extension to track the number of deployments (so that it provides examples for resources, runtime attributes, DUP) * xxx-feature pack * Provides a feature pack to provision the extension (using layers) * xxx-testsuite * Provide an integration testsuite to test a WildFly installation with the provided layer This fixes wildfly#185 Signed-off-by: Jeff Mesnil <jmesnil@redhat.com>
688be3b to
70decd2
Compare
Good catch, I updated the poms to explicitly add versions to these plugins. |
It it an deployment added in the tests by Arquillian at https://github.com/wildfly/wildfly-archetypes/pull/194/files#diff-b8bcf8551e2f89a2afa8babfa63955824306f7f44eeca1b284dcf62339acec68R42 |
|
Thanks, I did not see this test case. Did you see this warning in my previous comment? I think the "pom.xml" line in "archetype-metadata.xml" is uncessary. |
|
@jmesnil Did you see my previous comment? |
Rewrite it from scratch based on the latest WildFly API. This creates a multimodule Maven project:
This fixes [#185]