This discussion is archived
6 Replies Latest reply: Apr 19, 2012 7:10 PM by 931719 RSS

how to compile the source code?

931719 Newbie
Currently Being Moderated
Hello,
I have got the source code and want to custom my nosql db.
how can I compile the source code?
thank you!
  • 1. Re: how to compile the source code?
    Charles Lamb Pro
    Currently Being Moderated
    Do you have ant? If so, do

    Ant compile

    Charles Lamb
  • 2. Re: how to compile the source code?
    931719 Newbie
    Currently Being Moderated
    thank you!
    I'm not very familiar with Ant, after ant, I got "build.xml:224: extlibdir.revision property must be set.".

    what can I do to resolve it? do I need some more argument with ant?

    Looking forward to your reply!
  • 3. Re: how to compile the source code?
    guy.k.hillyer Newbie
    Currently Being Moderated
    The build.xml in the distribution is, unfortunately, not set up to work outside of our internal development environment. The error you reported indicates the failure of one of the dependencies that is just not going to work out in the field. I will try to come up with a version of the build.xml that works for you. It will require that you download some third party libraries.
  • 4. Re: how to compile the source code?
    931719 Newbie
    Currently Being Moderated
    ok! I'm counting on you here.
  • 5. Re: how to compile the source code?
    guy.k.hillyer Newbie
    Currently Being Moderated
    You will have to apply some workarounds to achieve your goal, but they are not too bad.

    One problem is that the sources for the Admin Console web application are missing from the distribution. You can build a kvstore.jar that lacks the web application but is functional in every other way. If you need to have the web application in your build, we can discuss that separately.

    You will need to download the hadoop core jar file from http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-core/0.20.2/hadoop-core-0.20.2.jar .
    Place it in the lib directory of the distribution.

    I've appended to this message a context-style diff to show the changes that are needed in build.xml. You can apply these changes by hand, or use a diff-applying program such as "patch". The diff is small -- only three lines are changed.

    With these changes in place, issue the command "ant jar", which should produce the file dist/lib/kvstore.jar. This jar file has dependencies such that it will not work correctly unless it resides in the same directory as the other jars in the distribution. Therefore you should move dist/lib/kvstore.jar to lib/kvstore.jar before you try to run with it.

    This is certainly harder than it needs to be. We'll consider making this easier to do in a future release.

    Let me know how it goes!
    *** build.xml.~1~     2011-12-14 15:11:06.000000000 -0500
    --- build.xml     2012-04-19 09:44:19.649000428 -0400
    ***************
    *** 282,292 ****
        <!-- ============================================================ -->
      
        <target name="compile" depends="compile-src,
    !                       compile-webapp,
                            compile-examples,
                            compile-test"/>
      
    !   <target name="compile-src" depends="dep-dirs, update-external-libraries">
          <javac
             srcdir="${srcdir}"
             destdir="${destdir}"
    --- 282,292 ----
        <!-- ============================================================ -->
      
        <target name="compile" depends="compile-src,
    ! 
                            compile-examples,
                            compile-test"/>
      
    !   <target name="compile-src" depends="dep-dirs">
          <javac
             srcdir="${srcdir}"
             destdir="${destdir}"
    ***************
    *** 402,408 ****
          </java>
        </target>
      
    !   <target name="jar" depends="compile-src, compile-webapp-gwtc, je-version, kvclientjar">
          <delete failonerror="false" file="${jarfile}" />
          <jar jarfile="${jarfile}">
           <fileset refid="jarclasses"/>
    --- 402,408 ----
          </java>
        </target>
      
    !   <target name="jar" depends="compile-src, je-version, kvclientjar">
          <delete failonerror="false" file="${jarfile}" />
          <jar jarfile="${jarfile}">
           <fileset refid="jarclasses"/>
    Edited by: Guy Hillyer, Oracle on Apr 19, 2012 9:57 AM
  • 6. Re: how to compile the source code?
    931719 Newbie
    Currently Being Moderated
    Hi all,

    It works! I run my Oracle NoSql db with CLI.
    Thank you very much for your help.

    Best regards,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points