Maven and the JOGL library?

前端 未结 7 1300
鱼传尺愫
鱼传尺愫 2020-12-02 10:18

I\'ve been studying Maven in my free time over the last several days but can\'t seem to figure out how to organize a project so that the JOGL libraries are used. I would pre

7条回答
  •  离开以前
    2020-12-02 10:52

    There is a maven repo for JOGL 2.0 here: http://jogamp.org/deployment/maven/

    I use SBT for building my projects. The resolver you need to add to build.sbt:

    resolvers += MavenRepository("jogamp", "http://jogamp.org/deployment/maven")
    

    And the dependency, e.g., for base jogl library:

    libraryDependencies += "org.jogamp.jogl" % "jogl-all" % "2.0-rc9"
    

    In maven xml files this would be something like (according to this):

     
       
         
           jogamp
           
             true 
           
           
             
               jogamp-remote
               jogamp test mirror
               http://www.jogamp.org/deployment/maven/
               default
             
           
         
       
     
    

    With dependency declared as:

    
      org.jogamp.jogl
      jogl-all
      2.0-rc9
    
    

    To automatically download proper native jar, in sbt I do something like:

    sys.props("os.name") match {
      case "Linux" => "org.jogamp.jogl" % "jogl-all-natives-linux-i586" % "2.0-rc9"
      ... etc. ...
    

提交回复
热议问题