Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758
{"id":1531,"date":"2014-10-23T15:02:00","date_gmt":"2014-10-23T17:02:00","guid":{"rendered":"http:\/\/www.feltex.com.br\/felix\/?p=1531"},"modified":"2015-12-24T11:54:57","modified_gmt":"2015-12-24T13:54:57","slug":"maven-iniciar-servidor-tomcat","status":"publish","type":"post","link":"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/","title":{"rendered":"Maven – Como iniciar o servidor tomcat"},"content":{"rendered":"

Maven – Como iniciar o servidor tomcat<\/H1><\/p>\n

Ol\u00e1 amigos, hoje vamos explicar como iniciar o servidor de aplica\u00e7\u00e3o TOMCAT a partir de uma configura\u00e7\u00e3o no Maven. Neste momento \u00e9 importante que voc\u00eas j\u00e1 tenham o maven e o Servidor Tomcat instalado.<\/p>\n

Instala\u00e7\u00e3o do Tomcat<\/a> e veja tamb\u00e9m o este artigo: Dica r\u00e1pida: Instala\u00e7\u00e3o do Maven<\/a><\/p>\n


\n

1. Cria\u00e7\u00e3o do projeto no padr\u00e3o Maven<\/H2><\/p>\n

Crie o seu projeto web utilizando o comando abaixo:<\/p>\n

\r\nmvn archetype:generate -DgroupId=br.com.feltex  -DartifactId=projetoweb  -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false\r\n<\/pre>\n

Isso criar\u00e1 o seu projeto com a estrutura web.<\/p>\n

2. Configura\u00e7\u00e3o TOMCAT<\/H2>
\n Adicione as seguintes linhas ao arquivo tomcat-users.xml:<\/p>\n
\r\n  \r\n  \r\n  \r\n    \r\n  \r\n  \r\n  \r\n  \r\n  \r\n<\/pre>\n

3. Configura\u00e7\u00e3o do Maven<\/H2>
\n No arquivo settings.xml adicione os dados para acesso ao servidor tomcat:<\/p>\n
\r\n\r\n   TomcatServer<\/id>\r\n   teco<\/username>\r\n   teco01<\/password>\r\n <\/server>\r\n<\/pre>\n

4. Arquivo POM<\/H2>
\n No seu arquivo POM \u00e9 necess\u00e1rio realizar a configura\u00e7\u00e3o b\u00e1sica do plugin de deploy.
\nO Seu arquivo POM deve estar desta forma:<\/p>\n
\r\n\r\n\t4.0.0<\/modelVersion>\r\n\tbr.com.feltex<\/groupId>\r\n\tprojetoweb<\/artifactId>\r\n\twar<\/packaging>\r\n\t1.0-SNAPSHOT<\/version>\r\n\tprojetoweb Maven Webapp<\/name>\r\n\thttp:\/\/maven.apache.org<\/url>\r\n\t\r\n\t\tprojetoweb<\/finalName>\r\n\t\t<\/plugins>\r\n\t<\/build>\r\n<\/project>\r\n<\/pre>\n

Adicionaremos o plugin de deploy e seu arquivo POM deve estar dessa maneira:<\/p>\n

\r\n\r\n\r\n\t4.0.0<\/modelVersion>\r\n\tbr.com.feltex<\/groupId>\r\n\tprojetoweb<\/artifactId>\r\n\twar<\/packaging>\r\n\t1.0-SNAPSHOT<\/version>\r\n\tprojetoweb Maven Webapp<\/name>\r\n\thttp:\/\/maven.apache.org<\/url>\r\n\r\n\t\r\n\t\tprojetoweb<\/finalName>\r\n\t\t\r\n\t\t\t\r\n\t\t\t\torg.apache.tomcat.maven<\/groupId>\r\n\t\t\t\ttomcat7-maven-plugin<\/artifactId>\r\n\t\t\t\t2.2<\/version>\r\n\t\t\t\t\r\n\t\t\t\t\thttp:\/\/localhost:8080\/manager\/text<\/url>\r\n\t\t\t\t\tTomcatServer<\/server>\r\n\t\t\t\t\t\/projetoweb<\/path>\r\n\t\t\t\t<\/configuration>\r\n\t\t\t<\/plugin>\r\n\r\n\t\t<\/plugins>\r\n\t<\/build>\r\n<\/project>\r\n<\/pre>\n

5. Executando<\/H2>
\n Por fim vamos fazer a execu\u00e7\u00e3o do projeto.<\/p>\n

1. Quando o servidor estar iniciado podemos fazer os comandos:
\n mvn tomcat7:deploy
\n mvn tomcat7:undeploy
\n mvn tomcat7:redeploy<\/p>\n

2. Quando o servidor estar parado podemos iniciar a aplica\u00e7\u00e3o com o seguinte comando:
\n mvn tomcat7:run-war<\/p>\n

6. Conclus\u00e3o<\/H2><\/p>\n

Pronto. Com isso j\u00e1 podemos fazer nossos projetos e criar nossas etapas de compila\u00e7\u00e3o, testes e implanta\u00e7\u00e3o de forma autom\u00e1tica. E isso j\u00e1 \u00e9 um conversa que podemos ter sobre integra\u00e7\u00e3o Cont\u00ednua: Jenkins ou Hudson.<\/p>\n

Links relacionados<\/H2>
\nZip site oficial do Java<\/a>
\n
Aprenda como Compactar Arquivo com o JavaZip<\/a><\/p>\n

N\u00e3o deixe de curtir este post nas redes sociais. D\u00ea a sua contribui\u00e7\u00e3o social e ajude o autor:<\/H2><\/p>\n","protected":false},"excerpt":{"rendered":"

Maven – Como iniciar o servidor tomcat Ol\u00e1 amigos, hoje vamos explicar como iniciar o servidor de aplica\u00e7\u00e3o TOMCAT a partir de uma configura\u00e7\u00e3o no Maven. Neste momento \u00e9 importante que voc\u00eas j\u00e1 tenham o maven e o Servidor Tomcat …<\/p>\n

Maven – Como iniciar o servidor tomcat<\/span> Read More »<\/a><\/p>\n

<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[1],"tags":[],"yoast_head":"\nMaven - Como iniciar o servidor tomcat<\/title>\n<meta name=\"description\" content=\"Fazer a configura\u00e7\u00e3o de seguran\u00e7a no tomcat.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Maven - Como iniciar o servidor tomcat\" \/>\n<meta property=\"og:description\" content=\"Fazer a configura\u00e7\u00e3o de seguran\u00e7a no tomcat.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/\" \/>\n<meta property=\"og:site_name\" content=\"Aprenda Java\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/feltex.br\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-23T17:02:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-12-24T13:54:57+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andr\u00e9 F\u00e9lix\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#website\",\"url\":\"https:\/\/www.feltex.com.br\/felix\/\",\"name\":\"Aprenda Java\",\"description\":\"Cursos de java, SQL e Engenharia de Software\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.feltex.com.br\/felix\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/#webpage\",\"url\":\"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/\",\"name\":\"Maven - Como iniciar o servidor tomcat\",\"isPartOf\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#website\"},\"datePublished\":\"2014-10-23T17:02:00+00:00\",\"dateModified\":\"2015-12-24T13:54:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069\"},\"description\":\"Fazer a configura\\u00e7\\u00e3o de seguran\\u00e7a no tomcat.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Maven – Como iniciar o servidor tomcat\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069\",\"name\":\"Andr\\u00e9 F\\u00e9lix\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#personlogo\",\"inLanguage\":\"pt-BR\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g\",\"caption\":\"Andr\\u00e9 F\\u00e9lix\"},\"sameAs\":[\"http:\/\/www.feltex.com.br\"],\"url\":\"https:\/\/www.feltex.com.br\/felix\/author\/andre.felix\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Maven - Como iniciar o servidor tomcat","description":"Fazer a configura\u00e7\u00e3o de seguran\u00e7a no tomcat.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/","og_locale":"pt_BR","og_type":"article","og_title":"Maven - Como iniciar o servidor tomcat","og_description":"Fazer a configura\u00e7\u00e3o de seguran\u00e7a no tomcat.","og_url":"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/","og_site_name":"Aprenda Java","article_publisher":"https:\/\/www.facebook.com\/feltex.br","article_published_time":"2014-10-23T17:02:00+00:00","article_modified_time":"2015-12-24T13:54:57+00:00","twitter_misc":{"Escrito por":"Andr\u00e9 F\u00e9lix","Est. tempo de leitura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.feltex.com.br\/felix\/#website","url":"https:\/\/www.feltex.com.br\/felix\/","name":"Aprenda Java","description":"Cursos de java, SQL e Engenharia de Software","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.feltex.com.br\/felix\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"pt-BR"},{"@type":"WebPage","@id":"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/#webpage","url":"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/","name":"Maven - Como iniciar o servidor tomcat","isPartOf":{"@id":"https:\/\/www.feltex.com.br\/felix\/#website"},"datePublished":"2014-10-23T17:02:00+00:00","dateModified":"2015-12-24T13:54:57+00:00","author":{"@id":"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069"},"description":"Fazer a configura\u00e7\u00e3o de seguran\u00e7a no tomcat.","breadcrumb":{"@id":"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.feltex.com.br\/felix\/maven-iniciar-servidor-tomcat\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Maven – Como iniciar o servidor tomcat"}]},{"@type":"Person","@id":"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069","name":"Andr\u00e9 F\u00e9lix","image":{"@type":"ImageObject","@id":"https:\/\/www.feltex.com.br\/felix\/#personlogo","inLanguage":"pt-BR","url":"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g","caption":"Andr\u00e9 F\u00e9lix"},"sameAs":["http:\/\/www.feltex.com.br"],"url":"https:\/\/www.feltex.com.br\/felix\/author\/andre.felix\/"}]}},"_links":{"self":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts\/1531"}],"collection":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/comments?post=1531"}],"version-history":[{"count":6,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts\/1531\/revisions"}],"predecessor-version":[{"id":2057,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts\/1531\/revisions\/2057"}],"wp:attachment":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/media?parent=1531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/categories?post=1531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/tags?post=1531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}