{"id":153,"date":"2020-11-03T18:24:42","date_gmt":"2020-11-03T18:24:42","guid":{"rendered":"http:\/\/robinluo.top\/?p=153"},"modified":"2021-08-31T00:45:14","modified_gmt":"2021-08-31T00:45:14","slug":"groovy","status":"publish","type":"post","link":"https:\/\/robinluo.top\/?p=153","title":{"rendered":"groovy"},"content":{"rendered":"\n<p>\u5728java\u7684\u57fa\u7840\u4e0a\u5305\u88c5\u4e86\u4e00\u5c42\u8bed\u6cd5\u7cd6\u3002\u867d\u7136\u8bed\u6cd5\u4e0a\u6bd4java\u8981\u8f7b\u4fbf\u7075\u6d3b\uff0c\u4f46\u5b9e\u9645\u4e0a\u4f1a\u751f\u6210\u5f88\u591a\u8f85\u52a9\u7c7b\uff0c\u5185\u5b58\u6d88\u8017\u4f1a\u66f4\u591a\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>idea \u901a\u8fc7\u5f15\u5165groovy-sdk \u53ef\u4ee5\u5b8c\u6210groovy\u7684\u7f16\u8bd1<\/p>\n\n\n\n<p>\u82e5\u60f3\u8981\u901a\u8fc7maven \u7f16\u8bd1\u9879\u76ee<\/p>\n\n\n\n<p>maven \u914d\u7f6e\u4e00\u89c8<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n\txsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\">\r\n\t&lt;modelVersion>4.0.0&lt;\/modelVersion>\r\n\t&lt;groupId>SocketServer&lt;\/groupId>\r\n\t&lt;artifactId>SocketServer&lt;\/artifactId>\r\n\t&lt;version>0.0.1-SNAPSHOT&lt;\/version>\r\n\t&lt;name>maven&lt;\/name>\r\n\t&lt;url>http:\/\/maven.apache.org&lt;\/url>\r\n\t&lt;properties>\r\n\t\t&lt;project.build.sourceEncoding>UTF-8&lt;\/project.build.sourceEncoding>\r\n\t&lt;\/properties>\r\n\t&lt;pluginRepositories>\r\n\t\t&lt;pluginRepository>\r\n\t\t\t&lt;id>central&lt;\/id>\r\n\t\t\t&lt;name>Maven Central Repository&lt;\/name>\r\n\t\t\t&lt;url>https:\/\/maven.aliyun.com\/repository\/central&lt;\/url>\r\n\t\t&lt;\/pluginRepository>\r\n\t\t&lt;pluginRepository>\r\n\t\t\t&lt;id>jcenter&lt;\/id>\r\n\t\t\t&lt;name>Java Center Repository&lt;\/name>\r\n\t\t\t&lt;url>https:\/\/maven.aliyun.com\/repository\/jcenter&lt;\/url>\r\n\t\t&lt;\/pluginRepository>\r\n\t&lt;\/pluginRepositories>\r\n\t&lt;build>\r\n\t\t&lt;plugins>\r\n\t\t\t&lt;plugin>\r\n\t\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\r\n\t\t\t\t&lt;artifactId>maven-compiler-plugin&lt;\/artifactId>\r\n\t\t\t\t&lt;version>3.8.1&lt;\/version>\r\n\t\t\t\t&lt;configuration>\r\n\t\t\t\t\t&lt;source>1.8&lt;\/source>\r\n\t\t\t\t\t&lt;target>1.8&lt;\/target>\r\n\t\t\t\t\t&lt;encoding>UTF-8&lt;\/encoding>\r\n\t\t\t\t&lt;\/configuration>\r\n\t\t\t&lt;\/plugin>\r\n\t\t\t&lt;plugin>\r\n\t\t\t\t&lt;groupId>org.codehaus.gmavenplus&lt;\/groupId>\r\n\t\t\t\t&lt;artifactId>gmavenplus-plugin&lt;\/artifactId>\r\n\t\t\t\t&lt;version>1.8.1&lt;\/version>\r\n\t\t\t\t&lt;executions>\r\n\t\t\t\t\t&lt;execution>\r\n\t\t\t\t\t\t&lt;goals>\r\n\t\t\t\t\t\t\t&lt;goal>addSources&lt;\/goal>\r\n\t\t\t\t\t\t\t&lt;goal>addTestSources&lt;\/goal>\r\n\t\t\t\t\t\t\t&lt;goal>generateStubs&lt;\/goal>\r\n\t\t\t\t\t\t\t&lt;goal>compile&lt;\/goal>\r\n\t\t\t\t\t\t\t&lt;goal>generateTestStubs&lt;\/goal>\r\n\t\t\t\t\t\t\t&lt;goal>compileTests&lt;\/goal>\r\n\t\t\t\t\t\t\t&lt;goal>removeStubs&lt;\/goal>\r\n\t\t\t\t\t\t\t&lt;goal>removeTestStubs&lt;\/goal>\r\n\t\t\t\t\t\t&lt;\/goals>\r\n\t\t\t\t\t&lt;\/execution>\r\n\t\t\t\t&lt;\/executions>\r\n\t\t\t&lt;\/plugin>\r\n\t\t\t&lt;plugin>\r\n\t\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\r\n\t\t\t\t&lt;artifactId>maven-dependency-plugin&lt;\/artifactId>\r\n\t\t\t\t&lt;version>3.0.1&lt;\/version>\r\n\t\t\t\t&lt;executions>\r\n\t\t\t\t\t&lt;execution>\r\n\t\t\t\t\t\t&lt;id>copy-dependencies&lt;\/id>\r\n\t\t\t\t\t\t&lt;phase>package&lt;\/phase>\r\n\t\t\t\t\t\t&lt;goals>\r\n\t\t\t\t\t\t\t&lt;goal>copy-dependencies&lt;\/goal>\r\n\t\t\t\t\t\t&lt;\/goals>\r\n\t\t\t\t\t\t&lt;configuration>\r\n\t\t\t\t\t\t\t&lt;outputDirectory>${project.build.directory}\/lib&lt;\/outputDirectory>\r\n\t\t\t\t\t\t&lt;\/configuration>\r\n\t\t\t\t\t&lt;\/execution>\r\n\t\t\t\t&lt;\/executions>\r\n\t\t\t&lt;\/plugin>\r\n\t\t\t&lt;plugin>\r\n\t\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\r\n\t\t\t\t&lt;artifactId>maven-jar-plugin&lt;\/artifactId>\r\n\t\t\t\t&lt;configuration>\r\n\t\t\t\t\t&lt;archive>\r\n\t\t\t\t\t\t&lt;manifest>\r\n\t\t\t\t\t\t\t&lt;addClasspath>true&lt;\/addClasspath>\r\n\t\t\t\t\t\t\t&lt;classpathPrefix>lib\/&lt;\/classpathPrefix>\r\n\t\t\t\t\t\t\t&lt;mainClass>org.robin.Main&lt;\/mainClass>\r\n\t\t\t\t\t\t&lt;\/manifest>\r\n\t\t\t\t\t&lt;\/archive>\r\n\t\t\t\t&lt;\/configuration>\r\n\t\t\t&lt;\/plugin>\r\r\n\t\t&lt;\/plugins>\r\n\t&lt;\/build>\r\n\r\n\t&lt;repositories>\r\n\t\t  &lt;repository>\r\n\t\t\t   &lt;id>central&lt;\/id>\r\n\t\t\t   &lt;name>Maven Central Repository&lt;\/name>\r\n\t\t\t   &lt;url>https:\/\/maven.aliyun.com\/repository\/central&lt;\/url>\r\n\t\t  &lt;\/repository>\r\n\t\t  &lt;repository>\r\n\t\t\t   &lt;id>jcenter&lt;\/id>\r\n\t\t\t   &lt;name>Java Center Repository&lt;\/name>\r\n\t\t\t   &lt;url>https:\/\/maven.aliyun.com\/repository\/jcenter&lt;\/url>\r\n\t\t  &lt;\/repository>\r\n \t&lt;\/repositories>\r\n\t&lt;dependencies>\n\t\t&lt;!-- https:\/\/mvnrepository.com\/artifact\/org.codehaus.groovy\/groovy-bsf -->\r\n\t\t&lt;dependency>\r\n\t\t\t&lt;groupId>org.codehaus.groovy&lt;\/groupId>\r\n\t\t\t&lt;artifactId>groovy-bsf&lt;\/artifactId>\r\n\t\t\t&lt;version>3.0.5&lt;\/version>\r\n\t\t&lt;\/dependency>\r\n\t\t&lt;!-- https:\/\/mvnrepository.com\/artifact\/org.codehaus.groovy\/groovy-cli-commons -->\r\n\t\t&lt;dependency>\r\n\t\t\t&lt;groupId>org.codehaus.groovy&lt;\/groupId>\r\n\t\t\t&lt;artifactId>groovy-cli-commons&lt;\/artifactId>\r\n\t\t\t&lt;version>3.0.5&lt;\/version>\r\n\t\t&lt;\/dependency>\r\n\t\t&lt;!-- https:\/\/mvnrepository.com\/artifact\/org.codehaus.groovy\/groovy-yaml -->\r\n\t\t&lt;dependency>\r\n\t\t\t&lt;groupId>org.codehaus.groovy&lt;\/groupId>\r\n\t\t\t&lt;artifactId>groovy-yaml&lt;\/artifactId>\r\n\t\t\t&lt;version>3.0.5&lt;\/version>\r\n\t\t&lt;\/dependency>\r\n\t\t&lt;!-- https:\/\/mvnrepository.com\/artifact\/org.codehaus.groovy\/groovy-jaxb -->\r\n\t\t&lt;dependency>\r\n\t\t\t&lt;groupId>org.codehaus.groovy&lt;\/groupId>\r\n\t\t\t&lt;artifactId>groovy-jaxb&lt;\/artifactId>\r\n\t\t\t&lt;version>3.0.5&lt;\/version>\r\n\t\t&lt;\/dependency>\r\n\t\t&lt;!-- https:\/\/mvnrepository.com\/artifact\/org.codehaus.groovy\/groovy-dateutil -->\r\n\t\t&lt;dependency>\r\n\t\t\t&lt;groupId>org.codehaus.groovy&lt;\/groupId>\r\n\t\t\t&lt;artifactId>groovy-dateutil&lt;\/artifactId>\r\n\t\t\t&lt;version>3.0.5&lt;\/version>\r\n\t\t&lt;\/dependency>\r\n\r\n\t&lt;\/dependencies>\r\n\r\n&lt;\/project><\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\u5927\u81f4\u8bf4\u660e \u7b2c\u4e00\u5f15\u5165 groovy-all \u5305  \u4f46groovy-all \u6bd4groovy-sdk \u5c11\u4e86\u4e00\u4e9b\u4f9d\u8d56\u5305 \u9700\u8981\u624b\u52a8\u5f15\u5165groovy-xxx\u7684\u5305<\/p>\n\n\n\n<p>\u7b2c\u4e8c \u5f15\u5165\u6253\u5305\u914d\u7f6e\u4e0e\u65b9\u5f0f \u6dfb\u52a0gmaven\u63d2\u4ef6\u4ee5\u7f16\u8bd1\u6253\u5305groovy\u6587\u4ef6<\/p>\n\n\n\n<p>\u53e6\u4e00\u4e2a\u5c31\u662f\u53ef\u6267\u884cjar\u5305 \u548c \u7b2c\u4e09\u65b9\u4f9d\u8d56\u5305\u7684\u95ee\u9898\u4e86<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728java\u7684\u57fa\u7840\u4e0a\u5305\u88c5\u4e86\u4e00\u5c42\u8bed\u6cd5\u7cd6\u3002\u867d\u7136\u8bed\u6cd5\u4e0a\u6bd4java\u8981\u8f7b\u4fbf\u7075\u6d3b\uff0c\u4f46\u5b9e\u9645\u4e0a\u4f1a\u751f\u6210\u5f88\u591a\u8f85\u52a9\u7c7b\uff0c\u5185\u5b58\u6d88\u8017\u4f1a\u66f4\u591a\u3002 idea \u901a\u8fc7\u5f15\u5165groovy-sdk \u53ef\u4ee5\u5b8c\u6210groovy\u7684\u7f16\u8bd1 \u82e5\u60f3\u8981\u901a\u8fc7maven \u7f16\u8bd1\u9879\u76ee maven \u914d\u7f6e\u4e00\u89c8 \u5927\u81f4\u8bf4\u660e \u7b2c\u4e00\u5f15\u5165 groovy-all \u5305 \u4f46groovy-all \u6bd4groovy-sdk \u5c11\u4e86\u4e00\u4e9b\u4f9d\u8d56\u5305 \u9700\u8981\u624b\u52a8\u5f15\u5165groovy-xxx\u7684\u5305 \u7b2c\u4e8c \u5f15\u5165\u6253\u5305\u914d\u7f6e\u4e0e\u65b9\u5f0f \u6dfb\u52a0gmaven\u63d2\u4ef6\u4ee5\u7f16\u8bd1\u6253\u5305groovy\u6587\u4ef6 \u53e6\u4e00\u4e2a\u5c31\u662f\u53ef\u6267\u884cjar\u5305 \u548c \u7b2c\u4e09\u65b9\u4f9d\u8d56\u5305\u7684\u95ee\u9898\u4e86<\/p>\n","protected":false},"author":1,"featured_media":170,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/153"}],"collection":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=153"}],"version-history":[{"count":2,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/153\/revisions"}],"predecessor-version":[{"id":611,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/153\/revisions\/611"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/media\/170"}],"wp:attachment":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}