Re: Executing a goal *after* install

2012-07-25 Thread Mirko Friedenhagen
Hello Brett, unfortunately, binding it to Lifecycle.INSTALL without a custom lifecycle seems not to be good enough. During the run of mvn install, install will be run in every module seperately (first parent, the reactor projects). Now after install:install succeeded in the parent, my goal

No versions available but actually local repository contains it!

2012-07-25 Thread Markus Karg
I have a very strange problem with Maven 3.0.4 running on JDK 1.6.0_26 on Win 7 Pro SP1 (64 Bit): When I want to compile, Maven says that it cannot resolve a dependency: No versions available for org.hamcrest:hamcrest-core:jar:[1.3,1.3] within specified range. But actually, Maven in fact

Re: No versions available but actually local repository contains it!

2012-07-25 Thread Milos Kleint
there's some code in latest maven that not only checks the presence of the jar/pom in local repository but also some additional metadata which describes where it was downloaded from. where is defined by repository id. if the repository id in your project is missing in the current metadata, a new

Re: Executing a goal *after* install

2012-07-25 Thread Aliaksei Lahachou
Hi Mirko! You may try doing the same trick as the cobertura-maven-plugin does when aggregate is set to true. 1. Every module executes the plugin, but the plugin updates the same file in the directory of the project from which the build was started. In you case you may, for example, calculate

Maven Repository initial setp error

2012-07-25 Thread nnrtech
Hi, I'm new to Maven.I've setup maven as expaline the doc.I'm trying to setup the repository using the below command.I modifie the settings.xml file to change the repository location. mvn archetype:generate -DgroupId=Maven-Test -DartifactId=sg.gov.frontier

Re: Executing a goal *after* install

2012-07-25 Thread Tamás Cservenák
Mirko, so, you want to have your mojo run at last reactor module being built (having your mojo defined)? Then take a peek at this: https://github.com/sonatype/nexus-maven-plugins/tree/master/nexus-staging-maven-plugin and (as it uses) this:

Re: Executing a goal *after* install

2012-07-25 Thread Mirko Friedenhagen
Thank you very much for all your hints :-). Regards Mirko On Wed, Jul 25, 2012 at 10:28 AM, Tamás Cservenák ta...@cservenak.net wrote: Mirko, so, you want to have your mojo run at last reactor module being built (having your mojo defined)? Then take a peek at this:

RE: Filter bug with specified characters in xml comments

2012-07-25 Thread Will Hoover
Thanks for the info Wayne! One might think that it would be ignored due to it being within a commented region of the xml, but I guess Maven filtering has no relevance to the type of file it's filtering? -Original Message- From: Wayne Fay [mailto:wayne...@gmail.com] Sent: Tuesday, July

adding dependancy in test resources

2012-07-25 Thread Moshe
I'm writing an integration test that involves more than one project. I created a test jar for all projects but from some reason it the spring context doesn't see the resources that are defined in the other projects' test jar (although I defined a dependency in test scope for the test jar). do you

How write maven plugin to read *.java (all sources) and generate some output?

2012-07-25 Thread e92-330cd
Hello, I am completely new in writing own maven plugins.. as I have read this tutorial: http://books.sonatype.com/books/mvnref-book/reference/writing-plugins.html there is only simple example. But now any further information how to develop more complex plugin. All I want is create some maven

How write maven plugin to read *.java (all sources) and generate some output?

2012-07-25 Thread e92-330cd
Hello, I am completely new in writing own maven plugins.. as I have read this tutorial: http://books.sonatype.com/books/mvnref-book/reference/writing-plugins.html there is only simple example. But no any further information how to develop more complex plugin. All I want is create some maven

Re: How write maven plugin to read *.java (all sources) and generate some output?

2012-07-25 Thread Aliaksei Lahachou
I'd suggest to find an existing plugin the does something similar and use its source as a reference. [1] http://maven.apache.org/plugins/index.html [2] http://mojo.codehaus.org/plugins.html Regards, htfv (Aliaksei Lahachou) On Wed, Jul 25, 2012 at 3:03 PM, e92-33...@seznam.cz wrote: Hello,

Re: adding dependancy in test resources

2012-07-25 Thread Jesse Farinacci
Greetings, On Wed, Jul 25, 2012 at 5:56 AM, Moshe saa...@yahoo.com wrote: I'm writing an integration test that involves more than one project. I created a test jar for all projects but from some reason it the spring context doesn't see the resources that are defined in the other projects'

Re: How write maven plugin to read *.java (all sources) and generate some output?

2012-07-25 Thread e92-330cd
OK. good idea. now another silly question: If i will install succesfully the new plugin into local m2 repository. How can I test (run ) it ...to generate that some output on my project? just add the plugin into build part? thanks D. Původní zpráva Od: Aliaksei

Re: Filter bug with specified characters in xml comments

2012-07-25 Thread Wayne Fay
One might think that it would be ignored due to it being within a commented region of the xml, but I guess Maven filtering has no relevance to the type of file it's filtering? Maven Filtering has no knowledge of file types and thus no knowledge of comments in one file type vs another. It

Re: How write maven plugin to read *.java (all sources) and generate some output?

2012-07-25 Thread Wayne Fay
If i will install succesfully the new plugin into local m2 repository. How can I test (run ) it ...to generate that some output on my project? just add the plugin into build part? Assuming you write it and install/deploy it properly, yes, it would be invoked in your build just like any other

Re: How write maven plugin to read *.java (all sources) and generate some output?

2012-07-25 Thread e92-330cd
Hm... i thought that I have found 2 candidates - javadoc plugin or source plugin. But when I have made checkout and seen plenty of classes and code... I think i will not understand it until next year :( isnt there any easy way how to go thru all source files and read lines? Thanks. David

Re: How write maven plugin to read *.java (all sources) and generate some output?

2012-07-25 Thread Antonio Petrelli
2012/7/25 e92-33...@seznam.cz: Hm... i thought that I have found 2 candidates - javadoc plugin or source plugin. But when I have made checkout and seen plenty of classes and code... I think i will not understand it until next year :( isnt there any easy way how to go thru all source files

Re: Maven Repository initial setp error

2012-07-25 Thread Ron Wheeler
You need to set up your artifactory repo to proxy Maven Central since your repo does not have any 3rd party content in it. I would guess that you have not done that. Maven is complaining that it can not find a plug-in. You need to make sure that you have defined what you want Maven to use as

RE: No versions available but actually local repository contains it!

2012-07-25 Thread Martin Gainty
javadoc suggests bracket version bracket or [version] for exact match http://maven.apache.org/plugins/maven-enforcer-plugin/rules/versionRanges.html if you specify a specifiv version such as version1.3/versionand you get any other version such as 1.1 or 1.2 then that is a bugperhaps a 1.2 or

Re: How write maven plugin to read *.java (all sources) and generate some output?

2012-07-25 Thread Ron Wheeler
Read the code in a few actual plug-ins. Look for ones that are similar to your plan in terms of file reading and writing. Ron On 25/07/2012 8:52 AM, e92-33...@seznam.cz wrote: Hello, I am completely new in writing own maven plugins.. as I have read this tutorial:

Re: How write maven plugin to read *.java (all sources) and generate some output?

2012-07-25 Thread Wayne Fay
plugin. But when I have made checkout and seen plenty of classes and code... I think i will not understand it until next year :( isnt there any easy way how to go thru all source files and read lines? This is why they pay you the big bucks. ;-) But seriously if you can't make it work as a

Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread John Kramer
Hi there, I am using the liquibase plugin and I keep getting the following error: [ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:2.0.3:update (default) on project dbmigration: Error setting up or running Liquibase: java.lang.RuntimeException: Cannot find database driver:

Re: Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread Wayne Fay
If I manually inspect the specified postgres jar, it does contain the class org.postgresql.Driver. And if I run maven with debugging output turned on, it looks like the plugin's classpath contains that jar: Is this Maven 2.x or 3.0.4 or something else? Wayne

Re: Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread John Kramer
3.0.3 John Kramer email: jkra...@mojiva.com mobile: 314.435.2370 skype: kramer.mojiva 0xCAFEBABE0032 On 7/25/12 3:28 PM, Wayne Fay wayne...@gmail.com wrote: If I manually inspect the specified postgres jar, it does contain the class org.postgresql.Driver. And if I run maven with

Re: Replace Dynamic Revisions during

2012-07-25 Thread szms
I am working on cross dependent projects in order to build using Maven. At this moment I am hard coding the version # for dependent project. Is there any way it can be done dynamically which will reduce manual intervention in the build process? Did it work for anyone? -- View this message in

Re: Replace Dynamic Revisions during

2012-07-25 Thread krishna chaitanya kurnala
Hello we are using http://mojo.codehaus.org/versions-maven-plugin/ Please check it out. thanks, Krishna Chaitanya On Wed, Jul 25, 2012 at 6:30 AM, szms shafi1...@hotmail.com wrote: I am working on cross dependent projects in order to build using Maven. At this moment I am hard coding the

Re: Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread Anders Hammar
Based on the information on [1], you shouldn't declare a dependency to the driver on the plugin itself, but just on the project. Try removing that. Also, not seeing the complete POM, is the projects dependency to the driver really a declared dependency? Or is it just in dependencyManagement? I

Re: Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread John Kramer
Hi Anders, Thanks for your reply. 1) Originally, there was no dependency on the plugin just on the driver. I added it because I had found some examples on the web suggesting maybe it should be there. Indeed, then the plugin showed up as part of the class realm plugin (see * below): [DEBUG]

Re: Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread John Kramer
It seems that updating the plugin made no difference. John Kramer email: jkra...@mojiva.com mobile: 314.435.2370 skype: kramer.mojiva 0xCAFEBABE0032 On 7/25/12 4:43 PM, John Kramer jkra...@mojiva.com wrote: Hi Anders, Thanks for your reply. 1) Originally, there was no dependency on

Re: Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread Anders Hammar
OK. I have no clue then. The Liquibase forum should be your best source as I don't think this is a general Maven thing. At least I couldn't spot a problem based on the info you posted. But I would guess it's just some silly thing as I'm having a hard time it being a bug. Try find some other

how to use regular expression in mvn test command

2012-07-25 Thread javadev
in below link http://maven.apache.org/plugins/maven-surefire-plugin/examples/single-test.html i do see that i can use pattern with mvn test command. But below test command is not working for me. mvn test -Dtest=MyTest[1-3]_test it is giving me no test found. Where as i have MyTest1_test,

maven dependency and war file

2012-07-25 Thread szms
Hello... I have two projects A and B B depends on A. If I make any changes on project A and run mvn install on project B, the changes from project A does not get included to war file for project B. However, if I run mvn install on project A and then run mvn install on project B, the changes

Re: Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread Wayne Fay
Try find some other project on the Internet that uses the plugin and compare the pom! https://github.com/blog/202-github-code-search ;-) http://www.koders.com/ etc Wayne - To unsubscribe, e-mail:

Re: maven dependency and war file

2012-07-25 Thread Wayne Fay
If I make any changes on project A and run mvn install on project B, the changes from project A does not get included to war file for project B. However, if I run mvn install on project A and then run mvn install on project B, the changes from project A gets included to war file for project

Re: Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread John Kramer
I finally resolved my issue and it has nothing to do with Maven or liquibase. I upgraded my postgresql driver version and it's fixed. After examining the slightly older version in my local repo, it turns out that although unzip tolerates the archive, jar does not. A nicer error message would

Re: maven dependency and war file

2012-07-25 Thread Anders Hammar
Make a parent over A and B. I think you mean an aggregating project. Build from the parent. Set a dependency from B to A. Changes in A will go into B. In this case I would stress that this is only appropriate if A and B are related and it is appropriate to (always) build them together. A

Re: Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread Anders Hammar
As I thought, some silly thing. :-) But sure, it would have been nice if the JVM could have informed of this problem. But maybe it would have if verbose had been turned on. Anyways, thanks for reporting back. Stuff like this always bugs me, I keep thinking there's something obvious I've missed.

Re: Issue with liquibase plugin and Maven: Cannot find database driver: org.postgresql.Driver

2012-07-25 Thread Wayne Fay
After examining the slightly older version in my local repo, it turns out that although unzip tolerates the archive, jar does not. A nicer error message would have been good, but I am not sure that that is really a Maven issue. It likely has to do with the particular JVM and class loader