-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for specifying start level for modules [PAXCONSTRUCT-127] #139
Comments
Stuart McCulloch commented Just FYI, this topic has come up several times over the years and the problem always comes down to representing the start-level in the Maven POM. Regarding config priority: we always put any explicit URLs and argument files before the generated deployment POM when passing it to pax-runner, |
Alin Dreghiciu commented
Now regarding how one could specify the start level and / or a bundle to be started or not cant we use the approach they have in dependency plugin? <configuration>
<artifactItems>
<artifactItem>
<groupId>foo</groupId>
<artifactId>bar1</artifactId>
<startLevel>10</startLevel>
<start>false</start>
</artifactItem>
<artifactItem>
<groupId>foo</groupId>
<artifactId>bar2</artifactId>
<startLevel>2</startLevel>
</artifactItem>
</artifactItems>
<configuration> |
Stuart McCulloch commented Sure that is an option, but I do wonder if repeating a long list of artifactItems (with duplicate groupIds / artifactIds) is better than a short pax-url... |
Alin Dreghiciu commented Sure, is not the ideal situation to duplicate stuff, only that is within the way maven works. Maybe an alternative to shorten the specification is to use something like foo:bar1 instead. Maybe even allow some kind of wildcards. |
Kristoffer Peterhänsel commented As I understand it, currently Pax Construct builds one pom with each of the various provisioned artifacts as a dependency. Correct? And I also found a reference to specifying a start level in the pom, as a property, for Pax Runner. Couldn't each artifact just be referenced as a pom to be scanned? Or would that be too slow to be a workable solution? That would at least solve my issue as it is one of my own bundles I need to start early. And the 3rd-party bundles I need to modify start level on I am simply referring in the provision block instead of having them in my provision/pom file. I guess what ends up in the config.ini isn't really the responsibility of Pax Construct. But could there be any reason why duplicates are not sorted out? Or has it just not come up as an issue before? Can't seem to find any issues reported on it anyway. |
CliffordC commented I just ran into this shortcoming today. I don't think it's "Un Maven-like" to have a separate file for additional meta-data. For example, look at the "assembly.xml" that the maven-assembly plugin uses. We don't even have to have an XML file. Something like this: foo/bar/artifact1 in a text file would work. Although the lack of XML probably is un Maven-like 😉 I actually don't see why these can't be duplicates since it's a seperation of concerns: pom.xml is for deps and bundle-config.xml (or whatever you want to call it) is for specifying bundle configurations that override the default (all bundles started at start leve 5). |
Kristoffer Peterhänsel created PAXCONSTRUCT-127
I am in a position where I need one of my bundles to start early to set up some things in Config Admin. Unfortunately it seems impossible to get Pax Construct to run a bundle - that is part of the build - at a specific start level.
I have a Pac Construct-created Maven project with a number of sub-modules. And one of those I am trying to get to run at start level 2, while everything else runs at 5. I can add it in the provision section of my POM as mvn: url and get it written into the config.ini (I am using Equinox as OSGi framework). But the module dependency will also be written into the file. And it appears that the last one will take priority under Equinox.
So it might be an idea to remove duplicated from the list of bundles to provision, to allow this type of overwriting. Alternatively there should be some support for having a bundles start level in its POM file. But then I guess the issue is Pax Runner related.
Affects: 1.4
Votes: 0, Watches: 0
The text was updated successfully, but these errors were encountered: