Question on the dependency plugin
I am trying to figure out how to use dependency plugin to copy both .class jar files as well as source jars. Unfortunately, so far I only able to copy the .class jar files, but the source jars (which I know are available for my artifacts) do not get copied. Please have a look at my plugin configuration and tell me what I'm doing wrong. Note that I have tried declaring the includeClassifiers element both inside and outside the execution element with no success. Here is my plugin configuration: org.apache.maven.plugins maven-dependency-plugin 2.0 sources install copy-dependencies false -- View this message in context: http://www.nabble.com/Question-on-the-dependency-plugin-tp21342783p21342783.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: Launching a stand-alone test program
If it's a manually run test application I'd create a separate module for it. You can set the main application as a dependency of this module, then spit out the required classpath with dependency:build-classpath and put the run parameters in your pom file, then write them out to a filtered shell or batch script. Kalle On Wed, Jan 7, 2009 at 11:17 AM, Trevor Harmon wrote: > On Jan 7, 2009, at 12:56 PM, Wendy Smoak wrote: > > FWIW, I rely on my IDE to do this kind of thing. There's usually a >> "Run" configuration you can set up, and it figures out the classpath >> for you, lets you set parameters, etc. >> > > Setting up a Run configuration in an IDE is fine for a single user. But > what about: > > 1) All members of your team need to set up the same configuration > (lots of redundant manual effort) > > 2) The run parameters may change > (each member has to perform the redundant manual effort again) > > Trevor > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Launching a stand-alone test program
On Jan 7, 2009, at 12:56 PM, Wendy Smoak wrote: FWIW, I rely on my IDE to do this kind of thing. There's usually a "Run" configuration you can set up, and it figures out the classpath for you, lets you set parameters, etc. Setting up a Run configuration in an IDE is fine for a single user. But what about: 1) All members of your team need to set up the same configuration (lots of redundant manual effort) 2) The run parameters may change (each member has to perform the redundant manual effort again) Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Launching a stand-alone test program
On Jan 7, 2009, at 12:20 PM, John Stoneham wrote: If you're just running a standalone program that doesn't really need to interact with anything that's in the POM or be tied to the Maven lifecycle or dependencies, no sense trying to couple it into Maven. I should have clarified what I meant by "stand-alone". It is stand- alone in the sense that it's not built on JUnit or a similar automated testing framework. But since it's testing the application, it does need to know the classpath (i.e. dependencies) that Maven sets up for the primary app. That's why the launching needs to be integrated with Maven. Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven-dependency-plugin copy-dependencies
I'm trying to understand how to use the copy-dependencies goal for the maven-dependency-plugin. Basically I want to just copy a few dependencies that are important to a directory, and exclude the rest. For some reason, I can't seem to get any of the filters to work, here is an example of the plugin definition that gives me trouble: org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies zip jar true ${project.build.directory}/standalone false false true If I use the above plugin definition and have dependencies of jar and zip types, when I run: mvn clean dependency:copy-dependencies I will get all the dependencies to show up in my standalone directory, whether or not they are of type jar or zip. According to the documentation, this is how you would do it, but no combination of filtering I've tried has seemed to work. Am I doing something wrong? I'm using version 2.0.9. Thanks for any help!! Ryan
Re: Launching a stand-alone test program
On Wed, Jan 7, 2009 at 10:06 AM, Trevor Harmon wrote: > In addition to the usual automated unit tests that run in Maven's test > phase, I now need to add a special kind of test program. It's stand-alone, > requires user interaction, and should be run only occasionally, not during > every test phase. FWIW, I rely on my IDE to do this kind of thing. There's usually a "Run" configuration you can set up, and it figures out the classpath for you, lets you set parameters, etc. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Annotations process with javac in compiler plugin
Hi all. This is my first mail to this list. I hope a can help and be helped. And please excuse me for my bad English. I would like to get help from this list to a proble I have with maven compiler plugin and annotation processing in javac. As you can see in plugin definition at myproject.pom I have added an annotation processor at a compiler argument. Compiling with javac, when this processor fail (when a message of kind ERROR is sent to the annotations processing API 'messager') the compilation must be interrupted and no class file must be generated. The problem is that sending an error message (while with command line compilation with javac it works as it is supossed to be) with maven the compilation continues (creates class files) and no error nor any 'messager' issue is sent to output. The execution of the processor is verified sending text to output with System.out.println("Text"). ¿Can you help me? Thank you very much. This is the plugin configuration in '.pom': org.apache.maven.plugins maven-compiler-plugin 1.6 1.6 true com.xx.annotations.xxAnnotationProcessor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Launching a stand-alone test program
On Wed, Jan 7, 2009 at 12:06 PM, Trevor Harmon wrote: > As for location, I assume I should just put it somewhere in src/test/java, > but what about invoking it? How would I configure the POM file so that users > can launch this test program only when needed, on demand, rather than on > every "mvn test"? You would probably invoke this using the exec-maven-plugin, and put the invocation in a profile activated by the presence of a property, and have users activate it with something like: mvn clean verify -Drun.my.manual.test.program Or you could just create an Ant script to run it. :) If you're just running a standalone program that doesn't really need to interact with anything that's in the POM or be tied to the Maven lifecycle or dependencies, no sense trying to couple it into Maven. - John - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Launching a stand-alone test program
> As for location, I assume I should just put it somewhere in src/test/java, > but what about invoking it? How would I configure the POM file so that users > can launch this test program only when needed, on demand, rather than on > every "mvn test"? Use a profile. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Launching a stand-alone test program
Hi, In addition to the usual automated unit tests that run in Maven's test phase, I now need to add a special kind of test program. It's stand- alone, requires user interaction, and should be run only occasionally, not during every test phase. As for location, I assume I should just put it somewhere in src/test/ java, but what about invoking it? How would I configure the POM file so that users can launch this test program only when needed, on demand, rather than on every "mvn test"? Thanks, Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: plugins now require me to provide a version ?
This should explain how it works: http://blogs.sonatype.com/people/2008/04/maven-209-released/ I can't explain why it would suddenly change for you now. -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Tuesday, January 06, 2009 9:54 AM To: users@maven.apache.org Subject: RE: plugins now require me to provide a version ? *supposedly*version is a noop if you have a local repository already setup you can override either the settings.xml or pom.xml plugin declaration e.g. foo org.apache.maven.plugins /LookHereFirst I have not been able to get this to work in 2.0.9 Perhaps John Casey or some of the dev crew can weigh in? thanks, Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Tue, 6 Jan 2009 14:07:58 +0100 > From: jeffma...@gmail.com > To: users@maven.apache.org > Subject: Re: plugins now require me to provide a version ? > > Yes, Maven has a mecanism used to get the latest version of the plugin > assumed the latest has been registered. I think this is stored in the Maven > metadata (XML file) of the plugin artifact. If you did not change your Maven > configuration (settings, repository), I don't understand why it is not > working anymore. > > Regards > Jeff MAURY > > On Tue, Jan 6, 2009 at 12:37 PM, rossputin wrote: > > > > > Hi, > > > > I don't recall changing anything in the local Maven repository... > > > > things are building now that I have provided versions, but I was under the > > impression that if I did not provide versions, the latest would be used ? > > > > Regards, > > > > Ross > > > > > > > > jeffma...@jeffmaury.com wrote: > > > > > > Did you change something in your local Maven repository ? > > > > > > Regards > > > Jeff MAURY > > > > > > On Tue, Jan 6, 2009 at 12:10 PM, rossputin > > wrote: > > > > > >> > > >> Hi guys, > > >> > > >> wondering if someone can enlighten me a little. Since I came back from > > >> the > > >> Christmas holidays, all of a sudden various plugins are working > > >> differently > > >> in my pom. > > >> > > >> - maven-eclipse-plugin now needs me to provide a version or the project > > >> will > > >> not build > > >> - maven-changes-plugin now needs me to provide a version of the project > > >> will > > >> not build > > >> - maven-javadoc-plugin now needs me to provide a version etc etc > > >> - maven-jxr-plugin needs a version > > >> - surefire needs a version > > >> > > >> Can someone explain why the behaviour has changed.. was I remiss in not > > >> providing the version before, or did I miss out on an important > > >> announcement > > >> explaining that I suddenly need to provide version information ? > > Perhaps > > >> I > > >> have done something to my pom which has upset the balance ? > > >> > > >> Additionally, now I have provided the version information, I am getting > > a > > >> complaint that the 'maven-default-skin' does not exist, I have not > > >> updated > > >> my site docs in anyway. > > >> > > >> Thanks in advance for your help, > > >> > > >> regards, > > >> > > >> Ross > > >> > > >> -- > > >> View this message in context: > > >> > > http://www.nabble.com/plugins-now-require-me-to-provide-a-version---tp21308561p21308561.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 > > >> > > >> > > > > > > > > > -- > > > La mélancolie c'est communiste > > > Tout le monde y a droit de temps en temps > > > La mélancolie n'est pas capitaliste > > > C'est même gratuit pour les perdants > > > La mélancolie c'est pacifiste > > > On ne lui rentre jamais dedans > > > La mélancolie oh tu sais ça existe > > > Elle se prend même avec des gants > > > La mélancolie c'est pour les syndicalistes > > > Il faut juste sa carte de permanent > > > > > > Miossec (2006) > > > > > > http://www.jeffmaury.com > > > http://riadiscuss.jeffmaury.com > > > http://www.lastfm.fr/listen/user/jeffmaury/personal > > > Mes CDs à récupérer: > > > http://spreadsheets.google.com/ccc?key=pNeg4Doa_oCsh7CepKPaPTA&hl=en > > > > > > > > > > -- > > View this message in context: > > http://www.nabble.com/plugins-now-require-me-to-provide-a-version---tp21308561p21308838.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...@mav
Re: skipping execution of plugins, which are creating the environment for tests
On Wed, Jan 07, 2009 at 09:35:16AM -0500, John Stoneham wrote: > On Wed, Jan 7, 2009 at 9:22 AM, Eugeny N Dzhurinsky wrote: > > Can somebody please advice, is it possible to skip execution of certain > > plugins, which are only needed when performing the tests? > > You could create a profile that contains these plugins, which is > activated in the absence of the property maven.test.skip. This would > be a general solution. > > Alternatively if, like many plugins, the ones in question have a > "skip" configuration parameter to enable use cases like yours, you > could pass ${maven.test.skip} as the value of that parameter. Okay, thank you very much! I already did in this way and it worked. -- Eugene N Dzhurinsky pgpNDDNXLklHz.pgp Description: PGP signature
Re: skipping execution of plugins, which are creating the environment for tests
On Wed, Jan 07, 2009 at 03:36:44PM +0100, Baptiste MATHUS wrote: > Hi, > Just an idea, I see here ( > http://mojo.codehaus.org/sql-maven-plugin/execute-mojo.html#skip) there's a > skip option. > Have you tried adding the corresponding configuration, and just put > something like: > > > ${maven.test.skip} > Well, I did in a bit different way - I have introduced the profile and provided it with the activation option !maven.test.skip and this seems to work. -- Eugene N Dzhurinsky pgpS5dJVhi5LJ.pgp Description: PGP signature
Re: skipping execution of plugins, which are creating the environment for tests
On Wed, Jan 7, 2009 at 9:22 AM, Eugeny N Dzhurinsky wrote: > Can somebody please advice, is it possible to skip execution of certain > plugins, which are only needed when performing the tests? You could create a profile that contains these plugins, which is activated in the absence of the property maven.test.skip. This would be a general solution. Alternatively if, like many plugins, the ones in question have a "skip" configuration parameter to enable use cases like yours, you could pass ${maven.test.skip} as the value of that parameter. - John - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: skipping execution of plugins, which are creating the environment for tests
Hi, Just an idea, I see here ( http://mojo.codehaus.org/sql-maven-plugin/execute-mojo.html#skip) there's a skip option. Have you tried adding the corresponding configuration, and just put something like: ${maven.test.skip} HTH. Cheers 2009/1/7 Eugeny N Dzhurinsky > Hello! > > Can somebody please advice, is it possible to skip execution of certain > plugins, which are only needed when performing the tests? > > For instance, we need to prepare the correct SQL database for our tests, we > are using sql-maven-plugin to create the database and insert the required > data > into it. > > What we found is the test database is being created even in case if > -Dmaven.test.skip option was provided, and this is a bit confusing, since > we > don't want to drop/create/fill database if we want to build a package w/o > testing (yes, I know that's the bad idea, but sometimes we need go go this > way). > > The plugin is bound to the prepare-test-resources phase, and looks like it > is > invoked all the time, no matter whether the tests are to be invoked or not. > > Thank you in advance! > > -- > Eugene N Dzhurinsky > -- Baptiste MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
skipping execution of plugins, which are creating the environment for tests
Hello! Can somebody please advice, is it possible to skip execution of certain plugins, which are only needed when performing the tests? For instance, we need to prepare the correct SQL database for our tests, we are using sql-maven-plugin to create the database and insert the required data into it. What we found is the test database is being created even in case if -Dmaven.test.skip option was provided, and this is a bit confusing, since we don't want to drop/create/fill database if we want to build a package w/o testing (yes, I know that's the bad idea, but sometimes we need go go this way). The plugin is bound to the prepare-test-resources phase, and looks like it is invoked all the time, no matter whether the tests are to be invoked or not. Thank you in advance! -- Eugene N Dzhurinsky pgpryZEKps6pf.pgp Description: PGP signature
WLST scripts support in maven 1.X
Hi all, I am very much new to maven, and i want to invoke a WLST script to start/stop ...weblogic server from maven goals. is maven supports such things? What are pre-requisites for this? plz provide some sample examples or useful links if possible. Thnx in advance. -- View this message in context: http://www.nabble.com/WLST-scripts-support-in-maven-1.X-tp21331889p21331889.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: [ANN] Maven Assembly Plugin 2.2-beta-3 Released
This was eagerly awaited. Thanks for the good work! However, I've found one minor difference that caused a change in my assembly descriptors when upgrading from 2.2-beta-1 to 2.2-beta-3. So far, it was possible to exclude an entire directory from a fileset just by listening its name, as in the following exclude ('bin' folder): assemblies/minimal/src/main/release / bin With the upgrade to beta-3 this does not to work any longer because the target assembly contained the bin folder (and its content). I had to replace the exclude tag as follows: assemblies/minimal/src/main/release / bin/** I cross checked the maven-assembly-plugin Web site for documentation of the pattern format without success. I guess, somewhere, it is documented, but I couldn't find it (as fast as I would like to). It would be good to update the documentation and add links to the place where the pattern format is documented. Regards, Thorsten John Casey-7 wrote: > > The Maven team is pleased to announce the release of the Maven Assembly > Plugin, version 2.2-beta-3 > > This plugin is used to create custom archives using the build output, > dependencies, and other files owned by a Maven project. You can find > more information, including instructions and examples, at: > > -- View this message in context: http://www.nabble.com/-ANN--Maven-Assembly-Plugin-2.2-beta-3-Released-tp21298644p21329363.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