-
-
Notifications
You must be signed in to change notification settings - Fork 44
WebApp: add a profile for provisioning the server #148
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
base: main
Are you sure you want to change the base?
Conversation
5e6f227 to
a69b9d8
Compare
|
@WolfgangHG , I realize that we should use in the arq profile the |
|
@jfdenise This would mean that we add another profile "provision" that builds the project and provisions a server, but does not run integration tests? And the "arq-provisioned" profile would provision the server, but with "skipDeployment" option, so that the deployed testing war file could keep it's original name? In the my ear archetype change (#150), this would require two provisioning profiles ("provision" and "provision_for_arquillian")? Should this also be added to the "getting-started" archetype to keep them in sync? But the "getting-started" archetype does not use profiles up to now. |
|
I am not sure of the best, I wanted to highlight this skipDeployment in case it would make things simpler. |
|
I can't decide either. "skipDeployment" sounds better, as the arquillian deployment could keep its name. But it means more profiles. I leave it to the reviewers of this issue. |
|
I'm not particularly keen on having our archetypes propose multiple ways (aka profiles) to achieve the same thing. So I would prefer that we provide a single way to compile/build and test a Web deployment on WildFly. I think that the provisioned way is the better approach for development: you control the WildFly version from your Maven POM and you can test the actual deployment. There is no need to use ShrinkWrap to deploy a "fake" test deployment, the WAR is already there ready to be tested. wdyt? |
|
@jmesnil I am not sure whether we can remove the shrinkwrap WAR creation, as we have to enrich the deployed archive with the server side test classes so that the Arquillian ServletTestRunner can invoke them on the server side. They will not be part of the provisioned deployment. Personally, I consider the archetype as a set of possibilities - it shows serveral ways to use WildFly, as it is currently doing for managed and remote instances. Using a provisioned server is another way. It is hard to collect them all in one project. We could also remove the non-provisioning stuff and just point to it in "Readme.txt". This would follow your suggestion to keep it simple. |
|
Hmmm, just an idea: we could add some properties to the archetype which query from the user the needed functionality (e.g. "provisioning", "arquillian", "jakarta_faces" with "yes/no" values). But those archetype properties don't allow to add a description, so they should have meaningful names, and there might exist combinations that don't make sense. |
|
I split provisioning in two profiles (similar to the changes in the pull request draft for the ear archetype):
I think this makes the combination of features a bit more consistent. The only thing that is not perfect is that a provisioned server would probably contain a "ROOT.war" deployment. But I added comments to "Readme.txt" how to fix this. |
e9ddf11 to
6cffa34
Compare
wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/README.txt
Outdated
Show resolved
Hide resolved
wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/README.txt
Outdated
Show resolved
Hide resolved
wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/README.txt
Outdated
Show resolved
Hide resolved
8909e75 to
e6cb326
Compare
|
After latest rebase, build failed due to the JBoss repository not being available. Had to do a |
e6cb326 to
edcf5f2
Compare
edcf5f2 to
874c0f6
Compare
874c0f6 to
c4dbce5
Compare
fbd7140 to
79df2a8
Compare
79df2a8 to
0776885
Compare
|
We discussed this PR during the WildFly Community Call and agreed to move on with a single provisioned server.
We could replicate what the getting-started archetyp server is doing by having these 2 kind of tests |
|
@jmesnil So the profiles "arq-managed" and "arq-remote" are removed and replaced by a profile "arq-provisioned" that provisions the server and launches the arquillian tests. The war file is named "ROOT.war" in "getting-started". Do we follow this approach, or do we keep a deployment name created from the project name? The arquillian test suite deploys a war file that has a different name, thus it can exist parallel to the "ROOT.war". We could do it the same way here. |
Part two to resolve #145: I added a profile "arq-provisioned" to the webapp archetype that provisions a server and runs the arquillian tests using this server.
This pull request is a request for comments ;-).
The provisioning profile required a change to the way the arquillian test deployment is created: as the provisioned server already contains the war file, the test deployment war file must have a different name - I added suffix "Tests", e.g. "MyApplicationTests.war".
Probably, it would be more reasonable to name the deployed app "Root.war" in case of provisioning, but this would probably conflict with the old school use case to develop an app without knowing how it will be deployed. So I would prefer to keep the name as is - I added hints to the end user "Readme.txt" to change the deployment name depending on the use case.