OSProjectsEvaluation

Revision as of 15:21, 5 November 2009 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

Various O/S projects evaluation with respect to automated freeform configuration

Following projects were evaluated:

  • Lucene 2.2.0
  • PMD 4.1
  • Log4j 1.2.15
  • Findbugs 1.3.1
  • Azureus 3.0.4.2
  • jEdit 4.2
  • jfreechart 1.0.8
  • checkstyle 4.4
  • BT747 1.4.1
  • xdoclet 1.2.3

Lucene 2.2.0

  • default target builds the project - library core jar file, takes 15 sec
  • compilation classpath contains compilation dest dir
  • run target is missing, but there are some executable classes, so run.single could be provided (it's library in fact)
  • build script uses macros
  • for regenerating parser implementation it requires javacc to be installed and also running special target
  • build script contains lot of other actions:
  • creating sources distributions (zip, tgz)
  • builds maven artifacts
  • creating demo application
  • creating wars
  • clover coverage report (only if clover is installed)

Those other actions in build script would require to either add them to context menu of the project or create another ff projects from the same script.

If user wants to change defaults it can be done by editing following property files that are loaded during build:

  • ~/lucene.build.properties
  • ~/build.properties
  • lucene-x.y/build.properties

Editing of those files is not required to do default build.

PMD 4.1

  • default target compiles and runs tests, but does not create a jar file, takes 35 sec
  • whole build via default target ends with BUILD FAILED because tests failed
  • classpath is defined via properties
  • project requires ant.jar on compilation classpath, but it's not declared, it relies on the file being on cp by default when running ant build (=> we still needs to be able to modify classpaths by hand)
  • clean target is in fact rebuild, it does delete, compile, copy. Clean target is called delete
  • part of creating jar file (target dist) is running retroweaver on bytecode (required jar file is included)
  • run target (called pmd) fails with ClassCastException
  • compilation cp contains compilation dest.dir (very often in general)
  • no clean for javadoc
  • more supported way of building the project is probably maven!
  • project contains eclipse project

Log4j 1.2.15

  • default target prints out usage info and does nothing
  • reading build-info readme file is required to proceed, very complex setup
  • JMS, JavaMail, JMX and JAXP APIs are required, but are not part of the project and user needs to download them separately and edit build.properties file to include those required jar files (JAXP API was not listed in readme file only in properties file)
  • jakarta-oro package required for tests, it's not mentioned in any readme or documentation
  • part of the build (building site) is done by maven (pom.xml is included), maven is executed via <exec> task
  • build script contains also other actions:
  • creating source distibution
  • deployment to site (in fact done by bash via exec)
  • runs jdiff and clirr to check compatibility of APIs
  • runs checkstyle

Those other actions in build script would require to either add them to context menu of the project or create another ff projects from the same script.

  • no test targets in the build script
  • no run targets in the build script
  • some targets use platform specific tools (bash) or external tools (svn)

Findbugs 1.3.1

Already contains NetBeans, Eclipse and IDEA projects

Azureus 3.0.4.2

  • default target build fails (missing folder with libraries)
  • there are no source roots, sources are in the root folder of the project (it means that Source Packages node contains whole project root content!)
  • SWT (for win and for Mac) is required but there is no info about it, the same for log4j, commons-cli, junit.
  • tests are mixed with sources in one source tree
  • some package from MacOSX was required, also some special swt package for win32 was required, but I haven't found them! No docs about it.
  • FAILED TO SETUP FREEFORM PROJECT FOR AZUREUS APPLICATION

jEdit 4.2

  • default target builds the project, takes 18 sec
  • there are no source roots, sources are in the root folder of the project (it means that Source Packages node contains whole project root content!)
  • and classes are compiled next to java files
  • some sources use com.sun.javadoc.* package => requires tools.jar on classpath
  • some sources use com.apple.* packages => requires some Apple specific packages - no description about it
  • there are sources without package declaration
  • no run target (jar file is executable though)
  • no tests at all

jfreechart 1.0.8

  • default target builds the project complete distribution including javadoc, zip and tar.gz ditros and maven bundle, takes 2 minutes
  • compile target creates jar file and deletes built classes after jars are created!
  • no clean target

checkstyle 4.4

  • default target compiles the project, takes 11 sec
  • kind of criptic names of targets (build.srcdist, build.bindist, build.mavenbundles, run.gui, run.checkstyle), difficult to find out something from target name
  • classpath defined by properties (some properties are defined only when running the script inside ant)
  • project requires tools.jar from JDK on classpath
  • build script contains also other actions: anakia, gump, emma, maven bundles

BT747 1.4.1

  • too complex setup, part of the app is probably missing
  • the project was selected because it requires native libraries and builds ditributions for PDAs
  • FAILED TO SETUP FREEFORM PROJECT

xdoclet 1.2.3

  • default target builds the project (distribution), takes more than 7 minutes
  • project contains more than 36 source roots and build process consists of running the same number + 1 build scripts, scripts are then composed via XML entity, in fact it would require to create the same number of freeform projects
  • build script relies on system property MAVEN_HOME
  • during build it connects to web to download part needed for build if it's missing and also to generate javadoc
  • maven scripts are part of the project
  • very complex build process

Conclusion

Default target

There are projects that are setup in a way that default target can be used as the entry point for analysis of the process, but there are projects where:

  • default target does too many things that are not related to building the project (coverage, obfuscators, beautifiers, code analysis, compatibility checks, ...)
  • default target does only part of the build process
  • default target fails (either because of incorrect setup, missing libraries, failed tests, ...)
  • default target does nothing
  • running default target can take long time (from 10 sec to almost 8 minutes on tested projects)

Other situations where analysis of running build script can be dangerous or time consuming:

  • build script connects to internet and download something

Classpath definition

  • Classpath is mainly defined using properties that are either defined in the script or in the external property files.
  • Sometimes the classpath can be defined by inclusion pattern over bunch of jar files in a folder.
  • Some projects also rely on parts of classpath being on classpath implicitly (ant.jar)
  • or being set using system property
  • compilation classpath often contains compilation destination directory
  • some projects require tools.jar from JDK to be on classpath

Source roots

  • There are projects that mix sources with test sources under one source root.
  • Some projects do not use separate source folders at all and all sources are in the root folder of the project
  • Sources might be missing package declaration

General setup

  • Some projects require to read readme and howto files.
  • Some projects contain all required libraries and another projects require to download and install it before building.
  • Some projects require to edit external property files or modify properties in build script.

External tools

  • There are scripts that execute external and/or platform specific tools during the build process (e.g. bash, svn, maven)

Targets and target names

  • There are projects that are missing some parts of the build process (e.g. clean, testing).
  • Sometimes names of the targets doesn't allow to guess what the target does.
  • Some targets do more than one would say from the name (e.g. clean target does whole rebuild).
  • Some targets might fail.

Specials

  • One project deletes build folder with classes right after creating a jar file (all in one target).
  • In case projects require library then sometimes it's not specified how to get the library and what version of it.
  • Projects might require platform specific libraries.
  • Build process consists of large number of subprojects when each of them can be separate freeform project
  • There might be sources without package declaration, so resulting classes can be somewhere else than other classes.
  • Setup of some projects can be so difficult that user might fail even doing it all manually.
  • build scripts can be composed using imports, XML entities and macros.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo