{"id":640,"date":"2024-03-06T09:32:13","date_gmt":"2024-03-06T09:32:13","guid":{"rendered":"https:\/\/blogs.ua.es\/jpm33\/?p=640"},"modified":"2024-05-23T06:37:13","modified_gmt":"2024-05-23T06:37:13","slug":"crear-proyectoj-java-con-maven-en-cli","status":"publish","type":"post","link":"https:\/\/blogs.ua.es\/jpm33\/2024\/03\/06\/crear-proyectoj-java-con-maven-en-cli\/","title":{"rendered":"Crear proyecto Java con maven en CLI"},"content":{"rendered":"\r\n<p>Hoy en d\u00eda, lo normal es crear nuestros proyectos Java desde nuesto IDE (editor) pero en ocasiones, nos va bien o porqu\u00e9 no tenemos un IDE hacerlo en consola (CLI). Como regla general podemos usar este comando:<\/p>\r\n<pre>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false<\/pre>\r\n<p>Esto nos genera el proyecto sin preguntar nada. Tambi\u00e9n podemos simplificar el comando:<\/p>\r\n<pre>mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart<\/pre>\r\n<p>Que nos preguntar\u00e1 por el groupId, artifactId, etc:<\/p>\r\n<pre>Define value for property 'groupId': com.severoochoa.programacion<br \/>Define value for property 'artifactId': tarea3<br \/>Define value for property 'version' 1.0-SNAPSHOT: :<br \/>Define value for property 'package' com.severoochoa.programacion: :<br \/>Confirm properties configuration:<br \/>groupId: com.severoochoa.programacion<br \/>artifactId: tarea3<br \/>version: 1.0-SNAPSHOT<br \/>package: com.severoochoa.programacion<br \/>Y: : y<\/pre>\r\n<p>Y obtenemos lo mismo que en el primer caso.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Hoy en d\u00eda, lo normal es crear nuestros proyectos Java desde nuesto IDE (editor) pero en ocasiones, nos va bien o porqu\u00e9 no tenemos un IDE hacerlo en consola (CLI). Como regla general podemos usar este comando: mvn archetype:generate -DgroupId=com.mycompany.app &hellip; <a href=\"https:\/\/blogs.ua.es\/jpm33\/2024\/03\/06\/crear-proyectoj-java-con-maven-en-cli\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3080,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[374],"tags":[408,236718],"class_list":["post-640","post","type-post","status-publish","format-standard","hentry","category-programacion","tag-java","tag-programacion-2"],"_links":{"self":[{"href":"https:\/\/blogs.ua.es\/jpm33\/wp-json\/wp\/v2\/posts\/640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ua.es\/jpm33\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ua.es\/jpm33\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ua.es\/jpm33\/wp-json\/wp\/v2\/users\/3080"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ua.es\/jpm33\/wp-json\/wp\/v2\/comments?post=640"}],"version-history":[{"count":3,"href":"https:\/\/blogs.ua.es\/jpm33\/wp-json\/wp\/v2\/posts\/640\/revisions"}],"predecessor-version":[{"id":659,"href":"https:\/\/blogs.ua.es\/jpm33\/wp-json\/wp\/v2\/posts\/640\/revisions\/659"}],"wp:attachment":[{"href":"https:\/\/blogs.ua.es\/jpm33\/wp-json\/wp\/v2\/media?parent=640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ua.es\/jpm33\/wp-json\/wp\/v2\/categories?post=640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ua.es\/jpm33\/wp-json\/wp\/v2\/tags?post=640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}