Multi Module CVS Checkout
Hi Everyone - I'm having a problem checking out the code from my multi module project - it's very frustrating and I've been working on it for a few days, so any help anyone can provide will be greatly appreciated. I posted this question to the user's list and didn't get much of a response so I wanted to give the dev list a try. Here's the background - I have a multi module project where the parent project is just used for meta data- in other words there is no code associated with the parent, it's just used to configure settings common to all child projects. It builds nothing and its packaging is set to POM. I'm trying to check out my code from CVS -- 1. If I put the SCM element in the child pom's and remove it from the parent then run mvn scm:checkout from the parent directory, I get the error: Cannot run checkout command : Embedded error: Can't load the scm provider. You need to define a connectionUrl parameter I see no connectionUrl parameter within the SCM documentation. -- 2. If I put the SCM element in the parent pom and remove it from the child pom's then run the mvn scm:checkout from the parent directory, I get the error: [ERROR] cvs server: cannot find module `reviewmanager' - ignored cvs server: cannot find module `reviewmanager' - ignored [ERROR] BUILD ERROR Here it's trying to checkout the artifactId of reviewmanager, which is the artifactId for the parent. However since the packaging is set to POM, I'd think Maven would skip the parent knowing that it's a project for meta data only My scm configuration for the top 2 tries is structured like this: scm connectionscm:cvs:pserver:herestheuser:heresthepassw...@server.domain: /ABC/DEF:${artifactId}/connection developerConnectionscm:cvs:pserver:herestheuser:heresthepassw...@serve r.domain:/ABC/DEF:${artifactId}/developerConnection tagHEAD/tag /scm -- 3. If I keep the configuration in the parent and remove the artifactId from the connection / developerConnection and then run mvn scm:checkout then I get the following error: Cannot run checkout command Embedded error: Exception while executing SCM command Username isn't defined. The scm config for this last attempt is like this: scm connectionscm:cvs:pserver:herestheuser:heresthepassw...@server.domain: /ABC/DEF/connection developerConnectionscm:cvs:pserver:herestheuser:heresthepassw...@serve r.domain:/ABC/DEF/developerConnection tagHEAD/tag /scm -- 4. If I take the same configuration (as used in the top 2 examples With the ${artifactId}) and put it in any of the child pom's and then run the mvn scm:checkout from the Child Directory, then it works fine. This seems like it would be a very common usecase so I'm surprised I can't find more information about it on the web. Maybe I'm doing a bad job searching. Tom House Software Engineer 617-273-3126
can't change outputDirectory for maven-surefire-report-plugin
I googled for an answer with no luck, so I posted this to the user list on June 7 but have had no response. I'm hoping somebody on the dev list can help. Using the following configuration, the site reports end up C:/opt/builds/releases/${branch}/${module}/siteReports as I expect. The test reports, however, keep getting placed under target/surefire-reports. I've tried with and without the reportsDirectory and I've tried reversing the order of the maven-site-plugin and the maven-surefire-report-plugin stanzas inside of plugins. Can somebody please tell me how I can make the maven-surefire-report-plugin put the test reports in a directory that I specify? reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId version2.0.1/version configuration outputDirectoryC:/opt/builds/releases/${branch}/$ {module}/siteReports/outputDirectory /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId version2.5/version inheritedfalse/inherited configuration reportsDirectoryC:/opt/builds/releases/${branch}/$ {module}/testReports/reportsDirectory outputDirectoryC:/opt/builds/releases/${branch}/$ {module}/testReports/outputDirectory /configuration /plugin /plugins /reporting Many thanks, Tony
maven downloads snapshots even if they have not changed
Dear valued Maven Developers I would greatly appreciate if someone could shed a more detailed light on the algorithm/strategy behind snapshot checking/downloading. I already posted this on the user list, but did not receive a reaction: http://maven.40175.n5.nabble.com/maven-downloads-snapshots-even-if-they-have-not-changed-td136030.html. We basically fight with the same problem as is described in these (unanswered) questions: http://maven.40175.n5.nabble.com/Snapshot-download-frequency-always-is-too-much-td89643.html http://maven.40175.n5.nabble.com/Dependencies-downloading-for-snapshot-in-Maven-2-0-5-and-up-td87906.html http://maven.40175.n5.nabble.com/maven-downloading-SNAPSHOTs-which-have-not-changed-td126870.html http://maven.40175.n5.nabble.com/Snapshot-updates-versus-local-repo-td87299.html Regards Reto Höhener
Re: Multi Module CVS Checkout
Thomas, you asked the very same question yesterday. And also a few days before that, IIRC. Please don't spam the list! As Justin pointed out yesterday, there may be several reasons that nobody answers. Posting the same question every day will not make people give you the solution any quicker. /Anders On Tue, Jun 15, 2010 at 00:33, House, Thomas thomas.ho...@mckesson.comwrote: Hi Everyone - I'm having a problem checking out the code from my multi module project - it's very frustrating and I've been working on it for a few days, so any help anyone can provide will be greatly appreciated. I posted this question to the user's list and didn't get much of a response so I wanted to give the dev list a try. Here's the background - I have a multi module project where the parent project is just used for meta data- in other words there is no code associated with the parent, it's just used to configure settings common to all child projects. It builds nothing and its packaging is set to POM. I'm trying to check out my code from CVS -- 1. If I put the SCM element in the child pom's and remove it from the parent then run mvn scm:checkout from the parent directory, I get the error: Cannot run checkout command : Embedded error: Can't load the scm provider. You need to define a connectionUrl parameter I see no connectionUrl parameter within the SCM documentation. -- 2. If I put the SCM element in the parent pom and remove it from the child pom's then run the mvn scm:checkout from the parent directory, I get the error: [ERROR] cvs server: cannot find module `reviewmanager' - ignored cvs server: cannot find module `reviewmanager' - ignored [ERROR] BUILD ERROR Here it's trying to checkout the artifactId of reviewmanager, which is the artifactId for the parent. However since the packaging is set to POM, I'd think Maven would skip the parent knowing that it's a project for meta data only My scm configuration for the top 2 tries is structured like this: scm connectionscm:cvs:pserver:herestheuser:heresthepassw...@server.domain: /ABC/DEF:${artifactId}/connection developerConnectionscm:cvs:pserver:herestheuser:heresthepassw...@serve r.domain:/ABC/DEF:${artifactId}/developerConnection tagHEAD/tag /scm -- 3. If I keep the configuration in the parent and remove the artifactId from the connection / developerConnection and then run mvn scm:checkout then I get the following error: Cannot run checkout command Embedded error: Exception while executing SCM command Username isn't defined. The scm config for this last attempt is like this: scm connectionscm:cvs:pserver:herestheuser:heresthepassw...@server.domain: /ABC/DEF/connection developerConnectionscm:cvs:pserver:herestheuser:heresthepassw...@serve r.domain:/ABC/DEF/developerConnection tagHEAD/tag /scm -- 4. If I take the same configuration (as used in the top 2 examples With the ${artifactId}) and put it in any of the child pom's and then run the mvn scm:checkout from the Child Directory, then it works fine. This seems like it would be a very common usecase so I'm surprised I can't find more information about it on the web. Maybe I'm doing a bad job searching. Tom House Software Engineer 617-273-3126
Re: How to get the execution id from a plugin
Giuseppe.Greco wrote: private void execute() throws MojoExecutionException { /* I need to get the execution id here */ } /** * @parameter default-value=${mojoExecution} * @readonly */ private MojoExecution mojoExecution; and mojoExecution.getId(); should do. I only can't tell since what Maven version that works. Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
RE: How to get the execution id from a plugin
no..if your plugin is bound to a phase of the default-lifecycle (unless overidden at command-line) i dont know if this requested enhancement has been coded? http://docs.codehaus.org/display/MAVENUSER/Default+Plugin+Execution+IDs is there an enhancement underway? 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, 15 Jun 2010 15:48:47 +0200 From: benjamin.bentm...@udo.edu To: dev@maven.apache.org Subject: Re: How to get the execution id from a plugin Giuseppe.Greco wrote: private void execute() throws MojoExecutionException { /* I need to get the execution id here */ } /** * @parameter default-value=${mojoExecution} * @readonly */ private MojoExecution mojoExecution; and mojoExecution.getId(); should do. I only can't tell since what Maven version that works. Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
RE: How to get the execution id from a plugin
... it does not compile because the central repository does not contain artifact maven-plugin-plugin :-( Jeff -Original Message- From: Benjamin Bentmann [mailto:benjamin.bentm...@udo.edu] Sent: Tuesday, June 15, 2010 3:49 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin Giuseppe.Greco wrote: private void execute() throws MojoExecutionException { /* I need to get the execution id here */ } /** * @parameter default-value=${mojoExecution} * @readonly */ private MojoExecution mojoExecution; and mojoExecution.getId(); should do. I only can't tell since what Maven version that works. Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account i...@b-source.ch and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use regular mail or courier services for any information intended to be confidential. However, by sending us messages through e-mail, you authorize and instruct us to correspond by e-mail in the relevant matter. Thank you. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: How to get the execution id from a plugin
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugin-plugin/ On Jun 15, 2010, at 10:49 AM, giuseppe.gr...@b-source.ch giuseppe.gr...@b-source.ch wrote: ... it does not compile because the central repository does not contain artifact maven-plugin-plugin :-( Jeff -Original Message- From: Benjamin Bentmann [mailto:benjamin.bentm...@udo.edu] Sent: Tuesday, June 15, 2010 3:49 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin Giuseppe.Greco wrote: private void execute() throws MojoExecutionException { /* I need to get the execution id here */ } /** * @parameter default-value=${mojoExecution} * @readonly */ private MojoExecution mojoExecution; and mojoExecution.getId(); should do. I only can't tell since what Maven version that works. Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account i...@b-source.ch and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use regular mail or courier services for any information intended to be confidential. However, by sending us messages through e-mail, you authorize and instruct us to correspond by e-mail in the relevant matter. Thank you. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl -
RE: How to get the execution id from a plugin
Found... but version 2.6 does not contain class MojoExecution and the code below does not compile. -Original Message- From: Jason van Zyl [mailto:ja...@sonatype.com] Sent: Tuesday, June 15, 2010 4:51 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-p lugin-plugin/ On Jun 15, 2010, at 10:49 AM, giuseppe.gr...@b-source.ch giuseppe.gr...@b-source.ch wrote: ... it does not compile because the central repository does not contain artifact maven-plugin-plugin :-( Jeff -Original Message- From: Benjamin Bentmann [mailto:benjamin.bentm...@udo.edu] Sent: Tuesday, June 15, 2010 3:49 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin Giuseppe.Greco wrote: private void execute() throws MojoExecutionException { /* I need to get the execution id here */ } /** * @parameter default-value=${mojoExecution} * @readonly */ private MojoExecution mojoExecution; and mojoExecution.getId(); should do. I only can't tell since what Maven version that works. Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account i...@b-source.ch and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use regular mail or courier services for any information intended to be confidential. However, by sending us messages through e-mail, you authorize and instruct us to correspond by e-mail in the relevant matter. Thank you. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account i...@b-source.ch and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use regular mail or courier services for any information intended to be confidential. However, by sending us messages through e-mail, you authorize and instruct us to correspond by e-mail in the relevant matter. Thank you. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: How to get the execution id from a plugin
Yes, I realize. Look at an existing plugin and start with that. Or use the Maven Plugin archteype. If you don't know what I'm talking about then read this: http://www.sonatype.com/products/maven/documentation/book-defguide On Jun 15, 2010, at 11:04 AM, giuseppe.gr...@b-source.ch giuseppe.gr...@b-source.ch wrote: Found... but version 2.6 does not contain class MojoExecution and the code below does not compile. -Original Message- From: Jason van Zyl [mailto:ja...@sonatype.com] Sent: Tuesday, June 15, 2010 4:51 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-p lugin-plugin/ On Jun 15, 2010, at 10:49 AM, giuseppe.gr...@b-source.ch giuseppe.gr...@b-source.ch wrote: ... it does not compile because the central repository does not contain artifact maven-plugin-plugin :-( Jeff -Original Message- From: Benjamin Bentmann [mailto:benjamin.bentm...@udo.edu] Sent: Tuesday, June 15, 2010 3:49 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin Giuseppe.Greco wrote: private void execute() throws MojoExecutionException { /* I need to get the execution id here */ } /** * @parameter default-value=${mojoExecution} * @readonly */ private MojoExecution mojoExecution; and mojoExecution.getId(); should do. I only can't tell since what Maven version that works. Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account i...@b-source.ch and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use regular mail or courier services for any information intended to be confidential. However, by sending us messages through e-mail, you authorize and instruct us to correspond by e-mail in the relevant matter. Thank you. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account i...@b-source.ch and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use regular mail or courier services for any information intended to be confidential. However, by sending us messages through e-mail, you authorize and instruct us to correspond by e-mail in the relevant matter. Thank you. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - A language that doesn’t affect the way you think about programming is not worth knowing. -— Alan Perlis
Re: How to get the execution id from a plugin
Giuseppe.Greco wrote: Found... but version 2.6 does not contain class MojoExecution and the code below does not compile. I don't really understand what you're trying to do when you *depend* on the maven-plugin-plugin, usually it's just used to built your plugin's metadata. MojoExecution is part of maven-core-X.jar Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
RE: How to get the execution id from a plugin
Finally I was able to compile it... but it does not work. I created a base class like this: public abstract class ContextAbstractMojo extends AbstractMojo { /** * The execution ID as defined in the POM. * * @parameter default-value=${mojoExecution}} * @readonly */ private MojoExecution execution; /** * The context ID as an alternative to the execution ID. */ //private String context; /** * Gets the execution ID as defined in the POM. * * @return The execution ID. */ protected String getExecutionID() { String executionId = null; if (execution != null) executionId = execution.getExecutionId(); return executionId } public abstract void execute() throws MojoExecutionException; } Then, when I try to execute the concrete mojo, I always get the following error message: Cause: Cannot assign configuration entry 'execution' to 'class org.apache.maven.plugin.MojoExecution' from 'null', which is of type class java.lang.String As far as I know this should work starting from Maven 2.0 (I'm using version 2.2). Any idea? Jeff -Original Message- From: Jason van Zyl [mailto:ja...@sonatype.com] Sent: Tuesday, June 15, 2010 5:14 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin Yes, I realize. Look at an existing plugin and start with that. Or use the Maven Plugin archteype. If you don't know what I'm talking about then read this: http://www.sonatype.com/products/maven/documentation/book-defguide On Jun 15, 2010, at 11:04 AM, giuseppe.gr...@b-source.ch giuseppe.gr...@b-source.ch wrote: Found... but version 2.6 does not contain class MojoExecution and the code below does not compile. -Original Message- From: Jason van Zyl [mailto:ja...@sonatype.com] Sent: Tuesday, June 15, 2010 4:51 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-p lugin-plugin/ On Jun 15, 2010, at 10:49 AM, giuseppe.gr...@b-source.ch giuseppe.gr...@b-source.ch wrote: ... it does not compile because the central repository does not contain artifact maven-plugin-plugin :-( Jeff -Original Message- From: Benjamin Bentmann [mailto:benjamin.bentm...@udo.edu] Sent: Tuesday, June 15, 2010 3:49 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin Giuseppe.Greco wrote: private void execute() throws MojoExecutionException { /* I need to get the execution id here */ } /** * @parameter default-value=${mojoExecution} * @readonly */ private MojoExecution mojoExecution; and mojoExecution.getId(); should do. I only can't tell since what Maven version that works. Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account i...@b-source.ch and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use regular mail or courier services for any information intended to be confidential. However, by sending us messages through e-mail, you authorize and instruct us to correspond by e-mail in the relevant matter. Thank you. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account i...@b-source.ch and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use
Re: How to get the execution id from a plugin
On 15 June 2010 16:31, giuseppe.gr...@b-source.ch wrote: Finally I was able to compile it... but it does not work. I created a base class like this: public abstract class ContextAbstractMojo extends AbstractMojo { /** * The execution ID as defined in the POM. * * @parameter default-value=${mojoExecution}} you have a syntax error here, try using only one closing } * @readonly */ private MojoExecution execution; /** * The context ID as an alternative to the execution ID. */ //private String context; /** * Gets the execution ID as defined in the POM. * * @return The execution ID. */ protected String getExecutionID() { String executionId = null; if (execution != null) executionId = execution.getExecutionId(); return executionId } public abstract void execute() throws MojoExecutionException; } Then, when I try to execute the concrete mojo, I always get the following error message: Cause: Cannot assign configuration entry 'execution' to 'class org.apache.maven.plugin.MojoExecution' from 'null', which is of type class java.lang.String As far as I know this should work starting from Maven 2.0 (I'm using version 2.2). Any idea? Jeff -Original Message- From: Jason van Zyl [mailto:ja...@sonatype.com] Sent: Tuesday, June 15, 2010 5:14 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin Yes, I realize. Look at an existing plugin and start with that. Or use the Maven Plugin archteype. If you don't know what I'm talking about then read this: http://www.sonatype.com/products/maven/documentation/book-defguide On Jun 15, 2010, at 11:04 AM, giuseppe.gr...@b-source.ch giuseppe.gr...@b-source.ch wrote: Found... but version 2.6 does not contain class MojoExecution and the code below does not compile. -Original Message- From: Jason van Zyl [mailto:ja...@sonatype.com] Sent: Tuesday, June 15, 2010 4:51 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-p lugin-plugin/ On Jun 15, 2010, at 10:49 AM, giuseppe.gr...@b-source.ch giuseppe.gr...@b-source.ch wrote: ... it does not compile because the central repository does not contain artifact maven-plugin-plugin :-( Jeff -Original Message- From: Benjamin Bentmann [mailto:benjamin.bentm...@udo.edu] Sent: Tuesday, June 15, 2010 3:49 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin Giuseppe.Greco wrote: private void execute() throws MojoExecutionException { /* I need to get the execution id here */ } /** * @parameter default-value=${mojoExecution} * @readonly */ private MojoExecution mojoExecution; and mojoExecution.getId(); should do. I only can't tell since what Maven version that works. Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account i...@b-source.ch and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use regular mail or courier services for any information intended to be confidential. However, by sending us messages through e-mail, you authorize and instruct us to correspond by e-mail in the relevant matter. Thank you. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to
RE: How to get the execution id from a plugin
Guy, It works! Thank you very much for your help. Cheers, Jeff -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Sent: Tuesday, June 15, 2010 5:36 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin On 15 June 2010 16:31, giuseppe.gr...@b-source.ch wrote: Finally I was able to compile it... but it does not work. I created a base class like this: public abstract class ContextAbstractMojo extends AbstractMojo { /** * The execution ID as defined in the POM. * * @parameter default-value=${mojoExecution}} you have a syntax error here, try using only one closing } * @readonly */ private MojoExecution execution; /** * The context ID as an alternative to the execution ID. */ //private String context; /** * Gets the execution ID as defined in the POM. * * @return The execution ID. */ protected String getExecutionID() { String executionId = null; if (execution != null) executionId = execution.getExecutionId(); return executionId } public abstract void execute() throws MojoExecutionException; } Then, when I try to execute the concrete mojo, I always get the following error message: Cause: Cannot assign configuration entry 'execution' to 'class org.apache.maven.plugin.MojoExecution' from 'null', which is of type class java.lang.String As far as I know this should work starting from Maven 2.0 (I'm using version 2.2). Any idea? Jeff -Original Message- From: Jason van Zyl [mailto:ja...@sonatype.com] Sent: Tuesday, June 15, 2010 5:14 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin Yes, I realize. Look at an existing plugin and start with that. Or use the Maven Plugin archteype. If you don't know what I'm talking about then read this: http://www.sonatype.com/products/maven/documentation/book-defguide On Jun 15, 2010, at 11:04 AM, giuseppe.gr...@b-source.ch giuseppe.gr...@b-source.ch wrote: Found... but version 2.6 does not contain class MojoExecution and the code below does not compile. -Original Message- From: Jason van Zyl [mailto:ja...@sonatype.com] Sent: Tuesday, June 15, 2010 4:51 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-p lugin-plugin/ On Jun 15, 2010, at 10:49 AM, giuseppe.gr...@b-source.ch giuseppe.gr...@b-source.ch wrote: ... it does not compile because the central repository does not contain artifact maven-plugin-plugin :-( Jeff -Original Message- From: Benjamin Bentmann [mailto:benjamin.bentm...@udo.edu] Sent: Tuesday, June 15, 2010 3:49 PM To: Maven Developers List Subject: Re: How to get the execution id from a plugin Giuseppe.Greco wrote: private void execute() throws MojoExecutionException { /* I need to get the execution id here */ } /** * @parameter default-value=${mojoExecution} * @readonly */ private MojoExecution mojoExecution; and mojoExecution.getId(); should do. I only can't tell since what Maven version that works. Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account i...@b-source.ch and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use regular mail or courier services for any information intended to be confidential. However, by sending us messages through e-mail, you authorize and instruct us to correspond by e-mail in the relevant matter. Thank you. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl
Surefire staying 1.3 compatible, SUREFIRE-621
I looked at this issue, and it seems to me like plexus-utils lost its 1.3 compatibility between 1.5.6 and 1.5.7. Not so long ago someone declared plexus-utils 1.4, IMO a fairly sensible thing to do given the state of affairs. The only practical way I see of solving this stuff is to steal the necessary parts of StringUtils into surefire. I tried this and it seems to do the trick. There is still a dependency upon (the now 1.4) plexus-utils, which might not be sustainable but at least works. Unless someone has a better suggestion I'll solve 621 this way. Kristian - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Surefire staying 1.3 compatible, SUREFIRE-621
Or restore backward compatibility back to plexus-utils? On Jun 15, 2010, at 12:29 PM, Kristian Rosenvold wrote: I looked at this issue, and it seems to me like plexus-utils lost its 1.3 compatibility between 1.5.6 and 1.5.7. Not so long ago someone declared plexus-utils 1.4, IMO a fairly sensible thing to do given the state of affairs. The only practical way I see of solving this stuff is to steal the necessary parts of StringUtils into surefire. I tried this and it seems to do the trick. There is still a dependency upon (the now 1.4) plexus-utils, which might not be sustainable but at least works. Unless someone has a better suggestion I'll solve 621 this way. Kristian - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - the course of true love never did run smooth ... -- Shakespeare
Re: Surefire staying 1.3 compatible, SUREFIRE-621
ti., 15.06.2010 kl. 12.43 -0400, skrev Jason van Zyl: Or restore backward compatibility back to plexus-utils? I'll give it a shot, I was a bit intimidated by compatibility having been broken 2 years ago, but the breach I've seen can be solved with other means. Kristian - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Surefire and java 1.3, SUREFIRE-621
I started digging deeper into this issue, and it turns out that java 1.3 support last functioned in surefire 2.2. The plexus-utils dependency has been 1.4-dependant since 18 june 07, and currently has some fairly heavy 1.4 dependencies. Now 1.3 has been EOL'ed for 5 years. It's not as if the issue tracker has been flooded with complaints. Could someone please explain to me why this is/should be supported ? Kristian - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: can't change outputDirectory for maven-surefire-report-plugin
The Site Plugin should be configured in the build section of the POM, not in the reporting section. On 2010-06-14 22:27, Anthony Jurado Jr wrote: I googled for an answer with no luck, so I posted this to the user list on June 7 but have had no response. I'm hoping somebody on the dev list can help. Using the following configuration, the site reports end up C:/opt/builds/releases/${branch}/${module}/siteReports as I expect. The test reports, however, keep getting placed under target/surefire-reports. I've tried with and without the reportsDirectory and I've tried reversing the order of the maven-site-plugin and the maven-surefire-report-plugin stanzas inside of plugins. Can somebody please tell me how I can make the maven-surefire-report-plugin put the test reports in a directory that I specify? reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId version2.0.1/version configuration outputDirectoryC:/opt/builds/releases/${branch}/$ {module}/siteReports/outputDirectory /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId version2.5/version inheritedfalse/inherited configuration reportsDirectoryC:/opt/builds/releases/${branch}/$ {module}/testReports/reportsDirectory outputDirectoryC:/opt/builds/releases/${branch}/$ {module}/testReports/outputDirectory /configuration /plugin /plugins /reporting Many thanks, Tony -- Dennis Lundberg - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org