{"id":2420,"date":"2018-05-05T21:02:25","date_gmt":"2018-05-05T12:02:25","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=2420"},"modified":"2023-04-27T23:53:03","modified_gmt":"2023-04-27T14:53:03","slug":"%e3%80%90maven%e3%80%91%e5%9f%ba%e6%9c%ac%e7%9a%84%e3%81%aa%e3%82%b4%e3%83%bc%e3%83%ab%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=2420","title":{"rendered":"\u3010Maven\u3011\u57fa\u672c\u7684\u306a\u30b4\u30fc\u30eb\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>Maven\u306e\u57fa\u672c\u3067\u3042\u308b\u300c\u30b4\u30fc\u30eb\u300d\u306b\u3064\u3044\u3066\u3054\u8aac\u660e\u81f4\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30b4\u30fc\u30eb\u3068\u306f\uff1f<\/h2>\n<p>\u30b4\u30fc\u30eb\u306b\u4f55\u3092\u6307\u5b9a\u3059\u308b\u304b\u3067\u3001\u5b9f\u884c\u3059\u308b\u51e6\u7406\u5185\u5bb9\u304c\u5909\u308f\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30b4\u30fc\u30eb\u306e\u7a2e\u985e<\/h2>\n<table>\n<tbody>\n<tr>\n<th width=\"150\">\u30b4\u30fc\u30eb\u306e\u7a2e\u985e<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>compile<\/td>\n<td>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u30b4\u30fc\u30eb\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>test-compile<\/td>\n<td>\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u7528\u306e\u30af\u30e9\u30b9\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>test<\/td>\n<td>\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u304c\u6a19\u6e96\u6a5f\u80fd\u3068\u3057\u3066\u7528\u610f\u3055\u308c\u3066\u304a\u308a\u3001\u30c6\u30b9\u30c8\u3092\u5358\u4f53\u3067\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30b4\u30fc\u30eb\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>package<\/td>\n<td>\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3092\u884c\u3046\u305f\u3081\u306e\u30b4\u30fc\u30eb\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>clean<\/td>\n<td>\u30b3\u30f3\u30d1\u30a4\u30eb\u3001\u30c6\u30b9\u30c8\u7b49\u306e\u969b\u306e\u4e0d\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u5168\u3066\u6d88\u53bb\u3059\u308b\u30b4\u30fc\u30eb\u3067\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>compile\uff08\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u30b4\u30fc\u30eb)<\/h2>\n<p>\u5bfe\u8c61\u306emaven\u306e\u30a2\u30d7\u30ea\u306epom.xml\u3092\u53f3\u30af\u30ea\u30c3\u30af\u2192\u5b9f\u884c\u2192Maven \u30d3\u30eb\u30c9\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2425\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile1.png\" alt=\"\" width=\"754\" height=\"384\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile1.png 754w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile1-300x153.png 300w\" sizes=\"(max-width: 754px) 100vw, 754px\" \/><\/p>\n<p>\u30b4\u30fc\u30eb\u306b\u3001\u300ccompile\u300d\u3092\u5165\u529b\u3057\u3066\u3001\u300c\u5b9f\u884c\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2426\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile2.png\" alt=\"\" width=\"792\" height=\"638\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile2.png 792w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile2-300x242.png 300w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile2-768x619.png 768w\" sizes=\"(max-width: 792px) 100vw, 792px\" \/><\/p>\n<p>\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u305f\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u6210\u529f\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2431\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile\u6210\u529f.png\" alt=\"\" width=\"667\" height=\"191\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile\u6210\u529f.png 667w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile\u6210\u529f-300x86.png 300w\" sizes=\"(max-width: 667px) 100vw, 667px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001target\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30d5\u30a9\u30eb\u30c0\u304c\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2427\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile3.png\" alt=\"\" width=\"374\" height=\"226\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile3.png 374w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/compile3-300x181.png 300w\" sizes=\"(max-width: 374px) 100vw, 374px\" \/><\/p>\n<h3>compile\u3067\u4f5c\u6210\u3055\u308c\u308b\u30d5\u30a9\u30eb\u30c0\u306b\u3064\u3044\u3066<\/h3>\n<table>\n<tbody>\n<tr>\n<th width=\"150\">\u9805\u76ee<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>classes<\/td>\n<td>\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305fJava\u30af\u30e9\u30b9\u304c\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u3054\u3068\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>maven-status<\/td>\n<td>compile\u3067\u5229\u7528\u3055\u308c\u308bcompiler\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u3088\u308a\u751f\u6210\u3055\u308c\u308b\u30d5\u30a1\u30a4\u30eb\u304c\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u305f\u30bd\u30fc\u30b9\u3068\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30b9\u30c8\u304c\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>test-compile(\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u7528\u306e\u30af\u30e9\u30b9\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3002\uff09<\/h2>\n<p>compile\u306f\u3001main\u30d5\u30a9\u30eb\u30c0\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u306f\u300ctest\u30d5\u30a9\u30eb\u30c0\u300d\u306e\u30bd\u30fc\u30b9\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30f3\u30d1\u30a4\u30eb\u5f8c\u306f\u3001\u300cclasses\u300d\u3067\u306f\u306a\u304f\u3001\u300ctest-classes\u300d\u30d5\u30a9\u30eb\u30c0\u306b\u30bd\u30fc\u30b9\u304c\u914d\u7f6e\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2429\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/test\u30b3\u30f3\u30d1\u30a4\u30eb.png\" alt=\"\" width=\"305\" height=\"213\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/test\u30b3\u30f3\u30d1\u30a4\u30eb.png 305w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/test\u30b3\u30f3\u30d1\u30a4\u30eb-300x210.png 300w\" sizes=\"(max-width: 305px) 100vw, 305px\" \/><\/p>\n<h2>test(\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u3092\u5358\u4f53\u3067\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30b4\u30fc\u30eb)<\/h2>\n<p>pom.xml\u3092\u53f3\u30af\u30ea\u30c3\u30af\u2192\u5b9f\u884c\u2192\u300cMaven test\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2433\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/test1.png\" alt=\"\" width=\"737\" height=\"325\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/test1.png 737w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/test1-300x132.png 300w\" sizes=\"(max-width: 737px) 100vw, 737px\" \/><\/p>\n<p>\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u305f\u3089\u30c6\u30b9\u30c8\u6210\u529f\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2434\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/test2.png\" alt=\"\" width=\"443\" height=\"149\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/test2.png 443w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/test2-300x101.png 300w\" sizes=\"(max-width: 443px) 100vw, 443px\" \/><\/p>\n<h3>\u30c6\u30b9\u30c8\u3067\u306f\u4f55\u3092\u3084\u3063\u3066\u3044\u308b\u306e\u304b\uff1f<\/h3>\n<p>\u305d\u306e\u771f\u76f8\u306f\u4e0b\u8a18\u306esrc\u306etest\u306b\u3042\u308b\u300cAppTest.java\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u30c6\u30b9\u30c8\u7528\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2435\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/test3.png\" alt=\"\" width=\"258\" height=\"108\" \/><\/p>\n<h4>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/h4>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\u4e0b\u8a18\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u300cassertTrue( true );\u300d\u306e\u90e8\u5206\u304c\u5b9f\u884c\u3055\u308c\u3066\u3001\u6210\u529f\u304c1\u4ef6\u3068\u3044\u3046\u7d50\u679c\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">package com.mvntest.mvntest_app;\r\n\r\nimport junit.framework.Test;\r\nimport junit.framework.TestCase;\r\nimport junit.framework.TestSuite;\r\n\r\n\/**\r\n * Unit test for simple App.\r\n *\/\r\npublic class AppTest \r\n    extends TestCase\r\n{\r\n    \/**\r\n     * Create the test case\r\n     *\r\n     * @param testName name of the test case\r\n     *\/\r\n    public AppTest( String testName )\r\n    {\r\n        super( testName );\r\n    }\r\n\r\n    \/**\r\n     * @return the suite of tests being tested\r\n     *\/\r\n    public static Test suite()\r\n    {\r\n        return new TestSuite( AppTest.class );\r\n    }\r\n\r\n    \/**\r\n     * Rigourous Test :-)\r\n     *\/\r\n    public void testApp()\r\n    {\r\n        assertTrue( true );\r\n    }\r\n}\r\n<\/pre>\n<h2>package(\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3092\u884c\u3046\u30b4\u30fc\u30eb)<\/h2>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001package\u306f\u306a\u3044\u306e\u3067\u3001\u300c\u5b9f\u884c\u306e\u69cb\u6210\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2437\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/package1.png\" alt=\"\" width=\"750\" height=\"403\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/package1.png 750w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/package1-300x161.png 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<p>\u30b4\u30fc\u30eb\u306b\u3001\u300cpackage\u300d\u3092\u5165\u529b\u3057\u3066\u3001\u300c\u5b9f\u884c\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2438\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/package2.png\" alt=\"\" width=\"756\" height=\"624\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/package2.png 756w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/package2-300x248.png 300w\" sizes=\"(max-width: 756px) 100vw, 756px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001target\u30d5\u30a9\u30eb\u30c0\u306bjar\u5316\u3055\u308c\u305f\u30a2\u30d7\u30ea\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2439\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/package3.png\" alt=\"\" width=\"296\" height=\"249\" \/><\/p>\n<h2>clean(\u4e0d\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3059\u308b\u30b4\u30fc\u30eb)<\/h2>\n<p>Maven clean\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2440\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/clean1.png\" alt=\"\" width=\"725\" height=\"261\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/clean1.png 725w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/clean1-300x108.png 300w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><\/p>\n<p>target\u30d5\u30a9\u30eb\u30c0\u304b\u3089\u3001\u4e0d\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u304c\u524a\u9664\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2441\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/clean2.png\" alt=\"\" width=\"299\" height=\"175\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/clean2.png 299w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/clean2-177x104.png 177w\" sizes=\"(max-width: 299px) 100vw, 299px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"Maven\u306e\u57fa\u672c\u3067\u3042\u308b\u300c\u30b4\u30fc\u30eb\u300d\u306b\u3064\u3044\u3066\u3054\u8aac\u660e\u81f4\u3057\u307e\u3059\u3002 \u30b4\u30fc\u30eb\u3068\u306f\uff1f \u30b4\u30fc\u30eb\u306b\u4f55\u3092\u6307\u5b9a\u3059\u308b\u304b\u3067\u3001\u5b9f\u884c\u3059\u308b\u51e6\u7406\u5185\u5bb9\u304c\u5909\u308f\u308a\u307e\u3059\u3002 \u30b4\u30fc\u30eb\u306e\u7a2e\u985e \u30b4\u30fc\u30eb\u306e\u7a2e\u985e \u8aac\u660e compile \u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u30b4\u30fc\u30eb\u3067\u3059\u3002  [&hellip;]","protected":false},"author":1,"featured_media":2443,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/2420"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2420"}],"version-history":[{"count":9,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/2420\/revisions"}],"predecessor-version":[{"id":2442,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/2420\/revisions\/2442"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/media\/2443"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2420"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}