{"id":24,"date":"2010-01-05T17:03:16","date_gmt":"2010-01-05T16:03:16","guid":{"rendered":"http:\/\/www.flamingpenguin.co.uk\/blog\/?p=24"},"modified":"2010-09-02T14:25:25","modified_gmt":"2010-09-02T13:25:25","slug":"using-the-maven-embedded-glassfish-plugin","status":"publish","type":"post","link":"https:\/\/www.flamingpenguin.co.uk\/blog\/2010\/01\/05\/using-the-maven-embedded-glassfish-plugin\/","title":{"rendered":"Using the maven-embedded-glassfish-plugin"},"content":{"rendered":"<p>Here is my first working XML for running unit tests against an application deployed on an embedded glassfish v3 instance:<\/p>\n<pre lang=\"xml\">\r\n<plugin>\r\n   <groupId>org.glassfish<\/groupId>\r\n   <artifactId>maven-embedded-glassfish-plugin<\/artifactId>\r\n   <version>3.0<\/version>\r\n   <configuration>\r\n      <goalPrefix>glassfish<\/goalPrefix>\r\n      <app>App.war<\/app>\r\n      <port>8080<\/port>\r\n      <contextRoot>App<\/contextRoot>\r\n   <\/configuration>\r\n   <executions>\r\n      <execution>\r\n         <id>start-glassfish<\/id>\r\n         <phase>generate-test-resources<\/phase>\r\n         <goals>\r\n            <goal>start<\/goal>\r\n         <\/goals>\r\n      <\/execution>\r\n      <execution>\r\n         <id>deploy-glassfish<\/id>\r\n         <phase>pre-integration-test<\/phase>\r\n         <goals>\r\n            <goal>deploy<\/goal>\r\n         <\/goals>\r\n      <\/execution>\r\n      <execution>\r\n         <id>stop-glassfish<\/id>\r\n         <phase>post-integration-test<\/phase>\r\n         <goals>\r\n            <goal>stop<\/goal>\r\n         <\/goals>\r\n      <\/execution>\r\n  <\/executions>\r\n<\/plugin>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here is my first working XML for running unit tests against an application deployed on an embedded glassfish v3 instance: org.glassfish maven-embedded-glassfish-plugin 3.0 glassfish App.war 8080 App start-glassfish generate-test-resources start deploy-glassfish pre-integration-test deploy stop-glassfish post-integration-test stop<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,7],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-glassfish-java","category-java"],"_links":{"self":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":0,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}