[cleanup]Avoid instantiating Integer objects and directly get the int
value

First issue was to avoid instantiating Integer objects. The solution is
to call Integer.valueOf() instead.
After that the Integer is retrieved only to get the intValue based on a
String, so directly call Integer.parseInt().

Change-Id: Ibb5f49c74fd5454948a40acd970ea26adc6f7cc8
Signed-off-by: Aurelien Pupier <aurelien.pupier@bonitasoft.com>
412416 Add a target-platform goal to calculate the final TP

- Added a mojo that computes the final target platform. This target
  platform object only includes final metadata from reactor
  projects (read from the p2content.xml, which is written by the
  publishing built steps), so we can be certain that no dependency-
  only metadata leaks into the build result (bug 369676). The new 
  mojo is also a step towards deferring the dependency resolution
  (bug 353889), where we will only have the target platform with
  final metadata.
- Include those reactor projects in the target platform which are
  (transitively) referenced by the current project. The transitive
  project traversal is necessary for cases where dependencies are
  only injected into the Maven model in a shallow way. This happens
  with source features, where there are no dependency-only IUs
  but the dependency is only marked through an extraRequirement at
  dependency resolution time. (For an example see the
  extra-source-bundles IT of the tycho-source-feature-plugin.)
  Don't include all projects which have been built before, so that
  enabling parallel build would not have an effect on the target
  platform.
- Moved ReactorRepositoryManagerImpl to p2.resolver.impl bundle to
  allow adding the target platform registration logic. The service
  shall become the central place where modules publish their build
  results and consume build results of upstream modules (via the
  final target platform).
- Also: Added comments to interfaces and classes where I had
  forgotten what they were good for.

Bug: 412416
Bug: 369676
Bug: 353889
Change-Id: I8a14122f3dc5dfde84944a128133459a2767754b
Signed-off-by: Tobias Oberlies <tobias.oberlies@sap.com>
396999 Apply configured filters to POM dependencies

- Make sure that the filters configured for the target platform
  also apply to the units coming from POM dependencies. This is done
  by merging these IUs with other external content first and then
  applying the filters just once.
- Note that (as the JavaDoc comment says) the maven artifact lookup
  map is _not_ filtered. This is not necessary: all keys we could
  remove will never be looked up; these IUs will not be part of the
  target platform because the filter will have removed them. (NB:
  Configured filters apply to all target platform sources.)

Bug: 396999
Change-Id: I4f6ac5814a3584a4021dd4c7c8943ba81612c537
Signed-off-by: Tobias Oberlies <tobias.oberlies@sap.com>
429442 Remove unnecessary direct references to org.eclipse.osgi

- Remove direct references to org.eclipse.osgi which are anyway
  inherited from other references (e.g. tycho-core). With Luna, some of
  our projects will actually depend on two bundles from Equninox, so
  having only half of these dependencies explicitly repeated in some
  projects is just confusing.
- Also: Normalized indentation in touched and root POMs with the
  project settings (Indent using one tab, do not format comments).

Bug: 429442
Change-Id: I6d55cf6fd25503388063903a134721c5cf89732a
432140 StandaloneDirectorRuntime: timeout should be configurable

Bug: 432140
Change-Id: I01c7b5aea9c10580bb09d457f993fbe868020b29
Signed-off-by: Natalia Bartol <natalia.b@zend.com>
[cleanup]Use new API since maven-archiver 2.5

The MavenSession parameter has been added to the createArchive method.
The MavenSession is directly injected in the Mojo. When using deprecated
createArchive method, the MavenSession is set to null and we are loosing
the MavenSession context.

Change-Id: I91b186304afc13f0a2d38ff6973b225ed071828f
Signed-off-by: Aurelien Pupier <aurelien.pupier@bonitasoft.com>
431793 merge current env vars with explicitly configured ones

in case environment variables are explicitly configured
in pom.xml for the test JVM, merge them with the environment variables
of the current process (explicitly configured wins).
This restores plexus-utils behaviour for forking
processes.

Bug: 431793
Change-Id: Ic310897075c1236f6f9d6a556dfa0ca7d24219be
Signed-off-by: Jan Sievers <jan.sievers@sap.com>
418013 Add site doc for tycho-versions-plugin:set-version

- Clarify where versions are changed (-> everywhere i.e. in the project
  version and all references so that we get a version refactoring) and
  which versions are changed (current project and child projects with
  the same version; exported packages and product files may be versioned
  independently, so they are treated like child projects).

Bug: 418013
Change-Id: I09f913bae12a9e2a699d8f10c71f81bf308f26f4
Signed-off-by: Tobias Oberlies <tobias.oberlies@sap.com>
Add equals & hashCode to ReactorProjectIdentities

- ... to allow using instances of that class as keys in a HashMap.
- Also: Avoid using File instances pointing to non-existing relative
  locations in tests. This prevents that these relative paths are
  accidentally created by the code under test.

Bug: 412416
Change-Id: Ic40be9e87e0a6c67c02e02c8313d74c7fcc1eaa7
412416 Also make the preliminary target platform immutable

- Since there is now a build step for updating the target platform to
  final metadata, it is no longer needed to re-aggregate the reactor
  units on every access. (This was a workaround for the non-final
  metadata leakage problem.) Therefore, we can also make the
  preliminary target platform object immutable ("frozen"). Without the
  performance penalty on access, the target platform is now open to a
  broader use (see subsequent changes).
- Also: Added a unit test for the duplicate reactor IUs detection
  logic (because this logic was not unit tested, and needed to be
  touched in this change).

Bug: 412416
Change-Id: I867d26f8c990f43d0e7bd160e82b974469a544ae
Signed-off-by: Tobias Oberlies <tobias.oberlies@sap.com>