Skip to content

Commit

Permalink
Just working on some documentation [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
atooni committed Sep 24, 2018
1 parent 80e0437 commit 4e8ed81
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
28 changes: 26 additions & 2 deletions BUILDING.adoc
Expand Up @@ -11,9 +11,33 @@ file structure needs a bit of explanation:


* All submodule specific settings live in the corresponding scala file, *no exceptions (NONE !)*. * All submodule specific settings live in the corresponding scala file, *no exceptions (NONE !)*.


A sample scala file would be * A sample scala file would be `BlendedActivemqClient.scala`:


[source,scala,linenums] [source,scala]
---- ----
include::project/BlendedActivemqClient.scala[] include::project/BlendedActivemqClient.scala[]
---- ----

* All sub module files mix in the trait `ProjectFactory`, which means they have to expose a `val` of type `Project`.

* Internally we are using a SettingsFactory `ProjectSettings`. This factory is a class which encapsulates the settings for our submodules based on a handful of configuration parameters which are passed to the factory as constructor arguments.

* The factory exposes a variable `baseProject' which needs to be enriched with the dependencies to other submodules within the project. These dependencies are simply the exposed projects of other sub modules.

* As most of our sub modules are OSGi bundles, the constructor argument `adaptBundle` allows to modify the default bundle settings encapsulated in `BlendedBundle` simply by using the copy method. The resulting OSGi settings will be part of the generated sub module settings.

To complete the example, here is how the sub module above is referenced in the `build.sbt`:

[source,scala]
----
include::build.sbt[tags=Building]
----

=== Special cases

There are more complex project definitions, e.g. when the submodule needs to generate an extra artifact in the form of a zip file. An example for such a setup can be seen in https://github.com/woq-blended/blended/blob/master/project/BlendedLauncher.scala[`BlendedLauncher`].

== Set up for Automated releases via travis

TODO

2 changes: 2 additions & 0 deletions build.sbt
Expand Up @@ -89,7 +89,9 @@ lazy val blendedSamplesCamel = BlendedSamplesCamel.project
lazy val blendedSamplesJms = BlendedSamplesJms.project lazy val blendedSamplesJms = BlendedSamplesJms.project
lazy val blendedAkkaHttpSampleHelloworld = BlendedAkkaHttpSampleHelloworld.project lazy val blendedAkkaHttpSampleHelloworld = BlendedAkkaHttpSampleHelloworld.project
lazy val blendedActivemqDefaultbroker = BlendedActivemqDefaultbroker.project lazy val blendedActivemqDefaultbroker = BlendedActivemqDefaultbroker.project
// tag::Building[]
lazy val blendedActivemqClient = BlendedActivemqClient.project lazy val blendedActivemqClient = BlendedActivemqClient.project
// end::Building[]
lazy val blendedSecurityScep = BlendedSecurityScep.project lazy val blendedSecurityScep = BlendedSecurityScep.project
lazy val blendedSecurityScepStandalone = BlendedSecurityScepStandalone.project lazy val blendedSecurityScepStandalone = BlendedSecurityScepStandalone.project


Expand Down

0 comments on commit 4e8ed81

Please sign in to comment.