Sounds good.
http://issues.ops4j.org/browse/PAXRUNNER-262
Thanks!
-AZ

On Mon, Jun 1, 2009 at 2:56 PM, Alin Dreghiciu <[email protected]> wrote:
> We are slowly getting there: be able to use pax runner offline. So, feel
> free to add an issue related to using profiles while offline.
>
> On Mon, Jun 1, 2009 at 12:59 PM, Aaron Zeckoski <[email protected]> wrote:
>>
>> I think pax:clean should do it for me. I can see where you would not
>> want to blast it on every rebuild so that makes perfect sense in my
>> mind. I doubt the config for the runner would change often enough that
>> it would be worth it to clear it very often anyway.
>>
>> On a somewhat related note, I notice that it does not seem possible
>> for pax:run to work if the network is unavailable (which makes working
>> on a plane less fun). I get errors like this:
>>  -> Scan bundles from
>> [scan-composite:mvn:org.ops4j.pax.runner.profiles/web//composite]
>>         ___
>>        /  /
>>       /  / Oops, there has been a problem!
>>      /  /
>>     /__/   URL [mvn:org.ops4j.pax.runner.profiles/web//composite]
>> could not be resolved.
>>    ___
>>   /__/     Use --log=debug to see details.
>>
>> What do you think about an issue related to offline execution (once
>> the runner folder is in place)?
>> -AZ
>>
>>
>> On Mon, Jun 1, 2009 at 9:04 AM, Stuart McCulloch <[email protected]>
>> wrote:
>> > 2009/6/1 Aaron Zeckoski <[email protected]>
>> >>
>> >> Hmm... I cleared out the runner directory and things seem to be
>> >> working again. I noticed mvn clean does not seem to clear this so I
>> >> guess there must have been something cached in there. Live and learn.
>> >> Is there a way to force this runner folder to be in the target
>> >> directory?
>> >
>> > this was a feature request (can't remember who asked for it) - the
>> > default
>> > location
>> > is <project>/runner because then you can do a "mvn clean install" to
>> > rebuild
>> > your
>> > bundle without affecting the current deployment
>> >
>> > you can use "mvn pax:clean" to remove this directory and other pax
>> > generated
>> > files
>> >
>> > if you really need to change the default location raise a feature
>> > request -
>> > you can
>> > change the pax-runner working directory with "--dir", but the deployment
>> > pom
>> > will
>> > still be generated under "runner" so a change to the plugin would be
>> > needed
>> >
>> >> > are you doing the same sort of thing, and which version of Maven are
>> >> > you
>> >> > using?
>> >> azeckoski:osgi-sample azeckoski$ mvn --version
>> >> Maven version: 2.0.9
>> >> Java version: 1.5.0_16
>> >> OS name: "mac os x" version: "10.5.7" arch: "i386" Family: "unix"
>> >>
>> >> > also do you have a "runner.args" file lying around in your
>> >> > osgi-sample
>> >> > directory?
>> >> Not that I can find.
>> >>
>> >> > do you have anything pax related in your environment / system
>> >> > properties?
>> >> I never added anything myself but I do have a bunch of the source code
>> >> checked out. I doubt that would have any impact though.
>> >>
>> >> Thanks for checking on it. :-)
>> >> -AZ
>> >>
>> >> On Sun, May 31, 2009 at 6:44 PM, Stuart McCulloch <[email protected]>
>> >> wrote:
>> >> > 2009/6/1 Aaron Zeckoski <[email protected]>
>> >> >>
>> >> >> I tried option 1 but it still says it is using version 0.20.0.
>> >> >> I am not sure what option 2 means so I skipped that one.
>> >> >> Option 3 works but only partially.
>> >> >
>> >> > OK, something odd is going on... I checked out your code:
>> >> >
>> >> >    svn co http://azsandbox.googlecode.com/svn/trunk/osgi-sample
>> >> >
>> >> > and did the following:
>> >> >
>> >> >    cd osgi-sample
>> >> >
>> >> >    mvn clean install pax:run
>> >> >
>> >> > result after it's finished deploying:
>> >> >
>> >> >    > ps
>> >> >
>> >> > START LEVEL 6
>> >> >    ID   State         Level  Name
>> >> > [   0] [Active     ] [    0] System Bundle (1.8.0)
>> >> > [   1] [Active     ] [    5] Sample Service API (1.0.0.SNAPSHOT)
>> >> > [   2] [Active     ] [    5] Sample Service IMPL (1.0.0.SNAPSHOT)
>> >> > [   3] [Active     ] [    5] Sample Servlet (1.0.0.SNAPSHOT)
>> >> > [   4] [Active     ] [    5] OPS4J Pax Logging - API (1.3.0)
>> >> > [   5] [Active     ] [    5] OPS4J Pax Logging - Service (1.3.0)
>> >> > [   6] [Active     ] [    5] OPS4J Pax Web - Service (0.6.0)
>> >> > [   7] [Active     ] [    1] osgi.compendium
>> >> > (4.1.0.build-200702212030)
>> >> > [   8] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
>> >> > [   9] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
>> >> >
>> >> > so it's correctly picked up the web profile from your pom on my
>> >> > machine
>> >> >
>> >> >    ( btw, this same project now works without the extra
>> >> > --repositories
>> >> > settings )
>> >> >
>> >> > are you doing the same sort of thing, and which version of Maven are
>> >> > you
>> >> > using?
>> >> > also do you have a "runner.args" file lying around in your
>> >> > osgi-sample
>> >> > directory?
>> >> >
>> >> > do you have anything pax related in your environment / system
>> >> > properties?
>> >> >
>> >> > --
>> >> > Cheers, Stuart
>> >> >
>> >> >> I have this:
>> >> >>           <plugin>
>> >> >>               <groupId>org.ops4j</groupId>
>> >> >>               <artifactId>maven-pax-plugin</artifactId>
>> >> >>               <version>1.4</version>
>> >> >>               <configuration>
>> >> >>                   <profiles>web</profiles>
>> >> >>                   <provision>
>> >> >>                       <param>--platform=equinox</param>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> <param>--repositories=+http://scm.ops4j.org/repos/ops4j/projects/pax/runner-repository/</param>
>> >> >>                   </provision>
>> >> >>               </configuration>
>> >> >>           </plugin>
>> >> >>
>> >> >> But I still have to use this command:
>> >> >> mvn clean install pax:run -Dprofiles=web
>> >> >>
>> >> >> Here is what the debug says when I use that command (note that the
>> >> >> new
>> >> >> repository is not listed but everything seems to be working now):
>> >> >> [DEBUG] Starting Pax-Runner 0.20.0 with: [--profiles=web,
>> >> >> --platform=felix,
>> >> >> /opt/sandbox/googlecode/osgi-sample/runner/deploy-pom.xml,
>> >> >> --localRepository=/Users/azeckoski/.m2/repository,
>> >> >>
>> >> >>
>> >> >>
>> >> >> --repositories=http://repo1.maven.org/maven2,http://repository.ops4j.org/maven2/,
>> >> >> --overwriteUserBundles]
>> >> >>
>> >> >> If I do not specify the profiles on the command line then it runs
>> >> >> without them. I would really like to be able to put the profiles=web
>> >> >> into the pom file Also, it is still running felix even though I put
>> >> >> in
>> >> >> platform=equinox in the param. Am I doing something stupid with my
>> >> >> configuration?
>> >> >>
>> >> >> -AZ
>> >> >>
>> >> >>
>> >> >> On Sun, May 31, 2009 at 4:59 PM, Stuart McCulloch
>> >> >> <[email protected]>
>> >> >> wrote:
>> >> >> > 2009/5/31 Stuart McCulloch <[email protected]>
>> >> >> >>
>> >> >> >> 2009/5/31 Aaron Zeckoski <[email protected]>
>> >> >> >>>
>> >> >> >>> I am trying to run pax:run with a profile but I am getting
>> >> >> >>> failures
>> >> >> >>> ot
>> >> >> >>> just nothing:
>> >> >> >>>
>> >> >> >>> 1) When I try this in my <build> tag it does not install any
>> >> >> >>> profiles
>> >> >> >>> when I do mvn pax:run
>> >> >> >>>            <plugin>
>> >> >> >>>                <groupId>org.ops4j</groupId>
>> >> >> >>>                <artifactId>maven-pax-plugin</artifactId>
>> >> >> >>>                <version>1.4</version>
>> >> >> >>>                <configuration>
>> >> >> >>>                    <profiles>web</profiles>
>> >> >> >>>                </configuration>
>> >> >> >>>            </plugin>
>> >> >> >
>> >> >> > can you try this again? - I just copied the profiles from
>> >> >> > subversion
>> >> >> > to
>> >> >> > the
>> >> >> > OPS4J Maven repository
>> >> >> > and this now works for me... if it still does nothing then use
>> >> >> > "mvn
>> >> >> > pax:run
>> >> >> > -X", copy the part where
>> >> >> > it says what options it's sending to pax-runner, and paste it here
>> >> >> > -
>> >> >> > also
>> >> >> > paste the result of running
>> >> >> > "mvn help:effective-pom"
>> >> >> >
>> >> >> >>>
>> >> >> >>> 2) When I try this: mvn pax:run -Dprofiles=web
>> >> >> >>> I get this failure (adding log=debug doesn't produce any more
>> >> >> >>> info):
>> >> >> >
>> >> >> > "--log=debug" is a pax-runner setting, so you can either put this
>> >> >> > in
>> >> >> > a
>> >> >> > "pax-runner.args" file and use:
>> >> >> >
>> >> >> >    mvn pax:run "-Dargs=pax-runner.args"
>> >> >> >
>> >> >> > or configure the <args> setting in your pom:
>> >> >> >
>> >> >> >       <plugin>
>> >> >> >         <groupId>org.ops4j</groupId>
>> >> >> >         <artifactId>maven-pax-plugin</artifactId>
>> >> >> >         <version>1.4</version>
>> >> >> >         <configuration>
>> >> >> >           <args>runner.args</args>
>> >> >> >         </configuration>
>> >> >> >       </plugin>
>> >> >> >
>> >> >> > or instead list out the pax-runner settings in your pom:
>> >> >> >
>> >> >> >       <plugin>
>> >> >> >         <groupId>org.ops4j</groupId>
>> >> >> >         <artifactId>maven-pax-plugin</artifactId>
>> >> >> >         <version>1.4</version>
>> >> >> >         <configuration>
>> >> >> >           <provision>
>> >> >> >             <param>--profiles=web</param>
>> >> >> >             <param>--log=debug</param>
>> >> >> >           </provision>
>> >> >> >         </configuration>
>> >> >> >       </plugin>
>> >> >> >
>> >> >> > see
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > http://www.ops4j.org/projects/pax/construct/maven-pax-plugin/provision-mojo.html
>> >> >> > for Maven docs
>> >> >> >
>> >> >> >>> Pax Runner (0.20.0) from OPS4J - http://www.ops4j.org
>> >> >> >>> -----------------------------------------------------
>> >> >> >>>
>> >> >> >>>  -> Using config [classpath:META-INF/runner.properties]
>> >> >> >>>  -> Using only arguments from command line
>> >> >> >>>  -> Scan bundles from
>> >> >> >>> [/opt/sandbox/googlecode/osgi-sample/runner/deploy-pom.xml]
>> >> >> >>>  -> Scan bundles from
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> [scan-pom:file:/opt/sandbox/googlecode/osgi-sample/runner/deploy-pom.xml]
>> >> >> >>>  -> Using property [maven.tomcat.home=/opt/tomcat]
>> >> >> >>>  -> Using property [sakai.appserver.home=/opt/tomcat]
>> >> >> >>>  -> Using property [surefire.reportFormat=plain]
>> >> >> >>>  -> Using property [appserver.home=/opt/tomcat]
>> >> >> >>>  -> Using property [appserver.id=tomcat5x]
>> >> >> >>>  -> Using property [surefire.useFile=false]
>> >> >> >>>  -> Scan bundles from
>> >> >> >>>
>> >> >> >>> [scan-composite:mvn:org.ops4j.pax.runner.profiles/web//composite]
>> >> >> >>>
>> >> >> >>>         ___
>> >> >> >>>        /  /
>> >> >> >>>       /  / Oops, there has been a problem!
>> >> >> >>>      /  /
>> >> >> >>>     /__/   URL
>> >> >> >>> [mvn:org.ops4j.pax.runner.profiles/web//composite]
>> >> >> >>> could not be resolved.
>> >> >> >>>    ___
>> >> >> >>>   /__/     Use --log=debug to see details.
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> Has anyone used the plugin like this successfully?
>> >> >> >>> Help?
>> >> >> >>
>> >> >> >> Hi Aaron,
>> >> >> >>
>> >> >> >> This error occurs when you use the latest Pax-Runner (0.18.0 or
>> >> >> >> later)
>> >> >> >> with the 1.4 maven-pax-plugin
>> >> >> >>
>> >> >> >> Previously profiles were internal to Pax-Runner, but this meant
>> >> >> >> we
>> >> >> >> had
>> >> >> >> to
>> >> >> >> do a new release every time
>> >> >> >> we wanted to update one or more of the profiles. So in 0.18.0
>> >> >> >> Alin
>> >> >> >> externalized the profiles and stored
>> >> >> >> them on the OPS4J subversion* site. This means Pax-Runner needs
>> >> >> >> to
>> >> >> >> know
>> >> >> >> about this site.
>> >> >> >>
>> >> >> >> ( * for some reason the profiles aren't hosted on the OPS4J Maven
>> >> >> >> repository but kept in subversion )
>> >> >> >>
>> >> >> >> Now in the 1.4 maven-pax-plugin we currently take whatever
>> >> >> >> repositories
>> >> >> >> are configured in your project
>> >> >> >> and pass those onto Pax-Runner as the exact set of artifact
>> >> >> >> repositories
>> >> >> >> it should use - this means that
>> >> >> >> if you don't have the OPS4J subversion site set as a repository
>> >> >> >> in
>> >> >> >> your
>> >> >> >> Maven project then Pax-Runner
>> >> >> >> won't see the profiles, hence the error.
>> >> >> >>
>> >> >> >> ( by passing an explicit set of URLs we override the default list
>> >> >> >> that
>> >> >> >> now
>> >> >> >> includes the subversion site )
>> >> >> >>
>> >> >> >> There's an open issue covering this situation:
>> >> >> >> http://issues.ops4j.org/browse/PAXCONSTRUCT-106
>> >> >> >>
>> >> >> >> Meanwhile there are several workarounds:
>> >> >> >>
>> >> >> >>   1)  use an earlier version of Pax-Runner
>> >> >> >>
>> >> >> >>       <plugin>
>> >> >> >>         <groupId>org.ops4j</groupId>
>> >> >> >>         <artifactId>maven-pax-plugin</artifactId>
>> >> >> >>         <version>1.4</version>
>> >> >> >>         <configuration>
>> >> >> >>           <runner>0.17.0</runner>
>> >> >> >>           <!-- etc... -->
>> >> >> >>         </configuration>
>> >> >> >>       </plugin>
>> >> >> >>
>> >> >> >> OR
>> >> >> >>
>> >> >> >>   2)  add the OPS4J subversion site to your project
>> >> >> >>
>> >> >> >>       pax-add-repository -i ops4j-profile-repo -u
>> >> >> >> http://scm.ops4j.org/repos/ops4j/projects/pax/runner-repository/
>> >> >> >>
>> >> >> >> OR
>> >> >> >>
>> >> >> >>   3)  set the repositories flag yourself, which will override the
>> >> >> >> maven-pax-plugin computed list
>> >> >> >>
>> >> >> >>       <plugin>
>> >> >> >>         <groupId>org.ops4j</groupId>
>> >> >> >>         <artifactId>maven-pax-plugin</artifactId>
>> >> >> >>         <version>1.4</version>
>> >> >> >>         <configuration>
>> >> >> >>           <provision>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> <param>--repositories=+http://scm.ops4j.org/repos/ops4j/projects/pax/runner-repository/</param>
>> >> >> >>             <!-- etc... -->
>> >> >> >>           </provision>
>> >> >> >>         </configuration>
>> >> >> >>       </plugin>
>> >> >> >>
>> >> >> >> HTH
>> >> >> >>
>> >> >> >> --
>> >> >> >> Cheers, Stuart
>> >> >> >>
>> >> >> >> -AZ
>> >> >> >>
>> >> >> >> --
>> >> >> >> Aaron Zeckoski ([email protected])
>> >> >> >> Senior Research Engineer - CARET - Cambridge University
>> >> >> >> https://twitter.com/azeckoski -
>> >> >> >> http://www.linkedin.com/in/azeckoski
>> >> >> >> http://aaronz-sakai.blogspot.com/ -
>> >> >> >> http://confluence.sakaiproject.org/confluence/display/~aaronz/
>> >> >> >>
>> >> >> >> _______________________________________________
>> >> >> >> general mailing list
>> >> >> >> [email protected]
>> >> >> >> http://lists.ops4j.org/mailman/listinfo/general
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Cheers, Stuart
>> >> >> >
>> >> >> > _______________________________________________
>> >> >> > general mailing list
>> >> >> > [email protected]
>> >> >> > http://lists.ops4j.org/mailman/listinfo/general
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Aaron Zeckoski ([email protected])
>> >> >> Senior Research Engineer - CARET - Cambridge University
>> >> >> https://twitter.com/azeckoski - http://www.linkedin.com/in/azeckoski
>> >> >> http://aaronz-sakai.blogspot.com/ -
>> >> >> http://confluence.sakaiproject.org/confluence/display/~aaronz/
>> >> >>
>> >> >> _______________________________________________
>> >> >> general mailing list
>> >> >> [email protected]
>> >> >> http://lists.ops4j.org/mailman/listinfo/general
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > general mailing list
>> >> > [email protected]
>> >> > http://lists.ops4j.org/mailman/listinfo/general
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Aaron Zeckoski ([email protected])
>> >> Senior Research Engineer - CARET - Cambridge University
>> >> https://twitter.com/azeckoski - http://www.linkedin.com/in/azeckoski
>> >> http://aaronz-sakai.blogspot.com/ -
>> >> http://confluence.sakaiproject.org/confluence/display/~aaronz/
>> >>
>> >> _______________________________________________
>> >> general mailing list
>> >> [email protected]
>> >> http://lists.ops4j.org/mailman/listinfo/general
>> >
>> >
>> >
>> > --
>> > Cheers, Stuart
>> >
>> > _______________________________________________
>> > general mailing list
>> > [email protected]
>> > http://lists.ops4j.org/mailman/listinfo/general
>> >
>> >
>>
>>
>>
>> --
>> Aaron Zeckoski ([email protected])
>> Senior Research Engineer - CARET - Cambridge University
>> https://twitter.com/azeckoski - http://www.linkedin.com/in/azeckoski
>> http://aaronz-sakai.blogspot.com/ -
>> http://confluence.sakaiproject.org/confluence/display/~aaronz/
>>
>> _______________________________________________
>> general mailing list
>> [email protected]
>> 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
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/general
>
>



-- 
Aaron Zeckoski ([email protected])
Senior Research Engineer - CARET - Cambridge University
https://twitter.com/azeckoski - http://www.linkedin.com/in/azeckoski
http://aaronz-sakai.blogspot.com/ -
http://confluence.sakaiproject.org/confluence/display/~aaronz/

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to