mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 05:27:17 +00:00
Allow building without protobuf-compiler installed
This commit is contained in:
21
README
21
README
@@ -2,14 +2,6 @@ To get started, ensure you have the latest JDK installed, and download Maven fro
|
||||
|
||||
http://maven.apache.org/
|
||||
|
||||
and install the protobuf compiler package version 2.4.x:
|
||||
|
||||
Debian/Ubuntu: apt-get install protobuf-compiler
|
||||
|
||||
Windows: http://code.google.com/p/protobuf/downloads/list
|
||||
|
||||
OSX: install from ports?
|
||||
|
||||
Then run "mvn clean package" to compile the software. You can also run "mvn site:site" to generate a website with
|
||||
useful information like JavaDocs. The outputs are under the target/ directory.
|
||||
|
||||
@@ -27,6 +19,15 @@ If you get a SocketDisconnectedException, the node you've connected to has its m
|
||||
(unfortunately the default is too low). Connect to a node that has a bigger send buffer,
|
||||
settable by passing -maxsendbuffer=25600 to the Bitcoin C++ software.
|
||||
|
||||
For the convenience of Eclipse users, you can copy dependency jars to target/dependency using:
|
||||
To regenerate the protobuf Java sources from src/bitcoin.proto, install the protobuf compiler package version 2.4.x:
|
||||
|
||||
Debian/Ubuntu: apt-get install protobuf-compiler
|
||||
|
||||
Windows: http://code.google.com/p/protobuf/downloads/list
|
||||
|
||||
OSX: install from ports?
|
||||
|
||||
and regenerate:
|
||||
|
||||
mvn clean package -DupdateProtobuf
|
||||
|
||||
mvn dependency:copy-dependencies
|
||||
|
||||
70
pom.xml
70
pom.xml
@@ -147,6 +147,48 @@
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>update-protobuf</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>updateProtobuf</name>
|
||||
<value>true</value>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile-protoc</id>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<mkdir dir="${project.basedir}/src/main/java/com/google/bitcoin/protobuf" />
|
||||
<path id="proto.path">
|
||||
<fileset dir="src">
|
||||
<include name="**/*.proto" />
|
||||
</fileset>
|
||||
</path>
|
||||
<pathconvert pathsep=" " property="proto.files" refid="proto.path" />
|
||||
<exec executable="protoc" failonerror="true">
|
||||
<arg value="--java_out=${project.basedir}/src/main/java/com/google/bitcoin/protobuf" />
|
||||
<arg value="-I${project.basedir}/src" />
|
||||
<arg line="${proto.files}" />
|
||||
</exec>
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
@@ -213,34 +255,6 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile-protoc</id>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<mkdir dir="${generated.sourceDirectory}" />
|
||||
<path id="proto.path">
|
||||
<fileset dir="src">
|
||||
<include name="**/*.proto" />
|
||||
</fileset>
|
||||
</path>
|
||||
<pathconvert pathsep=" " property="proto.files" refid="proto.path" />
|
||||
<exec executable="protoc" failonerror="true">
|
||||
<arg value="--java_out=${generated.sourceDirectory}" />
|
||||
<arg value="-I${project.basedir}/src" />
|
||||
<arg line="${proto.files}" />
|
||||
</exec>
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user