This is fork of Java Path Finder project (which is one-to-one mirrored here).
Main reasons/motivation:
- desire to contribute in some OS project
- experiment with new language features/libraries
- maybe contribute some changes to original JPF.
Currently:
- setup of Travis CI build was configured
- develop branch was created
- coverity-scan branch was created and coverity static analysis scan was attached (see branch coverity-scan to see results)
- coveralls.io was configured, coverage result are reported on badge
- gradle is almost done, need to finalize work
- documentation was modified, so now its fully navigable from github, click here
- merged latest Peter changes from babelfish repo (up to 25. commit, from 22 april 15)
- (in progress) preparing example maven/distribution repo on bintray as POC for gradle build
#Gradle project layout It was difficult to balance between old layout, which is required by program way of work (directory layout, files location etc.). Main change is project modularization, which reflects present of multiple source directories in ant structure. I have temporarily removed some IDE-related directories (netbeans and eclipse) to keep basic layout simpler, need to consider in which form restore them.
In project Gradle wrapper in version 3.1 is used. You do not need to install it by yourself, Gradle will be install via wrapper.
To check which tasks are accessible type './gradlew tasks' in root project directory (where 'build.gradle' and 'setting.gradle' are placed).
To build project type ./gradlew build
or ./gradlew clean build
, it will:
- clean (in case when this target was called)
- compile each module, examples and tests
- make jars necessary to properly run tests
- test project with coverage (reports are located in build/reports)
- make distribution packages (tar and zip) placed in build/
Distribution packages are identical as ant-make dist package.
This is main goal of gradle-switch. After typing gradle install
each of submodule will be deployed in local maven repository and accessible from it.
In other words, if you have some maven/gradle/other project managed by any dependency management system, you can refer to this modules by:
GroupId:artifactId:version
(actual format depends on build system)
Group id is :
gov.nas.jpf.jpf-core
artifacts id's are :
annotations
classes
main
peers
Current version is set to 0.1
.
So, if you want to use annotations module, here is maven example:
<dependency>
<groupId>gov.nasa.jpf.jpf-core</groupId>
<artifactId>annotations</artifactId>
<version>0.1</version>
</dependency>
In future probably release artifacts will be deployed on public maven repo (or something similar), so in order to write extension/software depending on jpf, there will be no reason to download and build jpf manually (well, except that run it, of course).
Prerequisites
- Gradle eclipse plugin : http://marketplace.eclipse.org/content/gradle-integration-eclipse-44
- EGit : http://eclipse.org/egit/
At first, you need a local copy of this repo, which can be obtained :
- from command line :
git clone https://github.com/grzesuav/gjpf-core.git
- import using eclipse wizard
Importing using eclipse import wizard:
- select
File -> Import -> Git -> Project from Git
and click next - select
Create from uri
and click next - paste into
URI
:https://github.com/grzesuav/gjpf-core.git
and click next - select at least
develop
branch and click next - select desired location and click next
- wait until repository will be cloned and don't import any project, quit wizard
Importing Gradle project to eclipse using Gradle import wizard
:
- select
File -> Import -> Gradle -> Gradle Project
and click next - point to location where repository was cloned (also include
gjpf-core
directory) and clickBuild Model
- select all project visible in tree and click finish (leave all options as is)
- wait until project will be imported (could take a while)
- unfortunately, default eclipse output folder (for compiled classes and other resources) is $PROJECT_DIR/bin, which conflicts with jpf project layout. To change it, for every project (besides root
gjpf-core
) do the following : Right click on project name, selectProperties -> Java Build Path
, go intoSource
tab, and on the bottom there isDefault output folder
. Change it to $PROJECT_DIR/build. - for root project
gjpf-core
eclipse project layout must be changed to fit jpf structure. To do it, right click on project name, selectProperties -> Java Build Path
, go intoSource
tab, and on the bottom there isDefault output folder
. AsDefault output folder
setbuild/default
. Next select checkboxAllow output folders for source folders
and for source folders above changeOutput folder
(expand each source folder to see this) tobuild/examples
andbuild/tests
respectively. - problem regarding non-existing test dependency (
RunJPF.jar
) will be resolved by building this jar, to do this, right click on projectgjpf-core
and selectGradle -> Tasks Quick Launcher
and typetest
. It will build all required jars ad run tests.
- discuss with jpf developers project layout/get some feedback
- put info about importing project to eclipse (and ask what IDEs developers are using)