{"id":480,"date":"2015-12-21T13:28:58","date_gmt":"2015-12-21T07:58:58","guid":{"rendered":"http:\/\/itechgenie.com\/myblog\/?p=480"},"modified":"2015-12-25T02:22:49","modified_gmt":"2015-12-24T20:52:49","slug":"maven-and-cloud-foundry-integration","status":"publish","type":"post","link":"https:\/\/itechgenie.com\/myblog\/2015\/12\/maven-and-cloud-foundry-integration\/","title":{"rendered":"Maven and Cloud Foundry Integration"},"content":{"rendered":"<p>Cloud Fountry provides as easy integration plugins to move the build packages to its servers through Maven. Here is the sample configuration. <\/p>\n<p>Add Servers to <code>settings.xml<\/code><\/p>\n<pre class=\"lang:xhtml decode:true \" title=\"settings.xml\" >&lt;settings&gt; \r\n\t...\r\n\t&lt;servers&gt;\r\n\t\t... \r\n\t\t&lt;server&gt;\r\n\t\t\t&lt;id&gt;cloud-foundry-credentials&lt;\/id&gt;\r\n\t\t\t&lt;username&gt;cf_user_id_you_created&lt;\/username&gt;\r\n\t\t\t&lt;password&gt;cf_password_you_created&lt;\/password&gt;\r\n\t\t&lt;\/server&gt;\r\n\t&lt;\/servers&gt; \r\n&lt;\/settings&gt;<\/pre>\n<p>You can encrypt you password in MAVEN settings. <a href=\"https:\/\/maven.apache.org\/guides\/mini\/guide-encryption.html\" target=\"_blank\">Check out here on how to do it<\/a>.<\/p>\n<p>Add Dependency and Plugin settings in <code>pom.xml<\/code><\/p>\n<pre class=\"lang:xhtml decode:true \" title=\"pom.xml\" >&lt;\/project&gt;\r\n\t...\t\r\n\t&lt;build&gt;\r\n\t\t...\r\n\t\t&lt;plugins&gt;\r\n\t\t\t\t&lt;groupId&gt;org.cloudfoundry&lt;\/groupId&gt;\r\n\t\t\t\t&lt;artifactId&gt;cf-maven-plugin&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;version&gt;1.1.3&lt;\/version&gt;\r\n\t\t\t\t&lt;configuration&gt;\r\n\t\t\t\t\t&lt;server&gt;cloud-foundry-credentials&lt;\/server&gt;\r\n\t\t\t\t\t&lt;target&gt;https:\/\/url.to.cloud.foundry.com&lt;\/target&gt;\r\n\t\t\t\t\t&lt;memory&gt;512&lt;\/memory&gt;\r\n\t\t\t\t\t&lt;appname&gt;application-name&lt;\/appname&gt;\r\n\t\t\t\t\t&lt;org&gt;ORG_NAME&lt;\/org&gt;\r\n\t\t\t\t\t&lt;space&gt;SPACE_NAME&lt;\/space&gt;\r\n\t\t\t\t\t&lt;instances&gt;1&lt;\/instances&gt;\r\n\t\t\t\t&lt;\/configuration&gt;\r\n\t\t\t\t&lt;executions&gt;\r\n\t\t\t\t\t&lt;execution&gt;\r\n\t\t\t\t\t\t&lt;phase&gt;package&lt;\/phase&gt;\r\n\t\t\t\t\t\t&lt;goals&gt;\r\n\t\t\t\t\t\t\t&lt;goal&gt;push&lt;\/goal&gt;\r\n\t\t\t\t\t\t&lt;\/goals&gt;\r\n\t\t\t\t\t&lt;\/execution&gt;\r\n\t\t\t\t&lt;\/executions&gt;\r\n\t\t&lt;\/plugins&gt;\r\n\t&lt;\/build&gt;\r\n&lt;\/project&gt;<\/pre>\n<p>Thats it !!. Build you project using Maven and check if you application gets deployed into your Cloud Foundry server. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cloud Fountry provides as easy integration plugins to move the build packages to its servers through Maven. Here is the sample configuration. Add Servers to settings.xml &lt;settings&gt; &#8230; &lt;servers&gt; &#8230; &lt;server&gt; &lt;id&gt;cloud-foundry-credentials&lt;\/id&gt; &lt;username&gt;cf_user_id_you_created&lt;\/username&gt; &lt;password&gt;cf_password_you_created&lt;\/password&gt; &lt;\/server&gt; &lt;\/servers&gt; &lt;\/settings&gt; You can encrypt you password in MAVEN settings. Check out here on how to do it. Add Dependency &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/itechgenie.com\/myblog\/2015\/12\/maven-and-cloud-foundry-integration\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Maven and Cloud Foundry Integration&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[94,95,5,10],"tags":[97,98,99,96],"class_list":["post-480","post","type-post","status-publish","format-standard","hentry","category-continuous-integration","category-devops","category-how-to","category-softwares","tag-cloud-foundry","tag-continuous-integration","tag-devops","tag-maven"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2HHtz-7K","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/posts\/480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/comments?post=480"}],"version-history":[{"count":4,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/posts\/480\/revisions"}],"predecessor-version":[{"id":495,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/posts\/480\/revisions\/495"}],"wp:attachment":[{"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/media?parent=480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/categories?post=480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/tags?post=480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}