glad to hear the custom mojo solution is working for you Saludos Cordiales desde EEUU! Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Tue, 16 Jun 2009 10:12:00 -0400 > Subject: Re: Custom lifecycle. Changing the default resource plugin > confiduration. > From: [email protected] > To: [email protected] > > Martin, > Using an archetype for this is a good workaround. I may actually make an > archetype for this kind of projects. > I ended up writing a mojo and binding it to the initialize phase. In this > mojo I change the output directory. This seems to work fine. > Muchas gracias por tu ayuda. > > Cheers. > > Erick. > > On Mon, Jun 15, 2009 at 5:49 PM, Martin Gainty <[email protected]> wrote: > > > > > > > http://maven.apache.org/plugins/maven-archetype-plugin/examples/create-with-property-file.html > > > > create the archetype with included properties to create a catalog > > $ cat archetype.properties > > archetype.groupId=my.group.id > > archetype.artifactId=archetype-with-properties > > archetype.version=2.0 > > archetype.filteredExtensions=java > > archetype.languages=groovy > > an_additional_property=my specific value > > output-directory=/usr/erick/theme > > //create archetype > > $ cd some-project > > $ mvn archetype:create-from-project > > -Darchetype.properties=../archetype.properties > > > > //install the archetype > > $ cd target/generated-sources/archetype/ > > $ mvn install > > //run it > > $ mvn archetype:generate -DarchetypeCatalog=local > > Ayuda? > > > > Martin Gainty > > ______________________________________________ > > Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité > > > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte > > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht > > dient lediglich dem Austausch von Informationen und entfaltet keine > > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von > > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le > > destinataire prévu, nous te demandons avec bonté que pour satisfaire > > informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie > > de ceci est interdite. Ce message sert à l'information seulement et n'aura > > pas n'importe quel effet légalement obligatoire. Étant donné que les email > > peuvent facilement être sujets à la manipulation, nous ne pouvons accepter > > aucune responsabilité pour le contenu fourni. > > > > > > > > > > > Date: Mon, 15 Jun 2009 14:42:13 -0400 > > > Subject: Re: Custom lifecycle. Changing the default resource plugin > > confiduration. > > > From: [email protected] > > > To: [email protected] > > > > > > As a last resource solution yes. > > > The thing is I don't want to force the clients of the plugin to have to > > do > > > this. instead i just want them to declared an specific packaging type and > > > that's it. > > > Unfortunately they will have to still define the my theme plugin in their > > > poms.xml as it needs to have the extensions parameter set to true; but > > > forcing them to also define the resources plugin to change this > > particular > > > configuration parameter is plain wrong. > > > There most be another way of doing this that does not involve the clients > > of > > > the plugins doing anything special; that's what I am looking for. > > > > > > Gracias nuevamente. > > > > > > Erick. > > > > > > > > > On Mon, Jun 15, 2009 at 2:15 PM, Martin Gainty <[email protected]> > > wrote: > > > > > > > > > > > de nada > > > > > > > > can you use a configuration parameter for output-directory? > > > > <plugin> > > > > <groupId>sample.plugin</groupId> > > > > <artifactId>maven-erick-plugin</artifactId> > > > > <version>1.0</version> > > > > <configuration> > > > > <output-directory>theme</output-directory> > > > > </configuration> > > > > </plugin> > > > > > > http://maven.apache.org/guides/plugin/guide-java-plugin-development.html > > > > > > > > Quizas? > > > > Martin > > > > ______________________________________________ > > > > Verzicht und Vertraulichkeitanmerkung/Note de déni et de > > confidentialité > > > > > > > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > > > > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede > > unbefugte > > > > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese > > Nachricht > > > > dient lediglich dem Austausch von Informationen und entfaltet keine > > > > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von > > > > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > > > > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas > > le > > > > destinataire prévu, nous te demandons avec bonté que pour satisfaire > > > > informez l'expéditeur. N'importe quelle diffusion non autorisée ou la > > copie > > > > de ceci est interdite. Ce message sert à l'information seulement et > > n'aura > > > > pas n'importe quel effet légalement obligatoire. Étant donné que les > > email > > > > peuvent facilement être sujets à la manipulation, nous ne pouvons > > accepter > > > > aucune responsabilité pour le contenu fourni. > > > > > > > > > > > > > > > > > > > > > Date: Mon, 15 Jun 2009 13:50:32 -0400 > > > > > Subject: Re: Custom lifecycle. Changing the default resource plugin > > > > confiduration. > > > > > From: [email protected] > > > > > To: [email protected] > > > > > > > > > > *Martin, > > > > > I don't think that will work here as maven it self is the one calling > > the > > > > > copy-resources goal on the resources-plugin. What I need is a > > declarative > > > > > way to pass the output directory into maven from within my plugin. > > > > > > > > > > Gracias. > > > > > > > > > > Erick > > > > > * > > > > > On Mon, Jun 15, 2009 at 1:32 PM, Martin Gainty <[email protected]> > > > > wrote: > > > > > > > > > > > > > > > > > Hi Erick > > > > > > > > > > > > could you call resources:copyResources -DoutputDirectory=/theme > > > > > > > > > > > > > > > > > > > > > > > > http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html > > > > > > ? > > > > > > Saludos Cordiales > > > > > > Martin > > > > > > ______________________________________________ > > > > > > Verzicht und Vertraulichkeitanmerkung/Note de déni et de > > > > confidentialité > > > > > > > > > > > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > > > > > > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede > > > > unbefugte > > > > > > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese > > > > Nachricht > > > > > > dient lediglich dem Austausch von Informationen und entfaltet keine > > > > > > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit > > von > > > > > > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > > > > > > Ce message est confidentiel et peut être privilégié. Si vous n'êtes > > pas > > > > le > > > > > > destinataire prévu, nous te demandons avec bonté que pour > > satisfaire > > > > > > informez l'expéditeur. N'importe quelle diffusion non autorisée ou > > la > > > > copie > > > > > > de ceci est interdite. Ce message sert à l'information seulement et > > > > n'aura > > > > > > pas n'importe quel effet légalement obligatoire. Étant donné que > > les > > > > email > > > > > > peuvent facilement être sujets à la manipulation, nous ne pouvons > > > > accepter > > > > > > aucune responsabilité pour le contenu fourni. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Date: Mon, 15 Jun 2009 11:49:43 -0400 > > > > > > > Subject: Fwd: Custom lifecycle. Changing the default resource > > plugin > > > > > > confiduration. > > > > > > > From: [email protected] > > > > > > > To: [email protected] > > > > > > > > > > > > > > Brett, > > > > > > > I went through the doc you send me below but could nor find an > > answer > > > > to > > > > > > my > > > > > > > question there. > > > > > > > I have redefined the lifecycle in my components.xml as follows: > > > > > > > > > > > > > > <component-set> > > > > > > > <components> > > > > > > > <component> > > > > > > > > > > > > > <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> > > > > > > > <role-hint>cstheme</role-hint> > > > > > > > > > > > > > > > > > > > > > > > > > > <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation> > > > > > > > <configuration> > > > > > > > <phases> > > > > > > > > > > > > > > > > > > > > > > > > > > <process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources> > > > > > > > > > > > > > > > > <package>com.syncapse.clearspace:maven-theme-plugin:package</package> > > > > > > > > > > > > > > > > > > > > <install>org.apache.maven.plugins:maven-install-plugin:install</install> > > > > > > > </phases> > > > > > > > </configuration> > > > > > > > </component> > > > > > > > </components> > > > > > > > </component-set> > > > > > > > > > > > > > > It is all working fine except for the fact that I need to > > resources > > > > > > plugin > > > > > > > to output all the resources into a folder called theme instead of > > the > > > > > > > default classes. This is to ease the creation of a zip file that > > most > > > > > > have > > > > > > > all content inside one single directory at the root of the zip > > (the > > > > theme > > > > > > > directory). > > > > > > > How can I do this from inside a plugin?? > > > > > > > > > > > > > > Thanks a lot. > > > > > > > > > > > > > > Erick. > > > > > > > > > > > > > > > > > > > > > ---------- Forwarded message ---------- > > > > > > > From: Brett Porter <[email protected]> > > > > > > > Date: Fri, Jun 12, 2009 at 11:57 PM > > > > > > > Subject: Re: Custom lifecycle. Changing the default resource > > plugin > > > > > > > confiduration. > > > > > > > To: Maven Developers List <[email protected]> > > > > > > > > > > > > > > > > > > > > > This is still a more appropriate question for > > [email protected], > > > > as > > > > > > > this is the list for development on maven and its plugins itself. > > I'd > > > > be > > > > > > > happy to follow up on the thread there. > > > > > > > > > > > > > > To help you along, you don't need to overwrite the default > > lifecycle > > > > - > > > > > > just > > > > > > > bind different goals to it. You can't configure goals when you do > > > > that - > > > > > > I'm > > > > > > > a bit unsure whether you are putting your plugin in there, or the > > > > > > resources > > > > > > > plugin, or both. What you are likely looking to do is extend the > > > > > > resources > > > > > > > plugin with the new configuration and functionality and bind that > > by > > > > > > > default. > > > > > > > > > > > > > > An example of declaring a new packaging type is here: > > > > > > > > > > > > > > > > > > > http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/guides/introduction/introduction-to-the-lifecycle.apt?revision=501590 > > > > > > > > > > > > > > > > > > > > > On 13/06/2009, at 6:37 AM, Erick Dovale wrote: > > > > > > > > > > > > > > Folks, > > > > > > > > I am writing a plugin that builds an artifact that needs no > > > > compilation > > > > > > or > > > > > > > > tests whatsever as it is only resources. > > > > > > > > I am overwriting the default lifecycle to only run the > > resources > > > > > > phases, > > > > > > > > the > > > > > > > > packaging phases and the install phases. > > > > > > > > I need to change the resource plugin configuration to write the > > > > file to > > > > > > a > > > > > > > > folder other than classes. How can I achieve this from a > > plugin? > > > > > > > > > > > > > > > > Thanks. > > > > > > > > > > > > > > > > Erick. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > To unsubscribe, e-mail: [email protected] > > > > > > > For additional commands, e-mail: [email protected] > > > > > > > > > > > > _________________________________________________________________ > > > > > > Insert movie times and more without leaving Hotmail®. > > > > > > > > > > > > > > > > > > http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009 > > > > > > > > > > > > > > _________________________________________________________________ > > > > Windows Live™ SkyDrive™: Get 25 GB of free online storage. > > > > > > http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009 > > > > _________________________________________________________________ > > Insert movie times and more without leaving Hotmail®. > > > > http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009 > > _________________________________________________________________ Lauren found her dream laptop. Find the PC that’s right for you. http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
