vschrade / workspacemechanic

Automatically exported from code.google.com/p/workspacemechanic
0 stars 0 forks source link

Generate update site with Maven Tycho #80

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This adds support to build the suite with Maven Tycho.

For ease of use, I have created a 'build.sh' script at the top level of the 
repository, which executes:

 mvn 
   -Dmaven.test.failure.ignore=true  # Ignore any test failures and keep on going
   clean # get rid of previous build
  integration-test # run tests plugin against mechanic plugin
  surefire-report:report-only # and generate report in HTML format
  package # and finally generate the package

You can also pass in additional arguments with the 'build.sh' which are 
appended to the end, which include:

 -Pindigo # build against Indigo instead of Helios (the default)
 -Phelios # essentially a no-op, since that's the default
 -Pjuno # as and when ...

Since there are currently test failures, you need to run the build with the 
-Dmaven.test.failure.ignore flag, as otherwise the repository won't get built.

Finally, we really should use .qualifier and -SNAPSHOT as otherwise P2 gets 
royally confused when you change an artifact's contents but not the name. This 
way, the date stamp gets added onto the end automatically. I have attached that 
as a separate patch to the main one so you can address this if you want; but if 
you don't, you really need to bump the version of the plugin each time you 
build.

Original issue reported on code.google.com by alex.ble...@gmail.com on 18 Oct 2011 at 11:52

Attachments:

GoogleCodeExporter commented 8 years ago
I will review and incorporate this tonight. I will also disable the broken test 
-- there's no need for it since we have the issue tracking it.

One thing I'd like to be able to do is preserve the active plug-ins to maintain 
a history of installed plug-ins. Is that possible?

Original comment by konigsb...@gmail.com on 18 Oct 2011 at 11:55

GoogleCodeExporter commented 8 years ago
The build generates a new copy of the update site each time (the clean blows 
the old one, in the update/target/repository directory, away each time).

However, once it's in P2 form, you can then copy/mirror it into an existing 
site. I'd suggest that you have a separate post-build process, which you can 
kick off when you want, that takes the content of the built repository and 
merges it into an existing P2 site elsewhere.

http://wiki.eclipse.org/Equinox_p2_Repository_Mirroring

So, you'd run:

 eclipse -nosplash -verbose
  -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication
  -source file:///path/to/workspacemechanic/update/target/repository/
  -destination file:///path/to/main/update/site/

That will take the freshly built copy and stash it somewhere else. The stashing 
should preserve the existing set of plugins in the main update site.

Original comment by alex.ble...@gmail.com on 19 Oct 2011 at 12:02

GoogleCodeExporter commented 8 years ago
... you also need this one:

  eclipse -nosplash -verbose
   -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication
   -source file:///path/to/workspacemechanic/update/target/repository/
   -destination file:///path/to/main/update/site/

Note the subtle difference between 'p2.metadata.repository' and 
'p2.artifact.repository' in the two commands. 

Original comment by alex.ble...@gmail.com on 19 Oct 2011 at 12:06