On 27 Jan 2015, at 09:51, Viliam Rockai <vrockai(a)redhat.com>
wrote:
On Tue, 2015-01-27 at 09:25 -0800, mike thompson wrote:
>> On 27 Jan 2015, at 09:09, Viliam Rockai <vrockai(a)redhat.com> wrote:
>>
>> Hey All,
>>
>> I want to start this thread to gather some information about how
>> components are shared between projects. So, to make the terminology
>> clear, lets check this stuff:
>>
https://github.com/vrockai/hawkular/tree/master/ui/console/alerts
>>
https://github.com/vrockai/hawkular/tree/master/ui/console/metrics
>>
>> are future components/widgets which are going to be used on the console
>> page. Those components are Hawtio 2.x plugins.
>>
>> According to:
>>
https://github.com/hawtio/hawtio/blob/master/docs/Overview2dotX.md
>>
>> I expect exposing plugins as bower packages is the preferred way in
>> Hawtio 2.x. From my perspective (angular guy) this is pretty much what
>> is expected. The only way to expose/share those components as bower
>> packages to third-parties would be to put them in separate repo. As was
>> already said on IRC, this may be overkill. I see two ways of resolution:
>>
>> 1. Create separate repository for each component. Those all would be
>> bower dependencies of the hawkular console.
>> Pros: possibly consistent with the Hawtio 2.x ways, modularity = we
>> download only what we need.
>> Cons: lots of repositories to take care of.
>>
>> 2. Create a single repository for all the plugins. The whole library of
>> sibling components, similar to i.e. Angular-UI.
>> Pros: easier maintenance.
>> Cons: less modular = need to download whole library before we filter
>> which plugins we want to use.
>
> We could use a combination of 1 + 2 meaning: use the directory structure of 2, but
publishing each of those plugins as bower components to pulled into the main
Hawkular-console (or other hawt.io consoles). This keeps the plugins free of maven as only
the Hawkular console build would use maven to pull in the bower components. Each plugin
publishes a new version when ready and Hawkular console can assemble using whatever
versions.
> Pros: easier maintenance, code is all in one place. We get bower components and
versioning.
> Cons: there is no need for a target directory (because no maven for ui plugins) so
bower/npm component artefacts get downloaded into source dir.
>
I don't understand, can you please show it on some example directory
structure? Do you mean to have number of directories (one for each
plugin) with bower.json in each directory? I'm confused, because bower
package == repository. I can't publish a plugin within a repository.
Once published, it's the whole repository which is published, not just
one sub-directory in it.
Bower and npm stuff in the src directory: In the LO console we wanted to
avoid this. The idea was, once you do "mvn clean" you should have the
same files as before the build and everything else is deleted.
Using .gitignore for special node/bower directories may be obvious to
people developing the console, but may cause some pain to people who
expect the src not to contain anything new (cached packages, which are
not updated, ...) after cleaning. But if it's not a maven project, I
don't think this applies. If this is only a case for the "bower package"
repository of our plugins, I don't see it as a con.
Nevermind, bower does require the git end point (its own repo) because it uses the tags
for versioning. So back to 1, 2 and possibly 3…
3. Use Hawkular repo as git endpoint for a single bower package. This means we would have
to setup bower at the root of the project (so that it is a proper bower package).
Pros: This would give us one bower component/package that would not require another git
repo(s).
Cons: We would have only one plugin/package and it would need to be versioned at the same
rate as Hawkular because they would both be using the same git tag for versions. Also some
bower.json file would need to be exposed at the root directory level.
>
>>
>> I see, that the 2nd approach already exists in the hawtio repository,
>> probably the best way would be to put our components to this repo:
>>
https://github.com/hawtio/hawtio-ui
>>
>> Thanks for your thoughts,
>>
>> Viliam
FWIW: I still like the option 1) multiple git repos (as long a we limit it to a couple
repos). Just because this is the way js/bower package management is supposed to work.
>>
>> _______________________________________________
>> hawkular-dev mailing list
>> hawkular-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/hawkular-dev
>