Menu

Problem with Git import into Eclipse

Help
FrogThomas
2013-07-21
2013-07-29
  • FrogThomas

    FrogThomas - 2013-07-21

    Hello!

    I'm having trouble with Git. Since I have never done something like this before, I would appreciate a little help on this. This is what I do:

    • Open Eclipse and switch to the Git Perspective
    • Click on "Clone a Git Repository"
    • Enter URI "git://git.code.sf.net/p/jabref/code" and click Next
    • Select all Branches and click Next
    • Set a Destination Directory, choose "master" as Intial branch, set "origin" as Remote name and check "Import all existing projects after clone finishes" and a final click on finish

    Now it takes about 2 minutes until the task has run through everything. My problem is, that Eclipse shows me 46 errors within different classes. As a result of this I'm not able to compile JabRef using Ant. If I try to, it results in a "build faild" error with a problem on line 204 of build.xml file.

    Please help!

     
    • Oliver Kopp

      Oliver Kopp - 2013-07-21

      Due to the used plugin framework, JabRef generates classes.

      You first have to compile it with ant, then you can compile the
      code in eclipse.

      Simply runnig "ant" should be OK. Running "ant generate" should
      generate the necessary files and then you can compile it within
      eclipse.

      Line 204 has a reference to javac. Are you sure that you have a JDK installed?

      What is the concrete error output?

      Cheers,

      Oliver

      2013/7/21 FrogThomas frogthomas@users.sf.net:

      Hello!

      I'm having trouble with Git. Since I have never done something like this
      before, I would appreciate a little help on this. This is what I do:

      Open Eclipse and switch to the Git Perspective
      Click on "Clone a Git Repository"
      Enter URI "git://git.code.sf.net/p/jabref/code" and click Next
      Select all Branches and click Next
      Set a Destination Directory, choose "master" as Intial branch, set "origin"
      as Remote name and check "Import all existing projects after clone finishes"
      and a final click on finish

      Now it takes about 2 minutes until the task has run through everything. My
      problem is, that Eclipse shows me 46 errors within different classes. As a
      result of this I'm not able to compile JabRef using Ant. If I try to, it
      results in a "build faild" error with a problem on line 204 of build.xml
      file.

      Please help!


      Problem with Git import into Eclipse


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/jabref/discussion/318825/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • FrogThomas

        FrogThomas - 2013-07-22

        Thanks Oliver! Your comment kind of helped.

        If running Ant in Eclipse you have to tell Ant which Java installation it has to use. By default this will be your JRE installation. Changing this to JDK will make the compilation run through.

        How to do this:

        • After importing the JabRef projects (you may use my steps explained above) expand the project called "Jabref" in the Package Explorer
        • Right Click on "build.xml" -> Run As -> Ant Build...
        • Select tab "JRE"
        • Choose "Separate JRE" and select your JDK (not JRE!) installation in the drop-down field
        • Click "Run"

        If the drop down field does not contain a JDK entry click on "Installed JREs..." next to the drop down field. Click on "Add...", select "Standard VM", click "Next", click "Directory..." and choose your JDK installation path (e.g.: 'C:\Program Files\Java\jdk1.7.0_25'). Click "Finish". Now you should be able to select your JDK installation from the drop-down field.

        Please avoid spaces in the path of your Eclipse workspace directory. I had trouble if this was not the case.

        Unfortunately there are 40 errors remaining after doing this. Nevertheless I can execute the resulting JabRef-x.y.z.jar just fine. Attached you find a screenshot of the error list. It would calm me down, if someone could help me solve that problem.

         

        Last edit: FrogThomas 2013-07-22
  • Oliver Kopp

    Oliver Kopp - 2013-07-23

    Seems "ant generate" did not go through. Is it possible to inspect the console output of it? (In case of a PM, plz write me from an email adress, I can respond to :))

     
  • FrogThomas

    FrogThomas - 2013-07-23

    The build.xml in Jabref package shows the following warning to me
    Jabref <taskdef A class needed by class de.hunsicker.jalopy.plugin.ant.AntPlugin cannot be found: org/apache/log4j/Appender

    If I run "Ant Build" I get the following console output:

    Buildfile: C:\workspace\git\JabRef\jabref\build.xml
    generate:
         [java] Jul 23, 2013 1:19:45 PM org.java.plugin.registry.xml.ManifestParser <init>
         [java] INFO: got SAX parser factory - com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl@4a5e88f7
         [java] Jul 23, 2013 1:19:45 PM org.java.plugin.registry.xml.PluginRegistryImpl configure
         [java] INFO: configured, stopOnError=false, isValidating=true
         [java] Creating Classes for net.sf.jabref.core
         [java] Jul 23, 2013 1:19:45 PM org.java.plugin.registry.xml.PluginRegistryImpl register
         [java] INFO: plug-in and fragment descriptors registered - 2
         [java] Jul 23, 2013 1:19:45 PM org.apache.velocity.runtime.log.JdkLogChute log
         [java] INFO: FileResourceLoader : adding path '.'
         [java] Jul 23, 2013 1:19:45 PM org.apache.velocity.runtime.log.JdkLogChute log
         [java] INFO: Velocimacro : added #writeClass(  para ) : source = resources/templates/macro.vm
         [java] Jul 23, 2013 1:19:45 PM org.apache.velocity.runtime.log.JdkLogChute log
         [java] INFO: Velocimacro : added #writeString(  para ) : source = resources/templates/macro.vm
         [java] Jul 23, 2013 1:19:45 PM org.apache.velocity.runtime.log.JdkLogChute log
         [java] INFO: Velocimacro : added #writeBoolean(  para ) : source = resources/templates/macro.vm
         [java] Jul 23, 2013 1:19:45 PM org.apache.velocity.runtime.log.JdkLogChute log
         [java] INFO: Velocimacro : added #writeNumber(  para ) : source = resources/templates/macro.vm
         [java] Jul 23, 2013 1:19:45 PM org.apache.velocity.runtime.log.JdkLogChute log
         [java] INFO: Velocimacro : added #writeFixed(  para ) : source = resources/templates/macro.vm
         [java] Jul 23, 2013 1:19:45 PM org.apache.velocity.runtime.log.JdkLogChute log
         [java] INFO: Velocimacro : added #writeDate(  para ) : source = resources/templates/macro.vm
         [java] Jul 23, 2013 1:19:45 PM org.apache.velocity.runtime.log.JdkLogChute log
         [java] INFO: Velocimacro : added #writeParameter(  para ) : source = resources/templates/macro.vm
         [java] Jul 23, 2013 1:19:45 PM org.apache.velocity.runtime.log.JdkLogChute log
         [java] INFO: Velocimacro : added #writeResource(  para ) : source = resources/templates/macro.vm
         [java] Jul 23, 2013 1:19:45 PM org.apache.velocity.runtime.log.JdkLogChute log
         [java] INFO: Velocimacro : added #writePara(  para ) : source = resources/templates/macro.vm
         [java] Creating Classes for net.sf.jabref.export.misq
         [java]   Code Generator can only generate code for plugins that either have...
         [java]     ...the class attribute set in the plugin or
         [java]     ...the plugin-attribute 'helperClassName' set to the classname to generate
    compile:
        [mkdir] Created dir: C:\workspace\git\JabRef\jabref\build\classes
        [javac] C:\workspace\git\JabRef\jabref\build.xml:204: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
        [javac] Compiling 627 source files to C:\workspace\git\JabRef\jabref\build\classes
        [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
        [javac] C:\workspace\git\JabRef\jabref\src\java\net\sf\jabref\util\ManageKeywordsAction.java:202: warning: [deprecation] getSelectedValues() in JList has been deprecated
        [javac]                 Object[] values = keywordList.getSelectedValues();
        [javac]                                              ^
        [javac] C:\workspace\git\JabRef\jabref\src\java\net\sf\jabref\gui\MainTable.java:659: warning: [deprecation] TableComparatorChooser(JTable,SortedList<E>,Object) in TableComparatorChooser has been deprecated
        [javac]             super(table, list, sortingStrategy);
        [javac]             ^
        [javac]   where E is a type-variable:
        [javac]     E extends Object declared in class TableComparatorChooser
        [javac] C:\workspace\git\JabRef\jabref\src\java\net\sf\jabref\gui\CleanUpAction.java:139: warning: [deprecation] setDefaultDialogBorder() in PanelBuilder has been deprecated
        [javac]         builder.setDefaultDialogBorder();
        [javac]                ^
        [javac] C:\workspace\git\JabRef\jabref\src\java\net\sf\jabref\AppearancePrefsTab.java:68: warning: [deprecation] setLeadingColumnOffset(int) in DefaultFormBuilder has been deprecated
        [javac]         builder.setLeadingColumnOffset(2);
        [javac]                ^
        [javac] C:\workspace\git\JabRef\jabref\src\java\net\sf\jabref\KeyBindingsDialog.java:202: warning: [deprecation] getSelectedValues() in JList has been deprecated
        [javac]         Object[] selected = list.getSelectedValues();
        [javac]                                 ^
        [javac] C:\workspace\git\JabRef\jabref\src\java\net\sf\jabref\external\DroppedFileHandler.java:90: warning: [deprecation] setDefaultDialogBorder() in PanelBuilder has been deprecated
        [javac]         builder.setDefaultDialogBorder();
        [javac]                ^
        [javac] C:\workspace\git\JabRef\jabref\src\java\net\sf\jabref\groups\GroupDialog.java:196: warning: [deprecation] setDefaultDialogBorder() in PanelBuilder has been deprecated
        [javac]                 builderAll.setDefaultDialogBorder();
        [javac]                           ^
        [javac] C:\workspace\git\JabRef\jabref\src\java\net\sf\jabref\util\XMPUtil.java:226: warning: [deprecation] keyList() in COSDictionary has been deprecated
        [javac]         Iterator it = dict.keyList().iterator();
        [javac]                           ^
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 9 warnings
        [javac] Creating empty C:\workspace\git\JabRef\jabref\build\classes\net\sf\jabref\imports\fetcher\package-info.class
        [javac] Creating empty C:\workspace\git\JabRef\jabref\build\classes\org\xnap\commons\gui\shortcut\package-info.class
        [javac] C:\workspace\git\JabRef\jabref\build.xml:210: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
        [javac] Compiling 1 source file to C:\workspace\git\JabRef\jabref\build\classes
        [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
        [javac] 1 warning
    buildinfos:
         [echo] build number = 0
    build:
        [mkdir] Created dir: C:\workspace\git\JabRef\jabref\build\resource
         [copy] Copying 192 files to C:\workspace\git\JabRef\jabref\build\resource
        [mkdir] Created dir: C:\workspace\git\JabRef\jabref\build\images
         [copy] Copying 110 files to C:\workspace\git\JabRef\jabref\build\images
        [mkdir] Created dir: C:\workspace\git\JabRef\jabref\build\help
         [copy] Copying 220 files to C:\workspace\git\JabRef\jabref\build\help
    unjarlib:
        [mkdir] Created dir: C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\antlr-3.4-complete.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\antlr.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\fontbox-1.7.1.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\glazedlists-1.8.0_java15.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\jayatana-1.2.4.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\jempbox-1.7.1.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\jgoodies-common-1.4.0.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\jgoodies-forms-1.6.0.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\jgoodies-looks-2.5.2.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\microba.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\mysql-connector-java-5.0.7-bin.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\pdfbox-1.7.1.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\plugin\JPFCodeGenerator-rt.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\plugin\commons-logging.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\plugin\jpf-boot.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\plugin\jpf.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\postgresql-9.2-1002.jdbc4.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\spin.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\spl\jersey\jersey-client-1.14.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\spl\jersey\jersey-core-1.14.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\spl\jersey\jersey-multipart-1.14.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\spl\jersey\mimepull-1.3.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\spl\sciplore\mrDlib-serialization-api.jar into C:\workspace\git\JabRef\jabref\build\tmp
        [unjar] Expanding: C:\workspace\git\JabRef\jabref\lib\spl\sciplore\xstream-1.4.1.jar into C:\workspace\git\JabRef\jabref\build\tmp
         [move] Moving 1 file to C:\workspace\git\JabRef\jabref\build\tmp
    jars:
        [mkdir] Created dir: C:\workspace\git\JabRef\jabref\build\lib
          [jar] Building jar: C:\workspace\git\JabRef\jabref\build\lib\JabRef-2.10dev.jar
    BUILD SUCCESSFUL
    Total time: 45 seconds
    
     
    • FrogThomas

      FrogThomas - 2013-07-26

      Is there anyone who can help me with all my errors and problems I am having when compiling JabRef in eclipse? I'm still at the same point

       
  • Oliver Kopp

    Oliver Kopp - 2013-07-26

    Did you reload the project in eclipse? Is "_JabRefPlugin.java" existing on the filesystem somewhere?

     
  • FrogThomas

    FrogThomas - 2013-07-27

    I just started Eclipse with C:\workspace as my path for the workspace. Since the folder did not exist Eclipse build up a complete new and clean workspace.

    As explained above I cloned the Git Repository and activated Import all existing projects after clone finishes. At this point I could not find a file called _JabRefPlugin.java within my workspace.

    Now I had Ant run on the build.xml wich can be found within the package Jabref. I still get the same console output and errors as pointed out above. After compiling I can find the _JabRefPlugin.java file. It has the file path C:\workspace\git\jabref\jabref\src\java\net\sf\jabref\plugin\core\generated

     
  • Oliver Kopp

    Oliver Kopp - 2013-07-27

    Does the file show up in Eclipse? Try ctrl+alt+r. If not, then the workspace of Eclipse is not refreshed and you have to select the JabRef project and push F5. If it is found, try "Project/Clean..." to have Eclipse recompile everything. Maybe that helps...

     
    • FrogThomas

      FrogThomas - 2013-07-29

      This did the trick! I actually could not find the _JabRefPlugin.java within the Eclipse Package Explorer. But a Project/Clean... helped a lot.

      Now there are only 2 Errors left. I think they are no problem, since they occur in the JPFCodeGenerator package.

       
MongoDB Logo MongoDB