Re: Are Maven profiles like Ant targets?
On Wednesday 17 December 2008 Trevor Harmon wrote: On Dec 17, 2008, at 12:18 PM, Martin Höller wrote: Ok. My approach would then be to create one profile which is only executed before releasing or when running in the contiuous-integration server. This profile would configure the antrun plugin to execute install4j, run integration tests, and do some other time-consuming work. Yes, that's what I've been doing, but you said I was doing it wrong. In your original mail you tried to use profiles like you would use tasks in ant. That's not the maven way and that's what I meant when I was saying you are doing it wrong. I never said using profiles is wrong. You say it: it runs all of the _configurations_, but it's still only _one_ goal that runs. In this case the 'run' goal of the antrun plugin. The antrun plugin is kind of special as it runs ant task within maven, which doesn't have the concept of tasks. The exec plugin is like that too, and I find both to be very integral to the development process. Perhaps these plugins need a new feature that allows the user to specify which configuration is used. Yes, maybe. However, adding such a feature is quite equivalent to using profiles to select a configuration. And this is how it all started ;-) - martin signature.asc Description: This is a digitally signed message part.
Re: How to configure resources plugin to copy extra files
Excellent! That worked, thanks. brettporter wrote: You shouldn't need to configure the resource plugin at all, just the following will work: resources resource directorysrc/main/java/directory includes include**/*.xml/include /includes /resource /resources Cheers, Brett On 18/12/2008, at 5:19 PM, zorro2b wrote: I am converting a project to use Maven. I have got it to compile but the tests are failing because there are xml files in with the java source that need to be copied over with the classes. I don't want to move these into the resources dir, so I followed the example here: http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html but I get the error 'copy-resources' was specified in an execution, but not found in the plugin so I have tried changing the goal to resources as well as removing the goals section completely. Both get rid of the error, but no files are copied. Does anyone have a working config they could share? Here is my current config: plugin artifactIdmaven-resources-plugin/artifactId executions execution idcopy-resources/id phaseprocess-resources/phase goals goalresources/goal /goals configuration outputDirectory${basedir}/target/classes/ outputDirectory resources resource directorysrc/main/java/directory includes include**/*.xml/include /includes /resource /resources /configuration /execution /executions /plugin -- View this message in context: http://www.nabble.com/How-to-configure-resources-plugin-to-copy-extra-files-tp21067611p21067611.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Brett Porter br...@apache.org http://blogs.exist.com/bporter/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- View this message in context: http://www.nabble.com/How-to-configure-resources-plugin-to-copy-extra-files-tp21067611p21068948.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
how to extend maven plugin
Hello all, I need to extend (use) an existing maven plugin from my plugin. How do I proceed, or where do I start ? is there any links ? To be more specific, I need to extend the docbkx maven plugin to generate docbook output. In my own, I need to customize the style sheet, header,etc and wrap it all in a package for consistency between generated documents. Any advice ? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Test plugin
When I try to run a test plugin goal I get: The plugin 'org.apache.maven.plugins:maven-test-plugin' does not exist or no valid version could be found In the repo I can only find a maven groupid with the maven-test-plugin. Is there really a org.apache.maven.plugins maven-test-plugin? I'm confused. Regards, John - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Deploy a POM with Properties Filterred/interpolated
we have many variable properties in our POMs to control artifact and depedency artifact versions and need these interpolated before deployment. If you use the maven-release-plugin, you can use -DgenerateReleasePoms=true as a command line option to generate a release-pom.xml. Everything in that file is resolved, so no properties remain in there. thanks, but... using the maven-release-plugin would push us down the route of using maven to integrate builds with SCM (subversion)... this is not a route we want to go down at the moment, we handle SVN integration manually. What we want is to have a generateReleasePoms type funcionality in the deploy plugin so we can deploy release artifacts to our local Archiva repository with meaningful Poms. At the moment we can hack this by making a filterred/interpolated copy of the POM and then cleaning this to remove unwanted directives using a script: then deploy the artifact with this hacked POM. Trevor -- View this message in context: http://www.nabble.com/Deploy-a-POM-with-Properties-Filterred-interpolated-tp21030932p21070462.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
problem with customization of site generation with maven
Hi, i have a problem with Maven automatic site generation. I want to overwrite the standard output index.html, so i write my own site/apt/index.apt. Maven generates correctly the index.html from my apt file but in the menu on the left named Project Information, the voice About is dissapeared. When i remove my apt file Maven generates by itself the index.html page and the About returns in the menu. I've already checked that in my pom file there is the index report. It's a bug or what? There is anyway to solve it? Tanks in advance, Luca. -- ..:: Luca Borz ::.. Junior Researcher Junior Java Programmer VERSO21 S.R.L gruppo OPERA21 Via F. Zeni 8 - 38068 Rovereto Tel. +39 02 69374 393 - Fax +39 0464443360 e-mail: lb...@opera21.it mailto:lb...@opera21.it website: www.opera21.it http://www.opera21.it - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Expand jar dependency in war
Hello all, Is there a way to have a jar dependency expanded in a war, so that war would also have all transitive dependencies jar has? Regards, Stevo.
resources with different encodings
Hi All, I have a mix of resources in UTF-8 (XML files) and ISO-8859-1 (properties files). The resource encoding can be configured only on the level of the entire resource plugin, but I need to be able to specify the encoding per resource. Is this possible? Thanks, Alex
RE: Deploy a POM with Properties Filterred/interpolated
Trevor, -Original Message- From: Trevor Paterson [mailto:trevor.pater...@roslin.ed.ac.uk] Sent: donderdag 18 december 2008 11:50 To: users@maven.apache.org Subject: RE: Deploy a POM with Properties Filterred/interpolated thanks, but... using the maven-release-plugin would push us down the route of using maven to integrate builds with SCM (subversion)... this is not a route we want to go down at the moment, we handle SVN integration manually. What we want is to have a generateReleasePoms type funcionality in the deploy plugin so we can deploy release artifacts to our local Archiva repository with meaningful Poms. At the moment we can hack this by making a filterred/interpolated copy of the POM and then cleaning this to remove unwanted directives using a script: then deploy the artifact with this hacked POM. The first solution that comes to mind is running the maven-release-plugin in dryRun mode (see the docs). This generates the proposed release-pom.xml. The build-helper-maven-plugin (1) can help you to deploy this file to the repository. After deployment, you trigger an mvn release:clean to get rid of these intermediate files. (1) http://mojo.codehaus.org/build-helper-maven-plugin/attach-artifact-mojo. html FYI, this is just out of the top of my head. I never tried it myself, but I hope it can put you on the right track. Ringo * Dit e-mail bericht inclusief eventuele ingesloten bestanden kan informatie bevatten die vertrouwelijk is en/of beschermd door intellectuele eigendomsrechten. Dit bericht is uitsluitend bestemd voor de geadresseerde(n). Elk gebruik van de informatie vervat in dit bericht (waaronder de volledige of gedeeltelijke reproductie of verspreiding onder elke vorm) door andere personen dan de geadresseerde(n) is verboden. Indien u dit bericht per vergissing heeft ontvangen, gelieve de afzender hiervan te verwittigen en dit bericht te verwijderen. This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the addressees. Any use of the information contained herein (including but not limited to total or partial reproduction or distribution in any form) by other persons than the addressees is prohibited. If you have received this e-mail in error, please notify the sender and delete its contents. Ce courriel et les annexes éventuelles peuvent contenir des informations confidentielles et/ou protégées par des droits de propriété intellectuelle. Ce message est adressé exclusivement à son (ses) destinataire(s). Toute utilisation du contenu de ce message (y compris la reproduction ou diffusion partielle ou complète sous toute forme) par une autre personne que le(s) destinataire(s) est formellement interdite. Si vous avez reçu ce message par erreur, veuillez prévenir l'expéditeur du message et en détruire le contenu. * - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: how to extend maven plugin
Mansour wrote at Donnerstag, 18. Dezember 2008 10:32: Hello all, I need to extend (use) an existing maven plugin from my plugin. How do I proceed, or where do I start ? is there any links ? To be more specific, I need to extend the docbkx maven plugin to generate docbook output. In my own, I need to customize the style sheet, header,etc and wrap it all in a package for consistency between generated documents. Any advice ? In short: Don't do it. Maven loads every plugin only once. If you depend on a different plugin, you also specify its version in the dependencies. This has the unfortunate result, that either the user-specified version for that plugin is ignored or the the version you defined in your dependency. The used version is simply defined by the sequence Maven loads the plugin (either because the user uses it directly or your plugin is used and it will load in consequence the other one). If the version does not match, the user might get some strange effects especially if the versions are not compatible. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Different configuration sections in different executions sections don't work as advertised :)
Hello, Is this a bug in Maven or the jar plugin? !-- Make the jar out of the compiled classes. Must be done BEFORE packaging, so it can be included in the greater jar. -- plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId executions execution idjar-classes/id !-- The jaring must be done at the compile phase, so we can have the jar ready for packaging in the greater jar. -- phasecompile/phase configuration outputDirectory${project.build.outputDirectory}/outputDirectory finalNameexternal/finalName /configuration goals goaljar/goal /goals /execution execution idjar-all/id !-- This is the greater jar: classes jar + resources. -- phasepackage/phase !-- This configuration section is ignored (bug? my error?) -- configuration archive manifestFile${basedir}/META-INF/MANIFEST.MF/manifestFile /archive /configuration goals goaljar/goal goalsign/goal /goals /execution /executions /plugin The second jar does not have the manifest inside. I needed to launch the plugin 2 times (i.e. plugin/plugin,plugin/plugin) to make it work. Sounds like a bug, IMHO. Regards, Costin. -- View this message in context: http://www.nabble.com/Different-configuration-sections-in-different-executions-sections-don%27t-work-as-advertised-%3A%29-tp21073075p21073075.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Test plugin
This error is accurate. There's no maven-test-plugin. test is a lifecycle phase, not a plugin. From: John Coleman [mailto:john.cole...@eurobase.com] Sent: Thu 12/18/2008 4:54 AM To: Maven Users List Subject: Test plugin When I try to run a test plugin goal I get: The plugin 'org.apache.maven.plugins:maven-test-plugin' does not exist or no valid version could be found In the repo I can only find a maven groupid with the maven-test-plugin. Is there really a org.apache.maven.plugins maven-test-plugin? I'm confused. Regards, John - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: resources with different encodings
You'd need multiple executions of the resource plugin, but it can be done 2008/12/18 Alex Milanovic alex.milano...@iogeo.com Hi All, I have a mix of resources in UTF-8 (XML files) and ISO-8859-1 (properties files). The resource encoding can be configured only on the level of the entire resource plugin, but I need to be able to specify the encoding per resource. Is this possible? Thanks, Alex
Re: Expand jar dependency in war
On Thu, Dec 18, 2008 at 4:44 AM, Stevo Slavić ssla...@gmail.com wrote: Is there a way to have a jar dependency expanded in a war, so that war would also have all transitive dependencies jar has? The war should have all its dependency jars and their transitive dependencies in WEB-INF/lib. Is that not happening? Or are you asking for them to be expanded under WEB-INF/classes instead? -- Wendy
Release Plugin in Continuum in svn
Hi, i have a Problme wiht Release with Continuum and Release Plugin. If I a call the release:prepare, than have a problem with svn: [INFO] Finished at: Thu Dec 18 14:57:19 CET 2008 [INFO] Final Memory: 27M/355M [INFO] [ERROR] org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to tag SCM Provider message: The svn tag command failed. Command output: svn: Commit failed (details follow): svn: Source url 'svn+ssh://work/data/svnroot/project/trunk/root-project' is from different repository at org.apache.maven.shared.release.phase.ScmTagPhase.execute(ScmTagPhase.java:99) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:194) at org.apache.maven.shared.release.DefaultReleaseManager.prepareWithResult(DefaultReleaseManager.java:107) at org.apache.maven.continuum.release.executors.PrepareReleaseTaskExecutor.execute(PrepareReleaseTaskExecutor.java:43) - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Expand jar dependency in war
Yes, all dependency jars (and transitive ones) end up well in WEB-INF/lib. Problem is that I need to configure to have some of the dependencies expanded in WEB-INF/classes. I've found some discussions from before ( http://www.mail-archive.com/users@maven.apache.org/msg71453.html ) but solution presented there doesn't work for me, as putting jar dependency to provided scope makes all it's transitive dependencies provided too. Configuring jar transitive dependencies as war dependencies too is not acceptable (many of them, maintenance nightmare). I've tried configuring maven dependency plugin to expand jar, and maven war plugin to exclude jar from packaging, but it didn't work, and even if it did it would also be maintenance nightmare as in packagingExludes one has to specify full jar name (wish something like ArtifactItems was available for war plugin). Regards, Stevo. 2008/12/18 Wendy Smoak wsm...@gmail.com On Thu, Dec 18, 2008 at 4:44 AM, Stevo Slavić ssla...@gmail.com wrote: Is there a way to have a jar dependency expanded in a war, so that war would also have all transitive dependencies jar has? The war should have all its dependency jars and their transitive dependencies in WEB-INF/lib. Is that not happening? Or are you asking for them to be expanded under WEB-INF/classes instead? -- Wendy
Re: Expand jar dependency in war
2008/12/18 Stevo Slavić ssla...@gmail.com: Yes, all dependency jars (and transitive ones) end up well in WEB-INF/lib. Problem is that I need to configure to have some of the dependencies expanded in WEB-INF/classes. Possibly a feature request for the war plugin... until then I'd probably just use antrun to expand the jar and then delete it from WEB-INF/lib. -- Wendy
maven life cycles task execution
Hello, Does anybody know if it's possible to execute something, e.g. ant task, before maven starts checking and downloading dependencies? I've tried specifying execution phases, but my task would still execute after dependencies have been resolved. Thanks. -- View this message in context: http://www.nabble.com/maven-life-cycles-task-execution-tp21075119p21075119.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
release:perform and scmCommentPrefix
Can anyone clarify when scmCommentPrefix is used during release:perform [1] goal? I thought all the necessary changes in SCM happen during release:prepare and release:perform just checks out the project and runs necessary goals. Thanks, Sahoo [1] http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: how to extend maven plugin
Jörg Schaible wrote: Mansour wrote at Donnerstag, 18. Dezember 2008 10:32: Hello all, I need to extend (use) an existing maven plugin from my plugin. How do I proceed, or where do I start ? is there any links ? To be more specific, I need to extend the docbkx maven plugin to generate docbook output. In my own, I need to customize the style sheet, header,etc and wrap it all in a package for consistency between generated documents. Any advice ? In short: Don't do it. Maven loads every plugin only once. If you depend on a different plugin, you also specify its version in the dependencies. This has the unfortunate result, that either the user-specified version for that plugin is ignored or the the version you defined in your dependency. I though I can ignore the version in the POM so that m plugin will use the latest. The used version is simply defined by the sequence Maven loads the plugin (either because the user uses it directly or your plugin is used and it will load in consequence the other one). If the version does not match, the user might get some strange effects especially if the versions are not compatible. - Jörg OK, What alternatives do I have, then. I thought maven2 plugins are reusable and they can be used from another plugins. What do other plugin authors do in this case ? Thank you. - 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
Re: how to extend maven plugin
2008/12/18 Mansour mansou...@yahoo.com Jörg Schaible wrote: Mansour wrote at Donnerstag, 18. Dezember 2008 10:32: Hello all, I need to extend (use) an existing maven plugin from my plugin. How do I proceed, or where do I start ? is there any links ? To be more specific, I need to extend the docbkx maven plugin to generate docbook output. In my own, I need to customize the style sheet, header,etc and wrap it all in a package for consistency between generated documents. Any advice ? In short: Don't do it. Maven loads every plugin only once. If you depend on a different plugin, you also specify its version in the dependencies. This has the unfortunate result, that either the user-specified version for that plugin is ignored or the the version you defined in your dependency. I though I can ignore the version in the POM so that m plugin will use the latest. The used version is simply defined by the sequence Maven loads the plugin (either because the user uses it directly or your plugin is used and it will load in consequence the other one). If the version does not match, the user might get some strange effects especially if the versions are not compatible. - Jörg OK, What alternatives do I have, then. I thought maven2 plugins are reusable and they can be used from another plugins. What do other plugin authors do in this case ? The idea is to develop plugins so that most (if not all) the work is performed in a regular jar artifact... that way, to extend the plugin you just depend on the jar file not the plugin. What you therefore want to do is ensure that the plugin you need to extend is refactored so that 99.9% of the code in the mojo is moved into a separate module, then you just depend on that module. Thank you. - 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
Re: how to extend maven plugin
Thank you Stephen, hum, Let's make sure I got the idea. Every plugin consist of mojo classes. So in this case, I start my plugin and set the modified docbokx plugin as a depency (jar depency), then I extend the mojos I want to modify and over ride them by setting the default values I need. In order to do this, I need to move the mojos from the docbokx into a separate jar file. Is this right ? Or, download the source for the docbokx plugin, and modify it. Will this be easier? Which approach you will go for? Stephen Connolly wrote: The idea is to develop plugins so that most (if not all) the work is performed in a regular jar artifact... that way, to extend the plugin you just depend on the jar file not the plugin. What you therefore want to do is ensure that the plugin you need to extend is refactored so that 99.9% of the code in the mojo is moved into a separate module, then you just depend on that module. Thank you. - 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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Problem with DBUNIT task after SQL task inside ANTRUN PLUGIN
I have two tasks defined inside the antrun plugin: sql driver=oracle.jdbc.OracleDriver autocommit=false url=jdbc:oracle:thin:@localhost:1521:XE userid=optdev password=changeme delimiter=; transaction src=sql/01_optmzr_prod.sql / /sql taskdef name=dbunit classname=org.dbunit.ant.DbUnitTask / dbunit driver=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@localhost:1521:XE userid=optdev password=changeme schema=OPTDEV operation type=INSERT src=sql/16_optmzr_anlys.xml / /dbunit When I specify the tasks this way, the SQL tasks finishes first, but DBUNIT task never runs. If I comment out either of the tasks, each of them run independently just fine. Anyone have any insight into why this doesn't work? I don't get any error messages. I've tried -X and -e without any additional details. Brian -- View this message in context: http://www.nabble.com/Problem-with-DBUNIT-task-after-SQL-task-inside-ANTRUN-PLUGIN-tp21079466p21079466.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: how to extend maven plugin
For most situations, you could consider the plugin artifact to be prez-layer. You are using the mojo injection mechanism and maven api to gather input for the utility-artifact/wrapped-tool to process. Is that consistent with what you were saying Stephen? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: how to extend maven plugin
2008/12/18 Luke Patterson lukewpatter...@gmail.com For most situations, you could consider the plugin artifact to be prez-layer. You are using the mojo injection mechanism and maven api to gather input for the utility-artifact/wrapped-tool to process. Is that consistent with what you were saying Stephen? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org Sort of. The key point is that the plugin has the Mojo... the annotations will be injected into the Mojo... the Mojo's execute method then passes the parameters to the worker class... the worker classes *do not* extend AbstractMojo or any kind of Mojo if fact it's as if they don't know about Mojo at all... otherwise were back to the same problem again. Put the worker classes in a separate jar, leave the classes extending AbstractMojo in the plugin, and have the plugin depend on the worker classes jar. Examples of this pattern would be in some of the plugins (I suspect the enforcer and resources plugins would be good examples) -Stephen
Re: how to extend maven plugin
Stephen Connolly wrote: 2008/12/18 Luke Patterson lukewpatter...@gmail.com For most situations, you could consider the plugin artifact to be prez-layer. You are using the mojo injection mechanism and maven api to gather input for the utility-artifact/wrapped-tool to process. Is that consistent with what you were saying Stephen? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org Sort of. The key point is that the plugin has the Mojo... the annotations will be injected into the Mojo... the Mojo's execute method then passes the parameters to the worker class... the worker classes *do not* extend AbstractMojo or any kind of Mojo if fact it's as if they don't know about Mojo at all... otherwise were back to the same problem again. If we talk web development, you mean business logic by worker class, and Mojo is just the class that extract the data from the plugin config (pom) then passes these data to the business logic. Ok, I see now the big picture. But then, Put the worker classes in a separate jar, leave the classes extending AbstractMojo in the plugin, and have the plugin depend on the worker classes jar. Where does my new mojo fits ? If I separate the logic in a jar artifact (which by the way the author of the docbkx did a great job on that) and leave the old mojo, then where does the modification goes? In a new mojo, in the original one ? in the pom (set the default values) ? Examples of this pattern would be in some of the plugins (I suspect the enforcer and resources plugins would be good examples) I am looking into this now http://maven.apache.org/plugins/maven-enforcer-plugin/usage.html , and will check out the source soon. -Stephen - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: how to extend maven plugin
2008/12/18 Mansour mansou...@yahoo.com Put the worker classes in a separate jar, leave the classes extending AbstractMojo in the plugin, and have the plugin depend on the worker classes jar. Where does my new mojo fits ? If I separate the logic in a jar artifact (which by the way the author of the docbkx did a great job on that) and leave the old mojo, then where does the modification goes? In a new mojo, in the original one ? in the pom (set the default values) ? In a new mojo, or in a new jar that depends on the old mojo's worker jar, and then you write a mojo that uses your new jar Examples of this pattern would be in some of the plugins (I suspect the enforcer and resources plugins would be good examples) I am looking into this now http://maven.apache.org/plugins/maven-enforcer-plugin/usage.html , and will check out the source soon. -Stephen - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Final Memory
I never figured it out. I'd still like to know! Paul On Tue, Dec 16, 2008 at 2:01 PM, Wayne Fay wayne...@gmail.com wrote: What does the Final Memory detail represent when Maven finishes? I can't find any documentation on what the two numbers mean. [INFO] Final Memory: 1M/4M I'm not certain, but I'd expect the first number to be amount of memory currently consumed when this INFO log was generated and the second to be the largest amount of memory consumed during the build. Or something along those lines. I've never paid a lot of attention to it, to be honest. You could probably grep the Maven source and find it pretty quickly, if you cared enough. (If someone does that and finds out the answer, please post it.) Wayne - 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
Re: Is it possible to override the location of a module?
As part of a conversion from ant to maven I'm exploring the use of a multi-module project. Since this is a legacy project we'd rather not move things around. So the child modules will not necessarily be in directories directly beneath the parent pom. Is there any way to override this location in the parent pom's module section? Yes. Here's an example of a child pom where the parent is in a neighbor directory: http://svn.apache.org/viewvc/maven/pom/tags/maven-parent-10/pom.xml?view=markuppathrev=720662 relativePath../asf/pom.xml/relativePath And you can do similar things in modules. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Final Memory
2008/12/19 Paul Benedict pbened...@apache.org I never figured it out. I'd still like to know! browsing the source for 2.0.9 shows: getLogger().info( Final Memory: + ( r.totalMemory() - r.freeMemory() ) / MB + M/ + r.totalMemory() / MB + M ); where r = Runtime.getRuntime() so the first number is the memory actually in use at the time of the message, and the second is the total amount of memory (both used + available) see: http://svn.apache.org/repos/asf/maven/components/tags/maven-2.0.9/maven-core/src/main/java/org/apache/maven/DefaultMaven.java and: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#freeMemory() Paul On Tue, Dec 16, 2008 at 2:01 PM, Wayne Fay wayne...@gmail.com wrote: What does the Final Memory detail represent when Maven finishes? I can't find any documentation on what the two numbers mean. [INFO] Final Memory: 1M/4M I'm not certain, but I'd expect the first number to be amount of memory currently consumed when this INFO log was generated and the second to be the largest amount of memory consumed during the build. Or something along those lines. I've never paid a lot of attention to it, to be honest. You could probably grep the Maven source and find it pretty quickly, if you cared enough. (If someone does that and finds out the answer, please post it.) Wayne - 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 -- Cheers, Stuart