`
BlackWing
  • 浏览: 199944 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

搭建ivy服务器

阅读更多
转载请标明出处:http://blackwing.iteye.com/blog/1981812

ivy服务器的一般应用场景是,再内网某台服务器上搭建一个共享的repository,本地连接检出需要的jar包。

1. ubuntu上安装samba

sudo apt-get install samba


2. 创建目录
在自己需要的路径下创建一个共享目录,例如: /usr/local/cluster/public
跟着修改samba的配置文件(apt-get安装后,默认在/etc/samba/smb.conf)
在文件最后添加:
[share]
path=/usr/local/cluster/public
public=yes
writable=yes
available=yes
browseable=yes


3. 重启samba让修改生效
sudo /etc/init.d/smbd restart


此时可以通过浏览器或者资源管理器访问该共享库,但要注意,访问的路径是:
\\ip-of-your-ubuntu\share
可以把需要共享的jar包拷贝到这里,也可以根据需要,建目录。

windows下,也就是本机要预先安装好ant、ivy,eclipse要安装好ivyDE(升级地址:http://www.apache.org/dist/ant/ivyde/updatesite),之后就是主要的ivysettings.xml的配置:
<?xml version="1.0" encoding="ISO-8859-1"?>

<ivysettings>
	<property name="ivy.default.ivy.user.dir" value="${ivy.settings.dir}"/>
	<property name="ivy.local.default.root" value="${ivy.settings.dir}/public"/>
	<property name="ivy.shared.default.root" value="\\172.19.99.40\share\"/>
	<settings defaultResolver="chain"/>
	<caches defaultCacheDir="${ivy.settings.dir}/cache"/> 
	<resolvers>
		<chain name="chain">
			<filesystem name="local" checkmodified="true">
				<ivy pattern="${ivy.local.default.root}/[organisation]/[module]/ivy-[revision].xml" />				
				<artifact pattern="${ivy.shared.default.root}/[organisation]/[module]/[artifact]-[revision].[ext]" />
			</filesystem>
			
			<filesystem name="shared" checkmodified="true">
				<ivy pattern="${ivy.shared.default.root}/[organisation]/[module]/ivy-[revision].xml" />
				<artifact pattern="${ivy.shared.default.root}/public/[artifact]-[revision].[ext]" />
				<artifact pattern="${ivy.shared.default.root}/[organisation]/[module]/[artifact]-[revision].[ext]" />				
			</filesystem>
			
			<ibiblio name="repo1.maven.org" m2compatible="true" root="http://repo1.maven.org/maven2" />
			<ibiblio name="repo2.maven.org" m2compatible="true" root="http://repo2.maven.org/maven2" />
			<ibiblio name="maven.atlassian.com" m2compatible="true" root="https://maven.atlassian.com/repository/public" />
			<ibiblio name="mirrors.ibiblio.org" m2compatible="true" root="http://mirrors.ibiblio.org/maven2/" />
			<ibiblio name="ibiblio" usepoms="false"/>
		</chain>
	</resolvers>

	<modules>
        <module organisation="javax.jms" name="jms" resolver="maven.atlassian.com" />
	</modules>

</ivysettings>


4.项目相关的ivy.xml配置:
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
	<info organisation="xx" module="importHiveData" status="integration"/>

	<dependencies>
		<!-- from internet -->
		<dependency org="org.apache.httpcomponents" name="httpclient" rev="4.3.1"/>
		<dependency org="javax.activation" name="activation" rev="1.1.1"/>
		<dependency org="com.google.guava" name="guava" rev="15.0"/>
		<dependency org="asm" name="asm" rev="3.1"/>
		<dependency org="commons-beanutils" name="commons-beanutils" rev="1.7.0"/>
		<dependency org="commons-cli" name="commons-cli" rev="1.2"/>
		<dependency org="commons-codec" name="commons-codec" rev="1.7"/>
		<dependency org="commons-collections" name="commons-collections" rev="3.2.1"/>
		<dependency org="commons-configuration" name="commons-configuration" rev="1.6"/>
		<dependency org="commons-digester" name="commons-digester" rev="1.8"/>
		<dependency org="commons-el" name="commons-el" rev="1.0"/>
		<dependency org="commons-httpclient" name="commons-httpclient" rev="3.1"/>
		<dependency org="commons-io" name="commons-io" rev="2.4"/>
		<dependency org="commons-lang" name="commons-lang" rev="2.6"/>
		<dependency org="commons-logging" name="commons-logging" rev="1.1.1"/>
		<dependency org="commons-math" name="commons-math" rev="2.2"/>
		<dependency org="commons-net" name="commons-net" rev="1.4.1"/>
		<!-- from shared : public jars -->
		<dependency org="" name="hadoop-core" rev="1.1.2"/>
		<dependency org="" name="hbase-client" rev="0.96.0-hadoop1"/>
		<dependency org="" name="hbase-common" rev="0.96.0-hadoop1"/>
		<dependency org="" name="hbase-hadoop-compat" rev="0.96.0-hadoop1"/>
		<dependency org="" name="hbase-it" rev="0.96.0-hadoop1"/>
		<dependency org="" name="hbase-protocol" rev="0.96.0-hadoop1"/>
		<dependency org="" name="hbase-server" rev="0.96.0-hadoop1"/>
		<dependency org="" name="hbase-shell" rev="0.96.0-hadoop1"/>
		<dependency org="" name="hbase-thrift" rev="0.96.0-hadoop1"/>
		<dependency org="" name="javacsv" rev="1.0"/>
		<dependency org="" name="zookeeper" rev="3.4.5"/>
		
	</dependencies>
</ivy-module>


之后就可以在eclipse下右击ivy.xml选择 add ivy library了


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics