Skip to content

How To Build

Xyrio edited this page Feb 16, 2019 · 15 revisions
Table of Contents

Overview

for the console build you can just download maven and compile from console and use whatever ide you like.

or you can use eclipse to run it directly from eclipse and also build using eclipse PDE system (graphical) but also using maven in eclipse which is already integrated as a plugin in eclipse-ee.

we skip running all tests for now as some fail because they need to be improved to work without external websites (which changed) and a failure would stop the build process.

Get Java

  1. download latest jdk 8 like from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Get RSSOwlnix Source

  1. download source code from https://github.com/Xyrio/RSSOwlnix using git (zip will not work when using maven as the gitrepository is used by maven tycho to create the qualifier date)
  2. if you intend to use eclipse make sure you have another dirtyable parent folder for the eclipse workspace like: C:\rssowlnixprj\RSSOwlnix\README.md

Note for MacOS

  1. note: for macos binaries you might need to remove extended attributes: xattr -c RSSOwlnix.app ( https://github.com/Xyrio/RSSOwlnix/issues/4 )

Console (very easy)

build from console using maven then run standalone

  1. download maven binaries: https://maven.apache.org/download.cgi
  2. add maven's bin folder to your path or use absolute path to mvn
  3. you must set JAVA_HOME environment variable to point to your JDK root folder like C:\Program Files\Java\jdk1.8.0_161
  4. open console in RSSOwlnix root folder
  5. compile with: mvn clean verify -Dmaven.test.skip=true
  6. you can build only for certain operating systems if you edit releng\configuration\pom.xml environments xml tag
  7. binaries can be found inside releng\product\target\products
  8. p2 repository for updating is at releng\product\target\repsitory

Eclipse

in eclipse you have 2 ways to build, using maven or with eclipse's PDE build system.

Eclipse Preparations

  1. download latest Eclipse IDE for Java EE Developers: https://www.eclipse.org/downloads/eclipse-packages/
  2. start eclipse and use C:\rssowlnixprj\ as your workspace folder.

Eclipse Configuration

menu: Window | Preferences | Java | Installed JREs

  1. remove the entry (jre...)
  2. click add...
  3. Standard VM
  4. set JRE home to like: C:\Program Files\Java\jdk1.8.0_161
  5. check jdk
  6. Apply and Close

Adding source code to Eclipse

  1. menu: File | Import... | General | Existing Project Into Workspace...
  2. directory: C:\rssowlnixprj\RSSOwlnix\
  3. check Search for nested projects
  4. finish with all checked

Maven in Eclipse (easy)

  1. first time setup: in file tree on the left open RSSOwlnix folder and right click pom.xml then Run As | Maven build...
  2. Goals: clean verify -Dmaven.test.skip=true
  3. Apply then Run
  4. to build again click the downward triangle right of the biggest green play icon then RSSOwlnix.
  5. you can build only for certain operating systems if you edit releng\configuration\pom.xml environments xml tag
  6. binaries can be found inside releng\product\target\products
  7. p2 repository is at releng\product\target\repsitory

Eclipse PDE build system (not so easy)

Eclipse Target Platform

  1. open releng\target_platform\target_platform.target (every time you show the target_platform like this it will do a refresh of the view, showing you the selected dependencies)
  2. at top right, click to set as active target platform (only visible if not already active platform)
  3. click reload target platform (or changes to the dependencies will not be available sometimes. they are cached somewhere)
  4. close the target platform window

Eclipse Exporting Product

  1. open releng\product_manual_export\rssowlnix.product
  2. at top right click on the icon for Export an Eclipse Product
    • Root directory: RSSOwlnix
    • Synchronize before exporting: off
    • Directory:
    • Generate p2 repository: on (repository cannot be used to update RSSOwlnix itself when exported like this but is needed for RSSOwlnix to be built correctly)
    • Export for multiple platforms: check this for an aditional step (Next button enables) ...
    • Allow for binary cycles in target platform: on
    • click Finish (or Next if you enabled export for multiple platforms)
      • note: a exported version like this is not updateable, you have to export again. addons and translations can be installed.

Run Program from Eclipse

note: p2 updating does not work when started like this.

  1. menu: Window | Show Window | Other | General | Problems open
    • you can ignore the following kind of errors when launching:
      • ignorable errors: if they are in org.rssowl.lib.httpclient.p2 (Resource column)
      • ignorable error: The value for attribute 'name' is not externalized. in org.rssowl.ui\plugin.xml
  2. right click org.rssowl.ui\Launch RSSOwl.launch then Run As | Launch RSSOwl
  3. Errors Exist in Required Project if only ignorable errors click Proceed
  4. Do you really want to clear log file? Clear unless you want to keep error messages from a previous launch.

Common errors

  • Cannot locate JRE definition: jdk1.8.0_151. Launch aborted. (or some other version)
    • fast way: double click Launch RSSOwl.launch to open it as text. search for the wrong JRE definition and replace it with the right one (that you configured before, see Configuring Eclipse) like jdk1.8.0_161
    • slow way: menu: Run | Run Configuration... then select Eclipse Application | Launch RSSOwl under tab Main for Runtime JRE select the JDK you want to use.

Run Tests from Eclipse

  1. menu: Help | Install New Software...
  2. choose the url that is for updates like: http://download.eclipse.org/eclipse/updates/4.7
  3. install plugin in eclipse Eclipse Test Framework to be able to run tests direclty from eclipse

Run all Tests from Eclipse

  1. close any running RSSOwl/RSSOwlnix instance or some tests may not work.
  2. right click the test file org.rssowl.core.tests\Launch RSSOwl Tests.launch then Run As | Launch RSSOwl Tests
    • under tab Main have the following set
      • Run an application: [No Application] - Headless Mode

Run one Test from Eclipse

  1. note: for some tests to run you may have to close any running RSSOwl or RSSOwlnix instance, event outside of eclipse.
  2. find the test you want to run in org.rssowl.core.tests\src
  3. right click the test file: Run As | JUnit Plug-in Test

RSSOwlnix Project Structure

  • feature: eclipse feature project, used to collect everything into one, makes updating easier. project doesnt contain code.
  • plugin: eclipse plugins are the projects with code or ressources.
  • org.rssowl.lib.* are plugin projects to make normal jars usable within eclipse rcp (osgi compatible).
Folder Description
bundles eclipse plugins (maven)
features eclipse features (maven)
org.rssowl.core core code with some dependencies on eclipse
org.rssowl.core.tests core tests with dependencies on eclipse
org.rssowl.docs old docs, plans and overviews. some may still be useful.
org.rssowl.feature collects stuff from this project
org.rssowl.feature.dependencies collects external dependencies
org.rssowl.feature.dependencies.updater collects external dependencies for the updater
org.rssowl.feature.eclipse collects stuff for installing as a plugin into eclipse official program (not tried yet after 2.2.1)
org.rssowl.feature.tests automated junit tests
org.rssowl.lib.db4o lib for the object database named db4o
org.rssowl.lib.httpclient lib for http* connections
org.rssowl.lib.httpclient.p2 helper project to easyly download httpclient jars from maven repository and make them osgi compatible. they are then manually moved over to the other httpclient project.
org.rssowl.lib.jdom lib for understanding xml files
org.rssowl.lib.lucene lib for searching
org.rssowl.ui gui code for the program
releng release engeneering (maven)
releng/configuration configuration, has list of target operating systems to build for (maven)
releng/product product file (maven)
releng/product_manual_export product file for manual exporting (eclipse way)
releng/target_platform defines which external dependencies to download (eclipse way) (also used by maven tycho)
releng/update generates a repository for program updates (maven)
RSSOwlnix root (maven)

Build Addons

Build Addons with Eclipse

  1. Get Java
  2. Eclipse Preparations
  3. Eclipse Configuration
  4. download source from https://github.com/Xyrio/RSSOwlnix-plugins-addons
  5. put into eclipse workspace: C:\rssowlnixprj\RSSOwlnix-plugins-addons\README.md
  6. Adding source code to Eclipse
  7. open a feature project and double click feature.xml to open
  8. click the icon at top right for "Export a deployable feature"
  9. check one or more features
    • Directory: the output directory for the p2 repository
    • tab Options:
      • on = Package as individual JAR archives
      • on = Generate p2 repository
      • on = Allow for binary cycles in target platform
      • rest off
  10. you can use a file system urls like: file:/C:\folder to update - https://github.com/Xyrio/RSSOwlnix/wiki/How-To-Install-Addons-or-Translations

Build Addons with Console

(Maven Tycho)

  1. no configuration created yet.

Build Translations

Build Translations with Eclipse

  1. Get Java
  2. Eclipse Preparations
  3. Eclipse Configuration
  4. download source from https://github.com/Xyrio/RSSOwlnix-plugins-translation
  5. put into eclipse workspace: C:\rssowlnixprj\RSSOwlnix-plugins-translation\README.md
  6. Adding source code to Eclipse
  7. open a feature project and double click feature.xml to open
  8. click the icon at top right for "Export a deployable feature"
  9. check one or more features
    • Directory: the output directory for the p2 repository
    • tab Options:
      • on = Package as individual JAR archives
      • on = Generate p2 repository
      • on = Allow for binary cycles in target platform
      • rest off
  10. you can use a file system urls like: file:/C:\folder to update - https://github.com/Xyrio/RSSOwlnix/wiki/How-To-Install-Addons-or-Translations

Build Translations with Console

(Maven Tycho)

  1. no configuration created yet.