I added similar functionality in Pax Exam:PAXEXAM-83<http://issues.ops4j.org/browse/PAXEXAM-83> Determine profile version out of maven project<http://issues.ops4j.org/browse/PAXEXAM-83> PAXEXAM-82 <http://issues.ops4j.org/browse/PAXEXAM-82> Support for Pax Runner composite scanner <http://issues.ops4j.org/browse/PAXEXAM-82>
On Thu, Apr 30, 2009 at 5:11 PM, Guillaume Nodet <gno...@gmail.com> wrote: > I've added the following stuff to my test. It allows using the > versionAsInProject() maven helper to reference profiles that are maven > dependencies: > > public static ProfileProvisionOption scanComposite(UrlReference url) { > return new ProfileProvisionOption(url); > } > > public static ProfileProvisionOption scanComposite(String artifactId) { > return new > > ProfileProvisionOption(maven().groupId("org.ops4j.pax.runner.profiles").artifactId(artifactId).versionAsInProject().type("composite")); > } > > public static class ProfileProvisionOption extends > AbstractUrlProvisionOption<ProfileProvisionOption> implements Scanner > { > > public ProfileProvisionOption(UrlReference url) { > super(url); > } > > @Override > public String getURL() { > return new StringBuilder() > .append( "scan-composite" ) > .append( SEPARATOR_SCHEME ) > .append( super.getURL() ) > .append( getOptions( this ) ) > .toString(); > } > > protected ProfileProvisionOption itself() { > return this; > } > > static String getOptions( final ProvisionOption provision ) { > final StringBuilder options = new StringBuilder(); > if( provision.shouldUpdate() ) { > options.append( SEPARATOR_OPTION ).append( OPTION_UPDATE ); > } > if( !provision.shouldStart() ) { > options.append( SEPARATOR_OPTION ).append( OPTION_NO_START > ); > } > if( provision.getStartLevel() != null ) { > options.append( SEPARATOR_OPTION ).append( > provision.getStartLevel() ); > } > return options.toString(); > } > > } > > > This allows using: > scanComposite("log"), > scanComposite("felix.config"), > scanComposite("spring.dm"), > > and put those profiles as maven dependencies to ensure they'll be > available offline and in the m2 local repo. > > I still haven't found the reason for the log profile, but i guess it > comes from pax-runner and not pax-exam. > > On Thu, Apr 30, 2009 at 13:06, Guillaume Nodet <gno...@gmail.com> wrote: > > Great, thx for the tip. > > I've committed this change along with adding those profiles has maven > > dependencies to cache them. > > I still have some lag on the last line of the following log output: > > > > 13:04:00,817 | INFO | main | ProvisionServiceImpl > > | on.internal.ProvisionServiceImpl 85 | Scan bundles from > > [scan-bundle:mvn:org.junit/com.springsource.org.junit/4....@1] > > 13:04:00,817 | INFO | main | ProvisionServiceImpl > > | on.internal.ProvisionServiceImpl 85 | Scan bundles from > > [scan-bundle:mvn:org.ops4j.pax.exam/pax-exam-container-rbc/0....@1] > > 13:04:00,817 | INFO | main | ProvisionServiceImpl > > | on.internal.ProvisionServiceImpl 85 | Scan bundles from > > [scan-composite:mvn:org.ops4j.pax.runner.profiles/log/1.3.0/composite] > > 13:04:00,818 | INFO | main | ProvisionServiceImpl > > | on.internal.ProvisionServiceImpl 85 | Scan bundles from > > [scan-bundle:mvn:org.ops4j.pax.logging/pax-logging-api/1.3.0] > > 13:04:00,821 | INFO | main | ProvisionServiceImpl > > | on.internal.ProvisionServiceImpl 85 | Scan bundles from > > [scan-bundle:mvn:org.ops4j.pax.logging/pax-logging-service/1.3.0] > > 13:04:00,822 | INFO | main | ProvisionServiceImpl > > | on.internal.ProvisionServiceImpl 85 | Scan bundles from > > > [scan-composite:mvn:org.ops4j.pax.runner.profiles/felix.config/1.0.10/composite] > > 13:04:00,823 | INFO | main | ProvisionServiceImpl > > | on.internal.ProvisionServiceImpl 85 | Scan bundles from > > [scan-bundle:mvn:org.apache.felix/org.apache.felix.configadmin/1.0.10] > > 13:04:00,824 | INFO | main | ProvisionServiceImpl > > | on.internal.ProvisionServiceImpl 85 | Scan bundles from > > [scan-composite:mvn:org.ops4j.pax.runner.profiles/ > spring.dm/1.2.0-rc1/composite] > > 13:04:00,824 | INFO | main | ProvisionServiceImpl > > | on.internal.ProvisionServiceImpl 85 | Scan bundles from > > [scan-composite:mvn:org.ops4j.pax.runner.profiles/spring/2.5.6/composite] > > 13:04:00,826 | INFO | main | ProvisionServiceImpl > > | on.internal.ProvisionServiceImpl 85 | Scan bundles from > > [scan-composite:mvn:org.ops4j.pax.runner.profiles/log//composite] > > > > > > For some reason, the log profile is included twice: once with the full > > version (which resolution is fast) and a second one without any > > version (which hangs a bit) ... Any idea ? > > > > On Thu, Apr 30, 2009 at 11:59, Alin Dreghiciu <adreghi...@gmail.com> > wrote: > >> If your change your configuration from Karaf itests to: > >> logProfile().version( "1.3.0" ), > >> profile( "felix.config" ).version( "1.0.8" ), > >> profile( "spring.dm" ).version( "1.2.0-rc1" ), > >> You will see a big improvement in speed. > >> On Thu, Apr 30, 2009 at 11:59 AM, Guillaume Nodet <gno...@gmail.com> > wrote: > >>> > >>> I noticed that when running pax exam tests, there is a delay while > >>> scanning profiles. > >>> My understanding is that the profiles are actually grabbed from the > >>> pax-runner repository at: > >>> http://scm.ops4j.org/repos/ops4j/projects/pax/runner-repository/ > >>> Is there any way to make sure those profile are available locally by > >>> using maven dependencies ? > >>> I think this would ensure that: > >>> * those profiles are available while offline > >>> * speed up the provisioning by not scanning the remote repo > >>> > >>> Thoughts ? > >>> > >>> -- > >>> Cheers, > >>> Guillaume Nodet > >>> ------------------------ > >>> Blog: http://gnodet.blogspot.com/ > >>> ------------------------ > >>> Open Source SOA > >>> http://fusesource.com > >>> > >>> _______________________________________________ > >>> general mailing list > >>> general@lists.ops4j.org > >>> http://lists.ops4j.org/mailman/listinfo/general > >> > >> > >> > >> -- > >> Alin Dreghiciu > >> Software Developer - Looking for new projects! > >> My profile: http://www.linkedin.com/in/alindreghiciu > >> My blog: http://adreghiciu.blogspot.com > >> http://www.ops4j.org - New Energy for OSS Communities - Open > Participation > >> Software. > >> http://www.qi4j.org - New Energy for Java - Domain Driven Development. > >> > >> _______________________________________________ > >> general mailing list > >> general@lists.ops4j.org > >> http://lists.ops4j.org/mailman/listinfo/general > >> > >> > > > > > > > > -- > > Cheers, > > Guillaume Nodet > > ------------------------ > > Blog: http://gnodet.blogspot.com/ > > ------------------------ > > Open Source SOA > > http://fusesource.com > > > > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > ------------------------ > Open Source SOA > http://fusesource.com > > _______________________________________________ > general mailing list > general@lists.ops4j.org > http://lists.ops4j.org/mailman/listinfo/general > -- Alin Dreghiciu Software Developer - Looking for new projects! My profile: http://www.linkedin.com/in/alindreghiciu My blog: http://adreghiciu.blogspot.com http://www.ops4j.org - New Energy for OSS Communities - Open Participation Software. http://www.qi4j.org - New Energy for Java - Domain Driven Development.
_______________________________________________ general mailing list general@lists.ops4j.org http://lists.ops4j.org/mailman/listinfo/general