Support running ethereumj-studio as executable jar

See updated ethereumj-studio/README.md for details. Note that this
commit removes the `build-post-package.xml` ant file (for now) to
simplify the Gradle arrangement. This functionality can be re-introduced
later and more simply using Gradle's native DSL. In the meantime, both
the -core and -studio projects can be run using `gradle run` or run as
executable jars by running `gradle shadowJar` followed by the usual
`java -jar` execution of the resulting `-all` jar file found in each
project's respective `build/libs` directory.
This commit is contained in:
Chris Beams 2014-12-27 01:15:01 +01:00
parent 6645493adc
commit 75443aaa13
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73
6 changed files with 22 additions and 67 deletions

View File

@ -1,5 +1,9 @@
wrapper.gradleVersion = '2.2.1'
allprojects {
apply plugin: 'eclipse'
}
subprojects {
apply plugin: 'java'

View File

@ -16,15 +16,15 @@ See [ethereumj-studio](../ethereumj-studio).
#### Compile, test and package
Run `./gradlew build`.
Run `../gradlew build`.
- find jar artifacts at `build/libs`
- find unit test and code coverage reports at `build/reports`
#### Run an ethereum node
- run `./gradlew run`, or
- build a standalone executable jar with `./gradlew shadow` and execute the `-all` jar in `build/libs` using `java -jar [jarfile]`.
- run `../gradlew run`, or
- build a standalone executable jar with `../gradlew shadow` and execute the `-all` jar in `build/libs` using `java -jar [jarfile]`.
#### Import sources into IntelliJ IDEA
@ -34,7 +34,7 @@ Note that in order to build the project without errors in IDEA, you will need to
#### Install artifacts into your local `~/.m2` repository
Run `./gradlew install`.
Run `../gradlew install`.
#### Publish ethereumj-core builds

View File

@ -1,6 +1,5 @@
plugins {
id 'application'
id 'eclipse'
id 'jacoco'
id 'maven'
id 'com.github.johnrengelman.shadow' version '1.2.0'

View File

@ -1,12 +1,11 @@
###### :small_blue_diamond: Build instructions (maven)
1. build_1: [a full application package] : ~> ` mvn clean package `
## ethereum-studio
To run the ethereumj-studio GUI:
- run `../gradlew run`, or
- run `../gradlew shadowJar`, followed by `java -jar build/libs/ethereumj-studio-*-all.jar`
See ethereumj-studio in action here:
.
.
.
[![ScreenShot](http://i.imgur.com/FQiBihl.jpg)](https://www.youtube.com/watch?v=D5ok7jh7AOg)
.
.
.

View File

@ -1,54 +0,0 @@
<project name="ethereumj-postpackage" default="run" basedir=".">
<description>
Build file to package the EthereumJ client and dependencies into a zip-file
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<echo message="Ant is taking control [assembly the package]"></echo>
<echo message="${maven.project.artifactId}"></echo>
<echo message="${maven.project.version}"></echo>
</target>
<target name="make-package">
<mkdir dir="./target/package"/>
<copy todir="./target/package/ethereumj/lib">
<fileset dir="./target/dependency"/>
</copy>
<copy file="./target/${maven.project.artifactId}-${maven.project.version}.jar"
tofile="./target/package/ethereumj/${maven.project.artifactId}.jar"/>
<copy todir="./target/package/ethereumj/">
<fileset dir="./target/classes/config"/>
</copy>
<copy file="./target/classes/log4j.properties" todir="./target/package/ethereumj/config"/>
<copy file="./target/classes/system.properties" todir="./target/package/ethereumj/config"/>
<copy file="./target/classes/GeoLiteCity.dat" todir="./target/package/ethereumj/config"/>
<copy todir="./target/package/ethereumj/samples">
<fileset dir="./samples"/>
</copy>
<zip destfile="ethereumj-${DSTAMP}-${TSTAMP}.zip" basedir="./target/package">
</zip>
</target>
<target name="run" depends="init, make-package"></target>
</project>

View File

@ -1,3 +1,10 @@
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '1.2.0'
}
mainClassName = 'org.ethereum.gui.ToolBar'
dependencies {
compile project(':ethereumj-core')
compile "com.maxmind.geoip:geoip-api:1.2.11"