Merge pull request #20 from xludx/directory-layout

updated directory layout
This commit is contained in:
GENERAL BYTES 2016-07-02 16:03:10 +02:00 committed by GitHub
commit 98e50f76db
173 changed files with 191 additions and 97 deletions

6
.gitignore vendored
View File

@ -1,6 +1,10 @@
.git .git
.DS_Store .DS_Store
dist/ dist/
bin/
build/ build/
.idea .idea
.gradle
.iml
target
install-libs.sh
.mvn-repo

27
bin/create-maven-repos.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
directory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $directory
# API dependencies
./install-lib.sh api mail.jar javax.mail mail 1.4.7
./install-lib.sh api slf4j-api-1.7.5.jar org.slf4j slf4j-api 1.7.5
./install-lib.sh api slf4j-simple-1.7.5.jar org.slf4j slf4j-simple 1.7.5
# EXTRA dependencies
./install-lib.sh extra base64-2.3.8.jar net.iharder base64 2.3.8
./install-lib.sh extra bitcoin-json-rpc-client-1.0.jar com.azazar.bitcoin.jsonrpcclient bitcoin-json-rpc-client 1.0
./install-lib.sh extra commons-io-2.4.jar commons-io commons-io 2.4
./install-lib.sh extra guava-18.0.jar com.google.guava guava 18.0
./install-lib.sh extra jackson-annotations-2.4.0.jar com.fasterxml.jackson.core jackson-annotations 2.4.0
./install-lib.sh extra jackson-core-2.4.0.jar com.fasterxml.jackson.core jackson-core 2.4.0
./install-lib.sh extra jackson-databind-2.4.0.jar com.fasterxml.jackson.core jackson-databind 2.4.0
./install-lib.sh extra javax.ws.rs-api-2.0.1.jar javax.ws.rs javax.ws.rs-api 2.0.1
./install-lib.sh extra rescu-1.7.2-SNAPSHOT.jar com.github.mmazi rescu 1.7.2-SNAPSHOT
./install-lib.sh extra xchange-core-4.0.1-SNAPSHOT.jar org.knowm.xchange xchange-core 4.0.1-SNAPSHOT
./install-lib.sh extra xchange-bitfinex-4.0.1-SNAPSHOT.jar org.knowm.xchange xchange-bitfinex 4.0.1-SNAPSHOT
./install-lib.sh extra xchange-itbit-4.0.1-SNAPSHOT.jar org.knowm.xchange xchange-itbit 4.0.1-SNAPSHOT
./install-lib.sh extra xchange-bittrex-4.0.1-SNAPSHOT.jar org.knowm.xchange xchange-bittrex 4.0.1-SNAPSHOT
./install-lib.sh extra xchange-poloniex-4.0.1-SNAPSHOT.jar org.knowm.xchange xchange-poloniex 4.0.1-SNAPSHOT
# TEST dependencies
./install-lib.sh test jopt-simple-4.9.jar net.sf.jopt-simple jopt-simple 4.9

50
bin/install-lib.sh Executable file
View File

@ -0,0 +1,50 @@
#!/bin/bash
project="$1"
file="$2"
groupId="$3"
artifactId="$4"
version="$5"
directory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo directory: $directory
if [ -z "$5" ] ; then
echo 'This script is used to install dependencies to the local maven repository.'
echo 'usage: install-lib.sh project file groupId artifactId version'
echo ''
echo 'project is either api, extra, or test'
echo ''
echo 'example: install-lib.sh api mail-1.4.7.jar javax.mail mail 1.4.7'
echo ''
exit 1
fi
if [ "$1" == "api" ] || [ "$1" == "extra" ] || [ "$1" == "test" ] ; then
localRepositoryPath="../server_extensions_$1/.mvn-repo"
mkdir -p $localRepositoryPath
fileLocation="../server_extensions_$1/libs/$file"
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file \
-Dfile=$fileLocation \
-DgroupId=$groupId \
-DartifactId=$artifactId \
-Dversion=$version-BATM \
-Dpackaging=jar \
-DlocalRepositoryPath=$localRepositoryPath
echo ''
echo '...installed, you can use it by adding following to the pom.xml:'
echo ''
echo '<dependency>'
echo " <groupId>$groupId</groupId>"
echo " <artifactId>$artifactId</artifactId>"
echo " <version>$version-BATM</version>"
echo '</dependency>'
echo ''
else
echo 'project needs to be either api, extra, or test'
fi
exit 1

View File

@ -21,14 +21,15 @@
BATM server extensions API BATM server extensions API
</description> </description>
<!-- set global properties for this build --> <!-- set global properties for this build -->
<property name="src" location="src"/> <property name="src" location="src/main/java"/>
<property name="res" location="src/main/resources"/>
<property name="build" location="build"/> <property name="build" location="build"/>
<property name="dist" location="dist"/> <property name="dist" location="dist"/>
<property name="libs" location="libs"/> <property name="libs" location="libs"/>
<target name="init"> <target name="init">
<tstamp/> <tstamp/>
<delete dir="${build}" /> <delete dir="${build}"/>
<mkdir dir="${build}"/> <mkdir dir="${build}"/>
</target> </target>
@ -36,21 +37,20 @@
<fileset dir="${libs}" includes="**/*.jar"/> <fileset dir="${libs}" includes="**/*.jar"/>
</path> </path>
<target name="compile" depends="init" description="compile the source " > <target name="compile" depends="init" description="compile the source ">
<javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source"> <javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
<classpath> <classpath>
<path refid="classpath" /> <path refid="classpath"/>
</classpath> </classpath>
</javac> </javac>
</target> </target>
<target name="dist" depends="compile" description="generate the distribution" > <target name="dist" depends="compile" description="generate the distribution">
<mkdir dir="${dist}"/> <mkdir dir="${dist}"/>
<jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"/> <jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"/>
</target> </target>
<target name="clean" description="clean up" > <target name="clean" description="clean up">
<delete dir="${build}"/> <delete dir="${build}"/>
<delete dir="${dist}"/> <delete dir="${dist}"/>
</target> </target>

View File

@ -22,15 +22,15 @@
BATM server extra extensions BATM server extra extensions
</description> </description>
<!-- set global properties for this build --> <!-- set global properties for this build -->
<property name="src" location="src"/> <property name="src" location="src/main/java"/>
<property name="res" location="res"/> <property name="res" location="src/main/resources"/>
<property name="build" location="build"/> <property name="build" location="build"/>
<property name="dist" location="dist"/> <property name="dist" location="dist"/>
<property name="libs" location="libs"/> <property name="libs" location="libs"/>
<target name="init"> <target name="init">
<tstamp/> <tstamp/>
<delete dir="${build}" /> <delete dir="${build}"/>
<mkdir dir="${build}"/> <mkdir dir="${build}"/>
</target> </target>
@ -40,10 +40,10 @@
<fileset dir="../server_extensions_api/dist" includes="**/*.jar"/> <fileset dir="../server_extensions_api/dist" includes="**/*.jar"/>
</path> </path>
<target name="compile" depends="init" description="compile the source " > <target name="compile" depends="init" description="compile the source ">
<javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source"> <javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
<classpath> <classpath>
<path refid="classpath" /> <path refid="classpath"/>
</classpath> </classpath>
</javac> </javac>
<copy todir="${build}"> <copy todir="${build}">
@ -51,16 +51,14 @@
<include name="**/*"/> <include name="**/*"/>
</fileset> </fileset>
</copy> </copy>
</target> </target>
<target name="dist" depends="compile" description="generate the distribution" > <target name="dist" depends="compile" description="generate the distribution">
<mkdir dir="${dist}"/> <mkdir dir="${dist}"/>
<jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"/> <jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"/>
</target> </target>
<target name="clean" description="clean up" > <target name="clean" description="clean up">
<delete dir="${build}"/> <delete dir="${build}"/>
<delete dir="${dist}"/> <delete dir="${dist}"/>
</target> </target>

Some files were not shown because too many files have changed in this diff Show More