Now using ant.

This commit is contained in:
Deathsbreed 2014-09-20 19:18:49 -05:00
parent f5970b351b
commit bcb4f03067
6 changed files with 49 additions and 6 deletions

View File

@ -3,10 +3,14 @@ ConsoleChat
This program was made as a personal project to learn Java network programming. The concept of it is rather simple, all it does is send messages to a server which, in turn, sends the message to everyone else (aside from some other commands added). Although the license is MIT, please consider also disclosing the source-code under an open-source license. It helps to give back to the community and help others just like this may have helped you. This program was made as a personal project to learn Java network programming. The concept of it is rather simple, all it does is send messages to a server which, in turn, sends the message to everyone else (aside from some other commands added). Although the license is MIT, please consider also disclosing the source-code under an open-source license. It helps to give back to the community and help others just like this may have helped you.
###Compilation ###Compiling
_Compile in the corresponding directory._ To compile the source code, make sure you have JDK and Apache Ant installed. Then run the following command:
```
$ ant jar
```
``` ###Contributing
$ javac Server.java To contribute to the project, simply open a pull request and I'll make sure to get back to you as soon as possible.
$ javac Client.java
``` ###License
This program is licensed with an [MIT license](/LICENSE). However, please take into account that you took from the community, and you should make sure to give back.

31
build.xml Normal file
View File

@ -0,0 +1,31 @@
<project name="ConsoleChat" basedir="." default="main" >
<property name="src.dir" value="src" />
<property name="bin.dir" value="bin" />
<property name="classes.dir" value="${bin.dir}/classes" />
<property name="jar.dir" value="${bin.dir}/jar" />
<property name="main-class-client" value="consolechat.client.Client" />
<property name="main-class-server" value="consolechat.server.Server" />
<target name="clean" >
<delete dir="bin" />
</target>
<target name="compile" >
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" />
</target>
<target name="jar" depends="compile" >
<mkdir dir="${jar.dir}" />
<jar destfile="${jar.dir}/${ant.project.name}-client.jar" basedir="${classes.dir}" >
<manifest>
<attribute name="Main-Class" value="${main-class-client}" />
</manifest>
</jar>
<jar destfile="${jar.dir}/${ant.project.name}-server.jar" basedir="${classes.dir}" >
<manifest>
<attribute name="Main-Class" value="${main-class-server}" />
</manifest>
</jar>
</target>
</project>

View File

@ -1,3 +1,5 @@
package consolechat.client;
import java.net.*; import java.net.*;
import java.io.*; import java.io.*;
import java.lang.*; import java.lang.*;

View File

@ -1,3 +1,5 @@
package consolechat.client;
import java.io.*; import java.io.*;
import java.net.*; import java.net.*;

View File

@ -1,3 +1,5 @@
package consolechat.server;
import java.net.*; import java.net.*;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;

View File

@ -1,3 +1,5 @@
package consolechat.server;
import java.net.*; import java.net.*;
import java.io.*; import java.io.*;