ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: Compile MINA's Echo server with Ivy
Date Wed, 04 Jul 2007 09:03:11 GMT
On 7/4/07, hezjing <hezjing@gmail.com> wrote:
>
> Hi!
>
> I would like to share with you how to compile MINA's example - Echo
> server using Ivy.
>
>
> Here are the steps:
>
> 1) Download Apache MINA 1.1.0 from http://mina.apache.org/
>
> 2) Extract mina-1.1.0.zip to C:\
>
> 3) Go to C:\mina-1.1.0\example
>
> 4) Create ivy.xml with the following contents
>
> <ivy-module version="1.0">
> <info organisation="jayasoft" module="my" />
> <dependencies>
> <dependency org="org.apache.mina" name="mina-core" rev="1.1.0" />
> <dependency org="org.apache.mina" name="mina-filter-ssl" rev="1.1.0" />
> <dependency org="org.apache.mina" name="mina-integration-spring" rev="
> 1.1.0" />
> <dependency org="org.springframework" name="spring-context" rev="2.0.4" />
> <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.3.0" />
> </dependencies>
> </ivy-module>
>
> 5) Craete build.xml with the following contents
>
> <project xmlns:ivy="antlib:fr.jayasoft.ivy.ant" name="my">
> <target name="init">
> <ivy:cachepath pathid="default.classpath" conf="default" />
> </target>
> <target name="resolve">
> <ivy:retrieve />
> </target>
> <target name="clean">
> <delete dir="bin" />
> </target>
> <target name="clean-cache">
> <delete dir="${user.home}/.ivy/cache" />
> </target>
> <target name="compile" depends="init">
> <mkdir dir="bin" />
> <javac srcdir="src/main/java" destdir="bin" debug="on" source="1.5">
> <classpath>
> <pathelement path="bin" />
> <path refid="default.classpath" />
> </classpath>
> </javac>
> </target>
> <target name="run" depends="compile">
> <java classname="org.apache.mina.example.echoserver.Main" fork="true">
> <classpath>
> <pathelement path="bin" />
> <pathelement path="src\main\resources" />
> <path refid="default.classpath" />
> </classpath>
> </java>
> </target>
> </project>
>
>
> 6) To run Echo server > ant run


If the two files (ivy.xml and build.xml) were provided with MINA example it
would be dead simple :-)

Thanks for sharing this with us, hope you'll share it with MINA users too!

Xavier

--
>
> Hez
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message