You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by hezjing <he...@gmail.com> on 2007/07/04 11:19:38 UTC

Compile and run MINA's Echo server with Ivy

Hi!

I would like to share with you how to compile and run MINA's example -
Echo server using Ivy.

The prerequisite is to installed Apache Ant, and copy the
http://www.xoocode.org/downloads/tools/ivy/ivy.jar (built from trunk
on 29th June) into %ANT_HOME%/lib.


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



-- 

Hez

Re: Compile and run MINA's Echo server with Ivy

Posted by Trustin Lee <tr...@gmail.com>.
Hezjing,

Thank you very much for sharing your experience!

Cheers,
Trustin

On 7/4/07, hezjing <he...@gmail.com> wrote:
> Hi!
>
> I would like to share with you how to compile and run MINA's example -
> Echo server using Ivy.
>
> The prerequisite is to installed Apache Ant, and copy the
> http://www.xoocode.org/downloads/tools/ivy/ivy.jar (built from trunk
> on 29th June) into %ANT_HOME%/lib.
>
>
> 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
>
>
>
> --
>
> Hez
>


-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Compile and run MINA's Echo server with Ivy

Posted by hezjing <he...@gmail.com>.
Hi Mat

You may want to take a look at
http://incubator.apache.org/ivy/doc/m2comparison.html

I believe both Maven and Ivy have their own strength and it is all
about your taste, you choose one that is work well to you :-)

Somehow, I find myself having difficulties to switch to Maven and
indeed it is a pain when most of the Apache projects are turning to
Maven, like MINA, AysncWeb and etc :-(

There could be others like me in the MINA community, and Ivy could be
another alternative.



On 7/5/07, mat <fo...@gmail.com> wrote:
> Just curious, what is good about Ivy?
>
> On 7/4/07, hezjing <he...@gmail.com> wrote:
> >
> > Hi!
> >
> > I would like to share with you how to compile and run MINA's example -
> > Echo server using Ivy.
> >
> > The prerequisite is to installed Apache Ant, and copy the
> > http://www.xoocode.org/downloads/tools/ivy/ivy.jar (built from trunk
> > on 29th June) into %ANT_HOME%/lib.
> >
> >
> > 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
> >
> >
> >
> > --
> >
> > Hez
> >
>


-- 

Hez

Re: Compile and run MINA's Echo server with Ivy

Posted by Trustin Lee <tr...@gmail.com>.
On 7/5/07, mat <fo...@gmail.com> wrote:
> Just curious, what is good about Ivy?

Asking the Ivy community will give you better answer.

http://incubator.apache.org/ivy/

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Compile and run MINA's Echo server with Ivy

Posted by mat <fo...@gmail.com>.
Just curious, what is good about Ivy?

On 7/4/07, hezjing <he...@gmail.com> wrote:
>
> Hi!
>
> I would like to share with you how to compile and run MINA's example -
> Echo server using Ivy.
>
> The prerequisite is to installed Apache Ant, and copy the
> http://www.xoocode.org/downloads/tools/ivy/ivy.jar (built from trunk
> on 29th June) into %ANT_HOME%/lib.
>
>
> 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
>
>
>
> --
>
> Hez
>