Changes between Version 1 and Version 2 of UseCases

12/15/12 22:35:10 (7 years ago)



  • UseCases

    v1 v2  
    2828'''Advanced:''' new/alternative default repositories can be added in !hmibuild/ivy/ivysettings.xml 
     31== Advanced == 
     33=== Running and compiling against source code === 
     34It is possible (but not recommended) to run and compile your project against the source of other projects. To this end, define the projects source dependencies using rebuild.list: 
     38rebuild.list=Hmi/HmiUtil, Hmi/HmiMath, Hmi/HmiAnimation, Hmi/HmiNeurophysics, Hmi/HmiRenderEnvironment, Hmi/HmiAnimationEmbodiments 
     41* `ant resolve` to collect all dependent released and external libraries in the `lib` directory 
     42* `ant compilelist` to compile dependent modules  
     43* `ant main` to set the class that is to be run 
     44* `ant run` to compile and run the project 
     47=== Fixing java.lang.!OutOfMemoryError: !PermGen space === 
     48For large (re)builds, especially of !HmiDemo projects with lots of 
     49dependencies, the default ant settings do not suffice, and ant might 
     50crash because of memory problems; typically  
     52java.lang.OutOfMemoryError: PermGen space 
     54This error can be fixed by explicitly setting the permgensize in the ANT_OPTS environment variable. In linux this is done using: 
     56export ANT_OPTS="-XX:MaxPermSize=1024M" 
     58in e.g. ~/.bashrc. In windows,ant calls the antrc_pre.bat file (if it exists) before running ant, so the environment variable can be set there using: 
     60set ANT_OPTS=-XX:MaxPermSize=1024M 
     62ant_rc.bat should be placed in  your HOME directory. 
     65=== Using a local repository === 
     66By default, the Hmi, Asap and external libraries are checked out from the https server and it is strongly advised that you resolve them from there. 
     67However, if you (temporarily, e.g. at a conference) don't have an internet connection, you can set up the build system to check out from a local directory (here: d:/hmirepo). This is done as follows: 
     70Create a file in your home directory and add: 
     77Copy the hmirepository to your directory of choice. Rsync can be used to create incremental copies: 
     79rsync -v -a --delete . 
     83=== Compiling to/as a different Java version === 
     86javac.version=1.6 (both source and target are 1.6) 
     89{{{  (source may e.g. be Java 1.7, target is 1.6 class code) 
     93=== Releasing external jar files === 
     94hmibuild/publishexternal/ is a python script to release external jar files into e.g. hmirepo. This script will create the ivy xml file, setup up the correct directory structure in the repository and copy over a specified jar. The script assumes that a private key for the server is available in ~/.ssh/id_rsa. Windows users will need to install the winrandom and Crypto packages for Python, in linux (at least on the new techfak netboot machines in Bielefeld) it just works. Run the script as follows: 
     96python ./ -v 1.1 -o myorganization -m mymodule --host mymodule-1.1.jar 
     100=== Releasing your project on a repository === 
     101To create a release of your project on the soa, asap or hmi repository: 
     103ant release 
     105This requires that you specify the repository in the file, e.g.: 
     110Of course you'll also need to have write access to the repository. The following repositories are available by default: 
     112asap.sftp.publish: the asap code ssh repository (web version located at 
     113asap.resource.sftp.publish: the asap resource ssh repository (web version located at 
     114soa.core.repository: the soashared repository, a git repository assumed to be located in your <gitroot>/soashared directory. Send a pull request to Herwin add your local changes into the shared git repository. 
     115hmicore.sftp.publish: the hmi code ssh repository (web version located at 
     116resource.sftp.publish: the resource hmi repository (web version located at 
     119{{{ant release}}} increments the minor version number, then produces a version with "release" status. When the current version happens to be a 
     120developer version, then "incrementing the minor" actually means "stripping off" the -devi suffix. 
     122To increment the major release number use 
     124ant majorrelease 
     127==== Releasing data as a zip file ==== 
     128To release a project containing only data as a zip file, set the following in ivy.xml: 
     131     <artifact type="zip" ext="zip"/> 
     139This will zip up everything in your resource dir and release it when you use one of the release targets (e.g. release, majorrelease). When resolving such a released dataset, it will be unpacked in the lib directory. Such resource project should contain a single top-level directory and no other files in resource to keep the lib dir somewhat clean and readable (this is somewhat enforced by the resolver). 
     141==== Releasing under a different user name ==== 
     142If you need to release under a different name than your username (e.g. at home), use 
     146in your ~/ file.