2009/6/1 Aaron Zeckoski <azecko...@vt.edu>

> 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.
>
> 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?
>

all of this sounds like it's not picking up your local POM - I'll check out
your project from svn and try it locally


> -AZ
>
>
> On Sun, May 31, 2009 at 4:59 PM, Stuart McCulloch <mccu...@gmail.com>
> wrote:
> > 2009/5/31 Stuart McCulloch <mccu...@gmail.com>
> >>
> >> 2009/5/31 Aaron Zeckoski <azecko...@vt.edu>
> >>>
> >>> 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 (aar...@vt.edu)
> >> 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/<http://confluence.sakaiproject.org/confluence/display/%7Eaaronz/>
> >>
> >> _______________________________________________
> >> general mailing list
> >> general@lists.ops4j.org
> >> http://lists.ops4j.org/mailman/listinfo/general
> >>
> >
> >
> >
> > --
> > Cheers, Stuart
> >
> > _______________________________________________
> > general mailing list
> > general@lists.ops4j.org
> > http://lists.ops4j.org/mailman/listinfo/general
> >
> >
>
>
>
> --
> Aaron Zeckoski (aar...@vt.edu)
> 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/<http://confluence.sakaiproject.org/confluence/display/%7Eaaronz/>
>
> _______________________________________________
> general mailing list
> general@lists.ops4j.org
> http://lists.ops4j.org/mailman/listinfo/general
>



-- 
Cheers, Stuart
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to