You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Eoghan Glynn (JIRA)" <ji...@apache.org> on 2010/02/06 02:14:27 UTC

[jira] Created: (FELIX-2049) extend org.apache.felix.karaf.testing.Helper to emit a karaf-specific execution environment file for pax-runner

extend org.apache.felix.karaf.testing.Helper to emit a karaf-specific execution environment file for pax-runner
---------------------------------------------------------------------------------------------------------------

                 Key: FELIX-2049
                 URL: https://issues.apache.org/jira/browse/FELIX-2049
             Project: Felix
          Issue Type: Improvement
          Components: Karaf
    Affects Versions: karaf-1.4.0
            Reporter: Eoghan Glynn
             Fix For: karaf-1.4.0


I've been looking into rebasing an existing test on the new org.apache.felix.karaf.testing.Helper class, but I don't think it goes quite far enough in imposing the karaf runtime environment on pax-runner. Specifically, just pulling in the config.properties settings related to the system.packages doesn't stop pax-runner generating a system packages list with its own notion of what packages are appropriate for the current JRE version. 

So for Java6 we end up with problematic entries like javax.xml.ws*, javax.activation etc. which cause trouble for any bundles doing version-constrained imports of these packages (because equinox assigns "0.0" as the version for system packages).

What's needed, I think, is for the Helper to generate a pax-runner execution environment file, named say target/paxrunner/platform/ee/karaf/jre-1.{5|6}.profile, and containing the correct set of system packages for karaf (i.e. the org.osgi.framework.system.packages property read from the config.properties with the jre-1.{5|6} variable substituted in). The Helper should also set rawPaxRunnerOption("--ee", "file://./target/paxrunner/platform/ee/karaf/jre-1.{5|6}.profile") as one of the default options.

Feedback welcome if I'm on the wrong track with this. But if there are no objections, I'll go ahead and code this up & then submit a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2049) extend org.apache.felix.karaf.testing.Helper to emit a karaf-specific execution environment file for pax-runner

Posted by "Eoghan Glynn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eoghan Glynn updated FELIX-2049:
--------------------------------

    Attachment: felix_2249.patch

Turns out the execution environment approach isn't sufficient, as pax-runner will still override the system packages via a -Dorg.osgi.framework.system.packages=... VM option. 

So the only way round this seems to be to grab control of the VM options directly, to ensure the correct karaf system property (esp. the org.osgi.framework.system.packages) are actually set.

Please see attached patch. 

(Note I had to exclude a bunch of javax.xml.* packages from the jre-1.6 property setting in assembly/src/main/filtered-resources/etc/config.properties also).

> extend org.apache.felix.karaf.testing.Helper to emit a karaf-specific execution environment file for pax-runner
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2049
>                 URL: https://issues.apache.org/jira/browse/FELIX-2049
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>            Reporter: Eoghan Glynn
>             Fix For: karaf-1.4.0
>
>         Attachments: felix_2249.patch
>
>
> I've been looking into rebasing an existing test on the new org.apache.felix.karaf.testing.Helper class, but I don't think it goes quite far enough in imposing the karaf runtime environment on pax-runner. Specifically, just pulling in the config.properties settings related to the system.packages doesn't stop pax-runner generating a system packages list with its own notion of what packages are appropriate for the current JRE version. 
> So for Java6 we end up with problematic entries like javax.xml.ws*, javax.activation etc. which cause trouble for any bundles doing version-constrained imports of these packages (because equinox assigns "0.0" as the version for system packages).
> What's needed, I think, is for the Helper to generate a pax-runner execution environment file, named say target/paxrunner/platform/ee/karaf/jre-1.{5|6}.profile, and containing the correct set of system packages for karaf (i.e. the org.osgi.framework.system.packages property read from the config.properties with the jre-1.{5|6} variable substituted in). The Helper should also set rawPaxRunnerOption("--ee", "file://./target/paxrunner/platform/ee/karaf/jre-1.{5|6}.profile") as one of the default options.
> Feedback welcome if I'm on the wrong track with this. But if there are no objections, I'll go ahead and code this up & then submit a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2049) extend org.apache.felix.karaf.testing.Helper to emit a karaf-specific execution environment file for pax-runner

Posted by "Eoghan Glynn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eoghan Glynn updated FELIX-2049:
--------------------------------

    Attachment: felix_2249_2.patch

Just noticed a linger println() in the initial patch, please use this one instead.

> extend org.apache.felix.karaf.testing.Helper to emit a karaf-specific execution environment file for pax-runner
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2049
>                 URL: https://issues.apache.org/jira/browse/FELIX-2049
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>            Reporter: Eoghan Glynn
>             Fix For: karaf-1.4.0
>
>         Attachments: felix_2249.patch, felix_2249_2.patch
>
>
> I've been looking into rebasing an existing test on the new org.apache.felix.karaf.testing.Helper class, but I don't think it goes quite far enough in imposing the karaf runtime environment on pax-runner. Specifically, just pulling in the config.properties settings related to the system.packages doesn't stop pax-runner generating a system packages list with its own notion of what packages are appropriate for the current JRE version. 
> So for Java6 we end up with problematic entries like javax.xml.ws*, javax.activation etc. which cause trouble for any bundles doing version-constrained imports of these packages (because equinox assigns "0.0" as the version for system packages).
> What's needed, I think, is for the Helper to generate a pax-runner execution environment file, named say target/paxrunner/platform/ee/karaf/jre-1.{5|6}.profile, and containing the correct set of system packages for karaf (i.e. the org.osgi.framework.system.packages property read from the config.properties with the jre-1.{5|6} variable substituted in). The Helper should also set rawPaxRunnerOption("--ee", "file://./target/paxrunner/platform/ee/karaf/jre-1.{5|6}.profile") as one of the default options.
> Feedback welcome if I'm on the wrong track with this. But if there are no objections, I'll go ahead and code this up & then submit a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-2049) extend org.apache.felix.karaf.testing.Helper to emit a karaf-specific execution environment file for pax-runner

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved FELIX-2049.
------------------------------------

    Resolution: Fixed
      Assignee: Guillaume Nodet

Committing to https://svn.apache.org/repos/asf/felix/trunk ...
	M	karaf/assembly/src/main/filtered-resources/etc/config.properties
	M	karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/CoreTest.java
	M	karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/FeaturesTest.java
	M	karaf/tooling/testing/src/main/java/org/apache/felix/karaf/testing/Helper.java
Committed r907997

Patch applied with a minor modification about the location of the karaf home which i've reverted to "target/karaf.home" instead of polluting the user's home dir

> extend org.apache.felix.karaf.testing.Helper to emit a karaf-specific execution environment file for pax-runner
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2049
>                 URL: https://issues.apache.org/jira/browse/FELIX-2049
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>            Reporter: Eoghan Glynn
>            Assignee: Guillaume Nodet
>             Fix For: karaf-1.4.0
>
>         Attachments: felix_2249.patch, felix_2249_2.patch
>
>
> I've been looking into rebasing an existing test on the new org.apache.felix.karaf.testing.Helper class, but I don't think it goes quite far enough in imposing the karaf runtime environment on pax-runner. Specifically, just pulling in the config.properties settings related to the system.packages doesn't stop pax-runner generating a system packages list with its own notion of what packages are appropriate for the current JRE version. 
> So for Java6 we end up with problematic entries like javax.xml.ws*, javax.activation etc. which cause trouble for any bundles doing version-constrained imports of these packages (because equinox assigns "0.0" as the version for system packages).
> What's needed, I think, is for the Helper to generate a pax-runner execution environment file, named say target/paxrunner/platform/ee/karaf/jre-1.{5|6}.profile, and containing the correct set of system packages for karaf (i.e. the org.osgi.framework.system.packages property read from the config.properties with the jre-1.{5|6} variable substituted in). The Helper should also set rawPaxRunnerOption("--ee", "file://./target/paxrunner/platform/ee/karaf/jre-1.{5|6}.profile") as one of the default options.
> Feedback welcome if I'm on the wrong track with this. But if there are no objections, I'll go ahead and code this up & then submit a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-2049) extend org.apache.felix.karaf.testing.Helper to emit a karaf-specific execution environment file for pax-runner

Posted by "Eoghan Glynn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831403#action_12831403 ] 

Eoghan Glynn edited comment on FELIX-2049 at 2/9/10 10:42 AM:
--------------------------------------------------------------

Just noticed a lingering println() in the initial patch, please use felix_2249_2.patch instead.

      was (Author: eglynn):
    Just noticed a linger println() in the initial patch, please use this one instead.
  
> extend org.apache.felix.karaf.testing.Helper to emit a karaf-specific execution environment file for pax-runner
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2049
>                 URL: https://issues.apache.org/jira/browse/FELIX-2049
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>            Reporter: Eoghan Glynn
>             Fix For: karaf-1.4.0
>
>         Attachments: felix_2249.patch, felix_2249_2.patch
>
>
> I've been looking into rebasing an existing test on the new org.apache.felix.karaf.testing.Helper class, but I don't think it goes quite far enough in imposing the karaf runtime environment on pax-runner. Specifically, just pulling in the config.properties settings related to the system.packages doesn't stop pax-runner generating a system packages list with its own notion of what packages are appropriate for the current JRE version. 
> So for Java6 we end up with problematic entries like javax.xml.ws*, javax.activation etc. which cause trouble for any bundles doing version-constrained imports of these packages (because equinox assigns "0.0" as the version for system packages).
> What's needed, I think, is for the Helper to generate a pax-runner execution environment file, named say target/paxrunner/platform/ee/karaf/jre-1.{5|6}.profile, and containing the correct set of system packages for karaf (i.e. the org.osgi.framework.system.packages property read from the config.properties with the jre-1.{5|6} variable substituted in). The Helper should also set rawPaxRunnerOption("--ee", "file://./target/paxrunner/platform/ee/karaf/jre-1.{5|6}.profile") as one of the default options.
> Feedback welcome if I'm on the wrong track with this. But if there are no objections, I'll go ahead and code this up & then submit a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.