Re: Is there a guide on how to use Sisu within Maven plugins?
So basically it is still the same issue as a week or so ago: how to select a different implementation for an interface. Doing this within your code: AFAIK that's not possible, and I wonder if even JSR330 supports it. If you don't specify a specific hint (or name), the default implementation will be used. If you want a specific implementation, you need to specify it. With Plexus this is possible: @Requirement private MapserviceMap; this will give you all the available SomeServices, where the key maps to the hint. Now you can easily pick the preferred instance. Back to why you want this: You want another ArchetypeGenerationQueryer. This means that on the places where this is injected, you don't want the default instance, but instead a Map, so you can select one. A pull request for the Maven Archetype project is required here. This is the most clean solution. There might be different solution, but that means you need to get access to the Guice context and re-bind the service to a new implementation. I wonder if that'll work. Robert On Wed, 01 Feb 2017 23:32:29 +0100, Laird Nelson wrote: On Wed, Feb 1, 2017 at 1:27 PM Robert Scholte wrote: bq. If you want to use JSR-330, you must understand that your code won't be compatible with Maven 2 or 3.0.x but only with Maven 3.1.0+ this is probably the reason why *I* haven't seen it used that much. Sure. In my case, this won't matter. Your confusion is probably coming from 2 different descriptors, which both use @Component. No, I'm aware of both of them. I'm interested indirectly in the Maven plugin API @Component, which indirectly causes a element/stanza in the plugin.xml. I know that part. What I *don't* know (still!) is how, as an end user, to alter the *components.xml* that is *already present* in the maven-archetype-plugin (the plugin whose component selection I want to override) such that *my* implementation is chosen instead of the default one. I was hoping to use Sisu/Guice/something else to accomplish this since there doesn't seem to be any documented way to do it using Plexus constructs. Thanks again for your help. Best, Laird - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[ANN] Build Helper Maven Plugin Version 3.0.0 Released
Hi, The Mojo team is pleased to announce the release of the Build Helper Maven Plugin version 3.0.0 This plugin contains various small independent goals to assist with the Maven build lifecycle. Web Site: http://www.mojohaus.org/build-helper-maven-plugin/ To get this update, simply specify the version in your project's plugin configuration: org.codehaus.mojo build-helper-maven-plugin 3.0.0 https://github.com/mojohaus/build-helper-maven-plugin/milestone/3?closed=1 The Mojo team. Karl Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Generating xdoc content to be included into site
I have tried to to set siteDirectory to be target/generated-site But it doesn't work very well on my multi-module project On Thu, Feb 2, 2017 at 1:02 AM, Maxim Solodovnikwrote: > One additional question, > > I'm generating site.xml during pre-site phase and storing it into > target/generated-site/site.xml > But it seems to be not used > Is it by design? Or maybe I'm doing something wrong? > > On Wed, Feb 1, 2017 at 8:16 PM, Maxim Solodovnik > wrote: > > Thanks a lot! > > Works as expected! > > > > On Wed, Feb 1, 2017 at 7:03 PM, Lukas Theussl > wrote: > >> > >> Heya, > >> > >> Try ${project.build.directory}/generated-site or change the > >> generatedSiteDirectory parameter, see > >> > >> https://maven.apache.org/plugins/maven-site-plugin/site-mojo.html# > generatedSiteDirectory > >> > >> HTH, > >> -Lukas > >> > >> > >> > >> Am 01.02.2017 um 11:49 schrieb Maxim Solodovnik: > >>> > >>> Hello Karl, > >>> > >>> Thanks a lot for the quick response > >>> pre-site phase is being called if I'm using "mvn site" > >>> but XML files from target/generated-sources/site/xdoc/ are not being > >>> used while site generation ... > >>> Should it be generated to the different folder? > >>> > >>> On Wed, Feb 1, 2017 at 3:52 PM, Karl Heinz Marbaise > > >>> wrote: > > Hi, > > On 01/02/17 06:52, Maxim Solodovnik wrote: > > > > Hello All, > > > > I wonder is it possible to generate content for maven site plugin? > > We are using xdoc for our site. I would like to generate source using > > xml-maven-plugin. > > > > Right now I do it in generate-sources phase and polluting > src/site/xdoc/ > > folder > > I tried to change the process as follows: > > 1) generate site source in pre-site phase > > 2) put generated content into > > ${project.build.directory}/generated-sources/site/xdoc/ > > > > unfortunately it doesn't work this way :( > > It seems pre-site phase is not being called during mvn site:site :( > > What am I doing wrong? > > > If you call site:site you call the goal of the plugin and NOT the life > cycle. You need to call mvn site instead than pre-site and site life > cycle > phases will run... > > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > >>> > >>> > >> > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >> For additional commands, e-mail: users-h...@maven.apache.org > >> > > > > > > > > -- > > WBR > > Maxim aka solomax > > > > -- > WBR > Maxim aka solomax > -- WBR Maxim aka solomax
Re: Is there a guide on how to use Sisu within Maven plugins?
On Thu, Feb 2, 2017 at 1:51 AM Robert Scholtewrote: > So basically it is still the same issue as a week or so ago: how to select > a different implementation for an interface. > Doing this within your code: > AFAIK that's not possible, and I wonder if even JSR330 supports it. > Thanks. The additional information I had this time was a better understanding of how Plexus, Sisu and Guice were all tied together. I thought that perhaps like CDI or HK2 I could specify somewhere else which implementation I wanted selected when no hint was provided, but perhaps Guice doesn't work like that (I don't know it), and Sisu…my understanding is that's a shim that does a form of autowiring for Guice. > If you don't specify a specific hint (or name), the default implementation > will be used. > OK, thanks! Isn't that just the same as…just using the default implementation, without having to go through the injection mechanism? I guess injection in this case is buying you configuration. Best, Laird