<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/post//</link>
<title><![CDATA[dubbo服务独立打包为可运行程序]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[编程杂谈]]></category>
<pubDate>Thu, 17 Oct 2019 02:21:42 +0000</pubDate> 
<guid>https://www.heckjj.com/post//</guid> 
<description>
<![CDATA[ 
	百度了几百篇文章都没有真正的将独立打包的过程写清楚。我写在这里只是为了自己以后可以查看。<br/><br/>1.需要在相应的项目的目录src目录下增加一下目录和文件<br/>a.src/main/asse<br/><br/>2.修改pom.xml<br/>在project配置里增加<br/><br/> &lt;build&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;plugins&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;plugin&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;version&gt;2.4.1&lt;/version&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;configuration&gt;<br/>&n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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/goals&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/execution&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/executions&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/plugin&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/plugins&gt;<br/>&lt;/build&gt;<br/><br/><br/><br/><br/><br/>3.为了能够启动spring容器，还需要增加以下依赖<br/><br/>&lt;dependency&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;groupId&gt;com.alibaba&lt;/groupId&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;artifactId&gt;dubbo-container-spring&lt;/artifactId&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;version&gt;$&#123;project.parent.version&#125;&lt;/version&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/dependency&gt;<br/>注意<br/>1：需要自行建立bin目录 ，用于存放启动的各类脚本<br/>2:conf目录下建立配置文件，可以将dubbo.properties的文件存放在该目录下，<br/>3:assembly下 assembly.xml文件配置一下内容<br/><br/><br/>&lt;!--<br/>Licensed to the Apache Software Foundation (ASF) under one or more<br/> contributor license agreements.&nbsp;&nbsp;See the NOTICE file distributed with<br/> this work for additional information regarding copyright ownership.<br/> The ASF licenses this file to You under the Apache License, Version 2.0<br/> (the &quot;License&quot;); you may not use this file except in compliance with<br/>the License.&nbsp;&nbsp;You may obtain a copy of the License at<br/><br/>&nbsp;&nbsp;http://www.apache.org/licenses/LICENSE-2.0<br/><br/> Unless required by applicable law or agreed to in writing, software<br/> distributed under the License is distributed on an &quot;AS IS&quot; BASIS,<br/>&nbsp;&nbsp;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br/>&nbsp;&nbsp;See the License for the specific language governing permissions and<br/>&nbsp;&nbsp;limitations under the License.<br/> --&gt;<br/> &lt;assembly&gt;<br/>&nbsp;&nbsp;&lt;id&gt;assembly&lt;/id&gt;<br/>&nbsp;&nbsp;&lt;formats&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;format&gt;tar.gz&lt;/format&gt;<br/>&nbsp;&nbsp;&lt;/formats&gt;<br/>&lt;includeBaseDirectory&gt;true&lt;/includeBaseDirectory&gt;<br/>&lt;fileSets&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;fileSet&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;directory&gt;src/main/assembly/bin&lt;/directory&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;outputDirectory&gt;bin&lt;/outputDirectory&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;fileMode&gt;0755&lt;/fileMode&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/fileSet&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;fileSet&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;directory&gt;src/main/assembly/conf&lt;/directory&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;outputDirectory&gt;conf&lt;/outputDirectory&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;fileMode&gt;0644&lt;/fileMode&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/fileSet&gt;<br/>&lt;/fileSets&gt;<br/>&lt;dependencySets&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;dependencySet&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;outputDirectory&gt;lib&lt;/outputDirectory&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/dependencySet&gt;<br/>&lt;/dependencySets&gt;<br/> &lt;/assembly&gt;<br/><br/><br/><br/>4.运行mvn install
]]>
</description>
</item><item>
<link>https://www.heckjj.com/post//#blogcomment</link>
<title><![CDATA[[评论] dubbo服务独立打包为可运行程序]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>