archive-org.com » ORG » F » FREEHEP.ORG

Total: 883

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • freehep - FreeHEP NAR Plugin
    your JNI library with name artifactId version This goals only executed if you produce a JNI library and you specify a packageName as subtag of library The NarSystem class will then end up in this package nar unpack Since a nar file is of no use to any native compilation process the nar unpack goal unpacks the nar into the nar subdirectory of the local repository A flag is set not to download and unpack this nar file again except if it is a SNAPSHOT artifact TBD The actual nar file is deleted to preserve diskspace nar resources This is an optional goal It will take any resources in src nar resources and copy them into specific areas under target nar Resources may include pre compiled linked libraries and other shareable items This goal can be used to create a nar library from a distribution that comes with compiled shareable libraries nar javah This goal will run the javah tool on any class file in the javah classDirectory directory that has native methods in it The actual class files are inspected rather than their sources The javah tool is picked up from the java installation and is run with a classpath of the javah classDirectory and all depencies classpaths unless you specify a list in javah classPaths You can also set a boot classpath using javah bootClassPaths This goal has no effect if there are no java sources or if none of the java classes contain a native method nar compile This goal will compile the native source code c c or fortran and archive it into a shared library You can also produce a jni or a static library by setting library type To handle the variety of compilers and linkers the NAR plugin uses the cpptasks from the ant contrib project with some minor improvements and additions of compilers see cpptasks Most of the settings for cpptasks such as compiler linker options and include dirs are available through the NAR plugin see configuration The NAR plugin searches the directory structure under COMPILER sourceDirectory which defaults to src main The standard way to separate your sources for different languages would be src main c src main c and src main fortran but any file under src main is searched for The nar plugin will automatically select the correct compiler c c or fortran based on the type of source as specified in the patterns in AOL c includes AOL cpp includes and AOL fortran includes where AOL is a dotted qualifier of the architecture os and linker x86 Windows msvc for example Include paths are added in this order from any directories set in COMPILER includePaths where COMPILER is c cpp or fortran the javah jniDirectory only if java include is true or if javah jniDirectory exists we add one of the following relative to the java home directory java includePaths if set otherwise the AOL java include property from the AOL properties the header files of any of

    Original URL path: http://java.freehep.org/freehep-nar-plugin/intro.html (2016-02-10)
    Open archived version from archive


  • freehep - FreeHEP NAR Plugin
    Architecture OS Linker qualifier for example ppc MacOSX g The type specifies what binding the library is for example shared static or jni Since the java compiler has a unified interface there is no need for any naming conventions here Native compilers and linkers on different platforms tend to have radically different interfaces command line options so these were unified allowing the user to switch on exception handling and debugging with the same tag in the configuration no matter which platform the NAR Plugin is running on An example is below plugin groupId org freehep groupId artifactId freehep nar plugin artifactId configuration cpp exceptions false exceptions debug true debug cpp configuration plugin Reuse of build logic The NAR Plugin provides multiple goals organized in the nar lifecycle The nar lifecycle integrates nicely with the default jar lifecycle to build both jar and nar artifacts in parallel Each of the NAR Plugin goals can of course also be configured separately if needed Most NAR goals are executed using the NarManager which provides an API that can also be used by other plugins when they need to deal with NAR artifacts Declarative execution All logic in Maven is setup in a declarative fashion using the Project Object Model POM The NAR Plugin can be configured inside this model Moreover the nar lifecycle can be used to automatically integrate all the NAR Plugin goals with the goals of the default jar lifecycle NAR s project object model POM The POM below is an example of how to compile link and test a native shared library which depends on a native math library nmath project modelVersion 4 0 0 modelVersion groupId com mycompany app groupId artifactId my app artifactId packaging nar packaging version 1 0 SNAPSHOT version build plugins plugin groupId org freehep groupId artifactId freehep nar plugin artifactId version nar version number version extensions true extensions plugin plugins build dependencies dependency groupId org freehep groupId artifactId nmath artifactId version 4 5 1 version dependency dependencies project This POM will allow you to compile link and test the java and native code in the project The crucial part of the POM is the inclusion of the NAR plugin as an extension and the declaration of the nar packaging The two will call the NAR Plugin goals as specified in the lifecycle For this POM the NAR Plugin will download and unpack the noarch and aol parts of the org freehep nmath library version 4 5 1 for the platform you are running on Maven s Super POM is used for most of the default behaviour and the NAR Plugin s AOL Properties are used for native defaults NAR s build lifecycle Maven s default build lifecycle jar allows one to execute plugin goals as part of it but this necessitates declaration of separate goals in each POM To simplify the building of native artifacts we chose to define a nar lifecycle which calls all the goals the jar lifecycle has interleaved with the goals

    Original URL path: http://java.freehep.org/freehep-nar-plugin/philosophy.html (2016-02-10)
    Open archived version from archive

  • freehep - Plugin documentation
    files freehep nar nar compile Compiles native source files freehep nar nar download Downloads any dependent NAR files This includes the noarch and aol type NAR files freehep nar nar integration test Run integration tests using Surefire This goal was copied from Maven s surefire plugin to accomodate a few things for the NAR plugin 1 To test a jar file with its native module we can only run after the package phase so we use the integration test phase 2 We need to set java library path to an AOL architecture os linker specific value but AOL is only known in the NAR plugin and thus cannot be set from the pom 3 To have the java library path definition picked up by java we need the pertest forkmode To use this goal you need to put the test sources in the regular test directories but disable the running of the tests by the maven surefire plugin freehep nar nar javah Compiles class files into c c headers using javah Any class file that contains methods that were declared native will be run through javah freehep nar nar package Jars up the NAR files freehep nar nar resources Copies

    Original URL path: http://java.freehep.org/freehep-nar-plugin/plugin-info.html (2016-02-10)
    Open archived version from archive

  • freehep - FreeHEP NAR Plugin
    library type jni type packageName com mycompany mypackage packageName library libraries configuration plugin plugins build project Create a JNI Library without linking to C It is possible to write your JNI code in C use the C compiler to compile it and then link it only with the C library as long as you have not used any C library calls Note the two tags to disable exceptions and not link with C project packaging nar packaging build plugins plugin groupId org freehep groupId artifactId freehep nar plugin artifactId extensions true extensions configuration cpp exceptions false exceptions cpp libraries library type jni type linkCPP false linkCPP library libraries configuration plugin plugins build project Create a JNI Library using SWIG generated code Since SWIG already generated the h file normally generated by javah we exclude this file from javah We also include the compilation and linking with java The example also shows how to configure the freehep swig plugin project packaging nar packaging build plugins plugin groupId org freehep groupId artifactId freehep swig plugin artifactId extensions true extensions executions execution id swig id goals goal generate goal goals configuration cpp true cpp packageName org domain packagename packageName source Module swg source configuration execution executions plugin plugin groupId org freehep groupId artifactId freehep nar plugin artifactId configuration java include true include java javah excludes exclude ModuleJNI class exclude excludes javah libraries library type jni type library libraries configuration plugin plugins build project Assemble libraries made on different platforms for distribution This example shows how to download unpack and assemble the already deployed machine dependent libraries It also shows the setup of the standard maven assembly plugin to pick up the unpacked libraries Note there is no nar packaging as the normal packaging for assemblies would be pom project packaging pom packaging build

    Original URL path: http://java.freehep.org/freehep-nar-plugin/usage.html (2016-02-10)
    Open archived version from archive

  • freehep - FreeHEP NAR Plugin
    the default Maven lifecycle and adds native goals to its phases The table below shows the different phases of the NAR Lifecycle and the goals including standard maven goals attached to them The order is left to right top to bottom Phase Goals NAR Goals in bold generate sources nar download nar system generate process sources nar unpack process resources resources nar resources compile compile nar javah process classes nar

    Original URL path: http://java.freehep.org/freehep-nar-plugin/lifecycle.html (2016-02-10)
    Open archived version from archive

  • freehep - FreeHEP NAR Plugin
    relative to resourceDirectory Defaults to include resourceLibDir Directory with libraries relative to resourceDirectory Defaults to lib maxCores Specifies the maximum number or Cores CPUs to use for compilation If set to 0 it will use all the Cores CPUs available targetDirectory Directory for all NAR related output Defaults to project build directory nar for compile goal Defaults to project build directory test nar for compile test goal output Name of the output Default is project artifactId project version failOnError Fail on compilation linking error Default is true runtime Sets the type of runtime library possible values dynamic static Default is dynamic libtool Set use of libtool If set to true the libtool will be prepended to the command line for compatible compilers linkers Default is false libraries Section to specify what type or libraries to create For each library you may specify type The type of the library shared static jni plugin executable Default is shared linkCPP Specifies if the stdc library should be linked with Default is true linkFortran Specifies if the fortran library should be linked with Default is false narSystemPackage If specified a NarSystem class will be generated in this package and added to the main jar artifact The NarSystem class contains the following methods loadLibrary which will load the artifact version JNI library narSystemName Specifies the NarSystem class Defaults to NarSystem narSystemDirectory Specifies the NarSystem source directory Defaults to target nar nar generated run If true will run this executable only if type is executable args List of arguments to be provided to executable tests Section to specify which test executables should be created For each test you may specify name Name of the executable link Type of linking to be used shared or static Default is shared run If true will run this test args List of arguments to be provided to test linker Section to specify parameters for the linker linker name The Linker Some choices are msvc g CC icpc Default is Architecture OS specific linker incremental Enables incremental linking Default is false linker map Enables the production of a map file Default is false linker options Additional options for the linker Defaults to AOL specific values linker clearDefaultOptions Clear options specified in AOL properties linker libs Adds libraries to the linker For each lib you have to specify name Name of the library or a dependency groupId artifactId if this library contains sublibraries type Type of linking for this library Default is shared directory Location for this library linker sysLibs Adds system libraries to the linker For each syslib you have to specify name Name of the system library type Type of linking for this system library Default is shared cpp Section to specify parameters for the c compiler cpp name The name of the compiler Some choices are msvc g gcc CC cc icc icpc Default is AOL specific cpp sourceDirectory Source directory for native files cpp includes Include patterns for sources relative to sourceDirectory in ant style cpp excludes Exclude

    Original URL path: http://java.freehep.org/freehep-nar-plugin/configuration.html (2016-02-10)
    Open archived version from archive

  • freehep - FreeHEP NAR Plugin
    attached noarch nar artifact Could these two not be combined The jar artifact contains only java classes and gets added to the classpath It needs no further processing The noarch nar artifact contains include files and needs to be unpacked to be useful for the native compilers It does not need to be added to the classpath Combining the two artifacts would complicate matters I use the nar plugin to

    Original URL path: http://java.freehep.org/freehep-nar-plugin/faq.html (2016-02-10)
    Open archived version from archive

  • freehep - FreeHEP NAR Plugin
    shared extension so i386 Linux icc plugin extension so i386 Linux icc jni extension so i386 Linux icc executable extension Linux icpc C linker i386 Linux icpc cpp compiler icpc i386 Linux icpc cpp defines Linux i386 Linux icpc cpp options ansi mp no gcc w1 i386 Linux icpc cpp includes cc cpp cxx i386 Linux icpc cpp excludes i386 Linux icpc c compiler icc i386 Linux icpc c defines Linux i386 Linux icpc c options ansi mp no gcc w1 i386 Linux icpc c includes c i386 Linux icpc c excludes i386 Linux icpc fortran compiler ifort i386 Linux icpc fortran defines Linux i386 Linux icpc fortran options i386 Linux icpc fortran includes f for i386 Linux icpc fortran excludes i386 Linux icpc java include include include linux i386 Linux icpc java runtimeDirectory jre lib i386 client i386 Linux icpc lib prefix lib i386 Linux icpc static extension a i386 Linux icpc shared extension so i386 Linux icpc plugin extension so i386 Linux icpc jni extension so i386 Linux icpc executable extension Linux ecc C linker i386 Linux ecc cpp compiler NONE i386 Linux ecc cpp defines Linux i386 Linux ecc cpp options ansi mp no gcc w1 i386 Linux ecc cpp includes cc cpp cxx i386 Linux ecc cpp excludes i386 Linux ecc c compiler ecc i386 Linux ecc c defines Linux i386 Linux ecc c options ansi mp no gcc w1 i386 Linux ecc c includes c i386 Linux ecc c excludes Should this be efc i386 Linux ecc fortran compiler ifort i386 Linux ecc fortran defines Linux i386 Linux ecc fortran options i386 Linux ecc fortran includes f for i386 Linux ecc fortran excludes i386 Linux ecc java include include include linux i386 Linux ecc java runtimeDirectory jre lib i386 client i386 Linux ecc lib prefix lib i386 Linux ecc static extension a i386 Linux ecc shared extension so i386 Linux ecc plugin extension so i386 Linux ecc jni extension so i386 Linux ecc executable extension Linux ecpc C linker i386 Linux ecpc cpp compiler ecpc i386 Linux icpc cpp defines Linux i386 Linux ecpc cpp options ansi mp no gcc w1 i386 Linux ecpc cpp includes cc cpp cxx i386 Linux ecpc cpp excludes i386 Linux ecpc c compiler ecc i386 Linux ecpc c defines Linux i386 Linux ecpc c options ansi mp no gcc w1 i386 Linux ecpc c includes c i386 Linux ecpc c excludes Should this be efc i386 Linux ecpc fortran compiler ifort i386 Linux ecpc fortran defines Linux i386 Linux ecpc fortran options i386 Linux ecpc fortran includes f for i386 Linux ecpc fortran excludes i386 Linux ecpc java include include include linux i386 Linux ecpc java runtimeDirectory jre lib i386 client i386 Linux ecpc lib prefix lib i386 Linux ecpc static extension a i386 Linux ecpc shared extension so i386 Linux ecpc plugin extension so i386 Linux ecpc jni extension so i386 Linux ecpc executable extension Linux amd64 Linux linker g amd64 Linux g cpp compiler g amd64 Linux

    Original URL path: http://java.freehep.org/freehep-nar-plugin/aol.html (2016-02-10)
    Open archived version from archive



  •