-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add a new profile to deploy to Payara Fish #7
Comments
Sure, happy to help out! I'm not that familiar with Maven, but I'll see what I can come up with |
Hi @arun-gupta, @mikecroft, I followed your communication over Twitter and found this issue to be an interesting exercise to play with docker and payara. It seems that with normal payara distribution, the standard glassfish maven plugin can be used as is (although it requires local installation of glassfish or payara with asadmin command). With payara-micro, it should be enough to copy artifact into the docker instance. I will look into it later too. I think the best approach would be to mount a local folder as a docker volume, link it to payara deployment dir inside the docker, and then only copy the artifact to the local folder in order to deploy. |
@OndrejM thanks for contributing. Requiring a local and manual install restricts the usability of this sample. Can you look at http://lauraliparulo.altervista.org/glassfish-4-0-hello-world-application-with-maven-3/ and see if no local installs are required? |
Hi Arun, Another option is deploying asynchronously by copying the file over to the deployment directory inside docket. This could be done even with payara-micro, which has half the size of standard Payara image. Should I give it a try? Would that be a viable option? ----- Pôvodná správa ----- @OndrejM thanks for contributing. |
@OndrejM https://maven-glassfish-plugin.java.net/usage.html does not seem to mention that GlassFish/Payara download is required. Mounting a local directory again introduces a local dependency. Any version of Payara where this application can be deployed will work. |
@arun-gupta, the usage site does not mention it, but path to local glassfish installation is a required parameter to the |
@OndrejM that is pretty lame! I don't expect glassfish-maven-plugin to be fixed in the near future given the current state at Oracle. Wondering if @mikecroft or @smillidge have any suggestions? |
The jar file, which is wrapped by asadmin script, is available in maven: http://search.maven.org/#artifactdetails|org.glassfish.main.admin|appserver-cli|4.1.1|glassfish-jar. It should not be much work to use it directly to deploy to Glassfish/Payara, instead of the maven plugin. Or even to patch maven plugin to use the JAR from maven central instead of from local glassfish installation. |
Not being familiar with Maven, I'm not sure exactly what you can bend it to do, but you could always deploy via the REST api. A cURL POST should work like in this example: |
@mikecroft cURL would certainly be awesome. Do you have docs on how to deploy to Payara using REST? |
No specific Payara docs, but any GlassFish docs will still be valid. So if you go to https://localhost:4848/management/domain/applications/deploy you'll get a basic HTML form wrapper for the REST interface. The only required property is
|
Glassfish documentation about REST administration interface can be found in this PDF https://glassfish.java.net/docs/4.0/administration-guide.pdf - section Using REST Interfaces to Administer GlassFish Server. But it is rather generic, you would need to know the resources you need to modify. In this case, the resource is to deploy applications is applications/application. Operations on resources are not documented in PDF, but can be retrieved from running server via GET method in JSON format - methods attribute in the JSON provides all available methods and attributes (the way how to retrieve this information is documented in the PDF). |
Hi @arun-gupta, I managed t use cargo maven plugin to deploy to Payara without the requirement of local Payara installation. The cargo maven plugin uses JSR88 API present in deployment-client artefact, which is available in maven central. See my pull request #9 |
Possibly @mikecroft can help
The text was updated successfully, but these errors were encountered: