You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Naveen <na...@gmail.com> on 2018/04/18 07:45:09 UTC

How to start Ignite with a jar built from the source code

Hi

Am using 2.4

I would like to build jar from source code downloaded from Apache and use
jar to start the Ignite node, do we have any documentation on this on how to
pass the config XML etc..

Thanks
Naven



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to start Ignite with a jar built from the source code

Posted by aealexsandrov <ae...@gmail.com>.
Hi,

In source code we have DEVNOTES.txt that contains the information how to
build ignite.

I believe that next steps could help you:

1)git clone https://git-wip-us.apache.org/repos/asf/ignite.git
2)Update your source code.
3)Build ignite as described from DEVNOTES.txt:

1.Compile and install:

mvn clean install -Pall-java,all-scala,licenses -DskipTests

2.Javadoc generation (optional):
  
mvn initialize -Pjavadoc

3. Assembly Apache Ignite fabric:

mvn initialize -Prelease

Look for apache-ignite-fabric-<version>-bin.zip in ./target/bin directory.

4)After that you can use generated jar files.

5)Run ignite command contains of next:

"%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %JMX_MON%
-DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" -cp "%CP%"
%MAIN_CLASS% "%CONFIG%"


where:

%JAVA_HOME% - path to your java installation
%JVM_OPTS% - options for JVM where ignite will be started
%QUIET% - -DIGNITE_QUIET=true (or false)
%IGNITE_HOME% - path to your ignite location (path
apache-ignite-fabric-<version>-bin folder from unziped
apache-ignite-fabric-<version>-bin.zip)
%PROG_NAME% - program name
%CP% - classpath. By default it should be like next:

C:\Ignite\2.4\apache-ignite-fabric-2.4.0-bin\libs\*;C:\Ignite\2.4\apache-ignite-fabric-2.4.0-bin\libs\ignite-indexing\*;C:\Ignite\2.4\apache-ignite-fabric-2.4.0-bin\libs\ignite-spring\*;C:\Ignite\2.4\apache-ignite-fabric-2.4.0-bin\libs\licenses\*

%MAIN_CLASS% - org.apache.ignite.startup.cmdline.CommandLineStartup for
command line (maybe you will create your own)
%CONFIG% - path to config file  (default -  config\default-config.xml)

Provided options list isn't full but hope it will help you to build and
start ignite. 

Thank you,
Andrei

















--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to start Ignite with a jar built from the source code

Posted by Naveen <na...@gmail.com>.
Hi Andrei 

I have been using this way with ignite.sh by passing a config XML

However, going forward I wanted to build the jar from source and run the jar
with the config file (similar to starting with ignite.sh) instead of
ignite.sh

Reason being, every time there is a version upgrade or newer version or any
other custom features we add, we need to update new version across all the
servers, instead if I can  build the jar from source, I just move the jar to
all the  server without copying the entire binary along with external jars
like ojdbc etc.

So I would like to know the steps involved in building the jar from source
and how do I run ignite server node with jar 



Thanks
Naveen



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to start Ignite with a jar built from the source code

Posted by aealexsandrov <ae...@gmail.com>.
Hi,

You can find ignite.bat and ignite.sh scripts in source bundle bin folder.
It is the best way to start Ignite with custom configuration. It described
here:

https://apacheignite.readme.io/docs/getting-started#section-passing-configuration-file

Also you can take a look inside these scripts and use the run command from
them directly.

Thank you,
Andrei



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/