RE: // deploy fails
Hi The only difference between yours and mine is that I have a name/name tag. I would look else where for the problem. Like execute the scp command from command line, out side of maven. Thanks Lakshman -Original Message- From: Janos Mucsi [mailto:[EMAIL PROTECTED] Sent: Thursday, 5 October 2006 10:42 AM To: Maven Users List Subject: scp:// deploy fails Hi I have distributionManagement repository idpublicGroupProxy/id urlscp://11.16.152.152/copyhere/url /repository /distributionManagement I am running mvn deploy and I am always getting the same error: Error deploying artifact: Error performing commands for file transfer Exit code: 1 - The syntax of the command is incorrect. Do you have any examples? Thanks. Janos Mucsi 415-422-1692 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Excluding depencencies inherited from parent
Try http://www.nabble.com/Maven-2-pom.xml-tf2359171.html#a6572411 Thanks Lakshman -Original Message- From: Tom Hurley [mailto:[EMAIL PROTECTED] Sent: Saturday, 30 September 2006 10:31 AM To: Maven Users List Subject: Excluding depencencies inherited from parent Hi: Is it possible to exclude dependencies inherited from a parent pom in a child's pom. I have a multi level project where each project inherits dependencies from its parent. However in one of the children, one of its dependencies is causing some problems with one of the inherited dependencies. Is it possible to exclude this? Any help would be greatly appreciated. Thanks, Tom. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [M2] Mirror
Hi Remy, No, I have not compared Proximity and MRM. The reason being I could not locate a download for MRM and the following URL appeared to indicate that it was under development at the time when I wanted a maven proxy. http://maven.apache.org/archiva/ Thanks Lakshman _ From: Rémy Sanlaville [mailto:[EMAIL PROTECTED] Sent: Thursday, 28 September 2006 6:38 PM To: Lakshman Srilakshmanan Subject: Re: [M2] Mirror Hi Tamás and Lakshman, Thanks for your reply. I would seriously question the need to get a mirror of central. For one thing, it's 5GB. Secondly you would never use it all. You would probably use a small fraction (ie at most 10%). My need is not just for my projects, but we want to test Maven 2 in a corporate context. As Better Build with Maven Book says : It is also possible to set up another repository (or use the same one) to mirror content from the Maven central repository. While this isn't required, it is common in many organizations as it eliminates the requirement for Internet access or proxy configuration. In addition, it provides faster performance (as most downloads to individual developers come from within their own network), and gives full control over the set of artifacts with which your software is built, by avoiding any reliance on Maven's relatively open central repository. As suggested by Tamás Cservenák, you should consider using proximity. It works like central and will hold only what you require. Yes, We have a look to proxy also and particularly to Proximity (Tamás have done a great job !). Do you have a comparison between Proximity and Maven Repository Manager (MRM). Thanks, R2my
RE: Maven+Checkstyle - Configuration file location
Hi Stephen / Roy, I would like to include a LICENSE.txt file as part of the jar (checkstyle-1.0-SNAPSHOT.jar) as listed below. 0 Wed Sep 27 02:05:48 EST 2006 META-INF/ 127 Wed Sep 27 02:05:46 EST 2006 META-INF/MANIFEST.MF 26 Wed Sep 27 02:05:46 EST 2006 LICENSE.txt 433 Wed Sep 27 02:05:46 EST 2006 CheckstyleSuppressions.xml 14230 Wed Sep 27 02:05:46 EST 2006 CustomisedCheckstyle.xml 0 Wed Sep 27 02:05:48 EST 2006 META-INF/maven/ 0 Wed Sep 27 02:05:48 EST 2006 META-INF/maven/customised/ 0 Wed Sep 27 02:05:48 EST 2006 META-INF/maven/customised/checkstyle/ 1310 Wed Sep 27 02:05:40 EST 2006 META-INF/maven/customised/checkstyle/pom.xml 112 Wed Sep 27 02:05:48 EST 2006 META-INF/maven/customised/checkstyle/pom.properties When I reference it within CustomisedCheckstyle.xml as follows it is unable to find it. module name=Header property name=headerFile value=LICENSE.txt/ property name=ignoreLines value=1, 2/ /module Could you please let me know what I should be putting in the value field to get checkstyle to find it. Thanks Lakshman -Original Message- From: Lakshman Srilakshmanan Sent: Wednesday, 20 September 2006 4:23 PM To: '[EMAIL PROTECTED]' Subject: RE: Maven+Checkstyle - Configuration file location Hi Stephen, Thanks, it works well now. Lakshman -Original Message- From: Stephen Duncan [mailto:[EMAIL PROTECTED] Sent: Wednesday, 20 September 2006 1:48 AM To: Maven Users List Subject: Re: Maven+Checkstyle - Configuration file location You need to set up your dependency as an extension, not as a plugin dependency. I'm not 100% clear on whether this is because of a bug, or if this is how things are intended to be, but it should work if you move the dependency and declare it as an extension, like in the example a the bottom of this page: http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html -Stephen On 9/19/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Roy, I was trying to implement the checkstyle configuration as you have done without much success. I was hoping you could help me. I created a project that builds a jar file containing my checkstyle and suppression and installed it in my local repository. The contents of this jar file (checkstyle-1.0-SNAPSHOT.jar) is listed below. 0 Tue Sep 19 14:32:08 EST 2006 META-INF/ 127 Tue Sep 19 14:32:06 EST 2006 META-INF/MANIFEST.MF 433 Tue Sep 19 14:32:06 EST 2006 CheckstyleSuppressions.xml 14161 Tue Sep 19 14:32:06 EST 2006 CustomisedCheckstyle.xml 0 Tue Sep 19 14:32:08 EST 2006 META-INF/maven/ 0 Tue Sep 19 14:32:08 EST 2006 META-INF/maven/customised/ 0 Tue Sep 19 14:32:08 EST 2006 META-INF/maven/customised/checkstyle/ 678 Mon Sep 18 15:03:24 EST 2006 META-INF/maven/customised/checkstyle/pom.xml 112 Tue Sep 19 14:32:06 EST 2006 META-INF/maven/customised/checkstyle/pom.properties I then included the above file under pluginManagement in my POM as follows. pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId dependencies dependency groupIdcustomised.checkstyle/groupId artifactIdcheckstyle/artifactId version1.0-SNAPSHOT/version /dependency /dependencies /plugin /pluginManagement I then included the above definition of the plugin under reports as follows. reporting plugins plugin artifactIdmaven-checkstyle-plugin/artifactId configuration configLocationCustomisedCheckstyle.xml/configLocation suppressionsLocationCheckstyleSuppressions.xml/suppressionsLocation /configuration /plugin /plugins /reporting When I run mvn clean site I get the following error Embedded error: Error rendering Maven report: Unable to find configuration file location. Unable to find location 'CustomisedCheckstyle.xml' as URL, File or Resource. The funny thing is, when I ran it first I forgot to install the checkstyle-1.0-SNAPSHOT.jar and maven did not complain about not finding the jar file. Not sure what I am doing wrong, but your assistance is greatly appreciated. Thanks Lakshman -Original Message- From: Roy van der Kuil [mailto:[EMAIL PROTECTED] Sent: Monday, 4 September 2006 10:10 PM To: Maven Users List Subject: Re: Maven+Checkstyle - Configuration file location Hi, We have a similar setup and have created a 'project' with only a couple of resources. (our own version of the checkstyle xml and suppressions). We deployed
RE: [M2] Mirror
Hi Remy, I would seriously question the need to get a mirror of central. For one thing, it's 5GB. Secondly you would never use it all. You would probably use a small fraction (ie at most 10%). As suggested by Tamás Cservenák, you should consider using proximity. It works like central and will hold only what you require. Thanks Lakshman -Original Message- From: Tamás Cservenák [mailto:[EMAIL PROTECTED] Sent: Thursday, 28 September 2006 3:10 AM To: Maven Users List Subject: Re: [M2] Mirror Or as an alternative, you can look for Proximity: http://proximity.abstracthorizon.org/ ~t~ On 9/26/06, Rémy Sanlaville [EMAIL PROTECTED] wrote: Hi Johan, Try rsync -rlHtSv [EMAIL PROTECTED]::maven2 /var/www/maven2 where /var/www/maven2 is the location where you want to put the files. You would then have to make the location available over HTTP. I am trying this command but I have some trouble with the corporate security and proxy. I will also try archiva ( http://maven.apache.org/archiva/maven-repository-utils/index.html) Many thanks, Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dependency management
Hi Alexander Yann I believe if you declare a dependency and don't have it specified as a module, maven will try and download it from the repository. Thanks Lakshman -Original Message- From: Yann Le Du [mailto:[EMAIL PROTECTED] Sent: Thursday, 28 September 2006 3:05 AM To: Maven Users List Subject: Re: Dependency management Hi Alexander, 2006/9/27, Morgovsky, Alexander (US - Glen Mills) [EMAIL PROTECTED]: Hi, I have a few questions about modules and dependencies. Does the order of modules listed in the parent pom.xml matter? For example, if C depends on A and B depends on C, then the correct order would be:A, C B moduleA/module moduleC/module moduleB/module If I specify instead moduleA/module moduleB/module moduleC/module, will Maven pick up the right dependency order and build as if I had written A,C,B? Order doesn't matter, Maven does well. But you could simply try. ^_^ As for my second question, if I declare a dependency in a project, will that artifact be automatically built and deployed to maven repo so that it would be picked up for build? For example, if I declare: dependency groupIdb/groupId artifactIda/artifactId version1.0/version /dependency Will Maven go and build a for me or do I need to include a as a submodule? Thanks. Maven won't build it - if your dependency was Spring, Maven wouldn't build Spring. So, yes, you need to include a as a submodule. HTH, - Yann This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Two dependencies depending on different versions of commons-collections
Hi Stefan, Please read pg 57 58 of Better Builds with Maven (3.6 Resolving dependency conflicts and using version ranges). Essentially, you have one of two options. You can exclude it from Wicket. For example dependencies dependency groupIdWicket/groupId artifactIdWicket/artifactId version2.0/version exclusions exclusion groupIdcommons-collections/groupId artifactIdcommons-collections/artifactId /exclusion /exclusions /dependency /dependencies The drawback in the above approach is that, if you include a new jar file that is dependent on commons-collections 3.0 your build will break. The example below will work for all current and future release. dependency groupIdcommons-collections/groupId artifactIdcommons-collections/artifactId version[3.2,)/version /dependency It is preferable to include the above dependency in your parent POM to ensure that this is reflected in all your projects. Thanks Lakshman -Original Message- From: Stefan Arentz [mailto:[EMAIL PROTECTED] Sent: Saturday, 23 September 2006 10:31 PM To: Maven Users List Subject: Two dependencies depending on different versions of commons-collections I have two dependencies in my project that both depend on different versions of commons-collections. OpenJPA - commons-collections 3.2 Wicket 2.0 - commons-collections 2.1 Wicket seems to 'win' and commons-collections 2.1 is included. Unfortunately this does not work for OpenJPA so I had to add a dependency to commons-collections 3.1 to my project. That seemed to override the choice. Is there a better way to do this? If I know that commons-collections always guarantees backward compatibility, is it possible to change the dependency in Wicket to 'commons collections 2.1 or higher' ? Can Maven2 do that and will that help resolving the right version in this case? S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Second source directory for generated code
Hi Olaf, I take it that you don't have a well formed maven plugin for generating your source files. If the above is true, then you would be better off developing a maven plugin that generates your source file and adds the directory to your POM dynamically. Ref to Pg 147 in Better builds with Maven on how to add a new source directory from within your mojo. Thanks Lakshman -Original Message- From: Olaf Kossak [mailto:[EMAIL PROTECTED] Sent: Friday, 22 September 2006 10:54 PM To: users@maven.apache.org Subject: Second source directory for generated code Hi there, after googeling for an hour without result I need some help: How can I separate my handwritten source code under version control from my generated code (not under version control) Some manually and generated classes are interdependent and need to be placed in same packages. The perfect solution in Eclipse are two source directories, src/main/java which one is under version control and target/src-gen/main/java which is not versioned. But how can I tell about this to Maven2? Olaf Kossak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] Dashboard
Hi All, Is there a maven-dashboard-plugin as in maven 1.x for maven 2 ? Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: central Repository and mirrorOf
Hi Roman, profile idmyCompanyProfile/id repositories repository idcentral/id nameMy Central Repository/name urlhttp://host/abcd/.../url /repository repository idmyTmpRepo/id nameTemporary Repository/name urlhttp://host/tmp/... /url /repository repositories /profile Then, under activeProfiles activeProfilemyCompanyProfile/activeProfile /activeProfiles --- But I believe, you can do the following in your POM. I have _not_ tested this. build . . . /build repositories repository idcentral/id nameMy Central Repository/name urlhttp://host/abcd/.../url /repository repository idmyTmpRepo/id nameTemporary Repository/name urlhttp://host/tmp/... /url /repository repositories Thanks Lakshman -Original Message- From: Roman Gelfand [mailto:[EMAIL PROTECTED] Sent: Wednesday, 20 September 2006 10:59 PM To: Lakshman Srilakshmanan; Maven Users List Subject: RE: central Repository and mirrorOf Hi Lakshman, Thanks you for your answer. Between which tags repositories tag has to LOCATE in user's settings.xml file? Thanks, Roman -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 2:53 AM To: Roman Gelfand Cc: Maven Users List Subject: RE: central Repository and mirrorOf Hi Roman, Sorry for the late reply. I was sick whole of last week, thanks to my kids. You would have got a quicker response if you had emailed to the user group. I believe you have missed the repositories tag. I don't hold my repository information in the POM. I normally declare it in the settings.xml of the user. repositories repository idcentral/id nameInternal Mirror of Central Repository/name urlhttp://my.test.com/central/url /repository repositories Thanks Lakshman -Original Message- From: Roman Gelfand [mailto:[EMAIL PROTECTED] Sent: Thursday, 14 September 2006 4:13 PM To: Lakshman Srilakshmanan Subject: RE: central Repository and mirrorOf Hi Lakshman, Could you please help me? I put repository tag in my POM file, as build sourceDirectorycheckouts/sourceDirectory /build repository idcentral/id nameInternal Mirror of Central Repository/name urlhttp://my.test.com/central/url /repository dependencies dependency and I get the following error: [INFO] Scanning for projects... [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: unknown POM Location: C:\quickbuild-1.0.9\working\root\BAC\Foundations\pom.xml Reason: Parse error reading POM. Reason: Unrecognised tag: 'repository' (positio n: START_TAG seen .../build\r\n repository... @13:15) [INFO] [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Parse error reading POM. Reaso n: Unrecognised tag: 'repository' (position: START_TAG seen ./build\r\n re pository... @13:15) *** Please advise. Thank you inadvance, Roman -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 05, 2006 11:03 AM To: Maven Users List Subject: central Repository and mirrorOf Hi All, Could someone please clarify the difference between declaring mirrorOfcentral/mirrorOf and repository idcentral/id nameInternal Mirror of Central Repository/name urlhttp://my.test/central/url /repository It appears to me that maven will look at mirrorOf to find it's download. So what would be the difference in declaring idcentral/id. To me it appears to be doing the same thing. I must be missing something. Could someone please help me to clarify this doubt Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email
RE: Maven+Checkstyle - Configuration file location
Hi Roy, I was trying to implement the checkstyle configuration as you have done without much success. I was hoping you could help me. I created a project that builds a jar file containing my checkstyle and suppression and installed it in my local repository. The contents of this jar file (checkstyle-1.0-SNAPSHOT.jar) is listed below. 0 Tue Sep 19 14:32:08 EST 2006 META-INF/ 127 Tue Sep 19 14:32:06 EST 2006 META-INF/MANIFEST.MF 433 Tue Sep 19 14:32:06 EST 2006 CheckstyleSuppressions.xml 14161 Tue Sep 19 14:32:06 EST 2006 CustomisedCheckstyle.xml 0 Tue Sep 19 14:32:08 EST 2006 META-INF/maven/ 0 Tue Sep 19 14:32:08 EST 2006 META-INF/maven/customised/ 0 Tue Sep 19 14:32:08 EST 2006 META-INF/maven/customised/checkstyle/ 678 Mon Sep 18 15:03:24 EST 2006 META-INF/maven/customised/checkstyle/pom.xml 112 Tue Sep 19 14:32:06 EST 2006 META-INF/maven/customised/checkstyle/pom.properties I then included the above file under pluginManagement in my POM as follows. pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId dependencies dependency groupIdcustomised.checkstyle/groupId artifactIdcheckstyle/artifactId version1.0-SNAPSHOT/version /dependency /dependencies /plugin /pluginManagement I then included the above definition of the plugin under reports as follows. reporting plugins plugin artifactIdmaven-checkstyle-plugin/artifactId configuration configLocationCustomisedCheckstyle.xml/configLocation suppressionsLocationCheckstyleSuppressions.xml/suppressionsLocation /configuration /plugin /plugins /reporting When I run mvn clean site I get the following error Embedded error: Error rendering Maven report: Unable to find configuration file location. Unable to find location 'CustomisedCheckstyle.xml' as URL, File or Resource. The funny thing is, when I ran it first I forgot to install the checkstyle-1.0-SNAPSHOT.jar and maven did not complain about not finding the jar file. Not sure what I am doing wrong, but your assistance is greatly appreciated. Thanks Lakshman -Original Message- From: Roy van der Kuil [mailto:[EMAIL PROTECTED] Sent: Monday, 4 September 2006 10:10 PM To: Maven Users List Subject: Re: Maven+Checkstyle - Configuration file location Hi, We have a similar setup and have created a 'project' with only a couple of resources. (our own version of the checkstyle xml and suppressions). We deployed this 'jar' and made the maven-checkstyle-plugin dependant on that dependancy: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId dependencies dependency groupIdacompany/groupId artifactIdacompay_style/artifactId version1.0-SNAPSHOT/version /dependency /dependencies /plugin This actually works very well and makes sure every project uses the 'latest' style. On 9/4/06, Olivier Vierlinck [EMAIL PROTECTED] wrote: We use maven+checkstyle on a multi-project. We have defined our checks (mycheckstyle.xml) for one of the component. The xml file is stored right at the root of the component (next to the src and target folders) in the top pom file we have: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocationmycheckstyle.xml/configLocation /configuration /plugin So we have a structure like this topProject --- pom.xml --- subComponent1 --- --- src --- --- target --- --- pom.xml --- --- mycheckstyle.xml --- --- ... --- subComponent2 --- --- src --- --- target --- --- pom.xml --- --- ... --- --- subsubComponent2.1 --- --- --- src --- --- --- target --- --- --- pom.xml --- --- --- ... This works fine. But now, we would like to use the same configuration file for ALL our component. So, we would like to have our (single) mycheckstyle.xml file stored only once, right under the topProject, next to the top pom.xml file. How can we define that in the pom file. I tried using relative path (../mycheckstyle.xml), full url (file:../mycheckstyle.xml), using maven variables ($project.dir/mycheckstyle.xml) but without success, always with one or another error message from maven such as Unable to find location '../mycheckstyle.xml' as URL, File or Resource. Is there any way to combine maven's knowledge of the project/components tree so that each individual component knwos the top level and use it to locate the
RE: central Repository and mirrorOf
Hi Roman, Sorry for the late reply. I was sick whole of last week, thanks to my kids. You would have got a quicker response if you had emailed to the user group. I believe you have missed the repositories tag. I don't hold my repository information in the POM. I normally declare it in the settings.xml of the user. repositories repository idcentral/id nameInternal Mirror of Central Repository/name urlhttp://my.test.com/central/url /repository repositories Thanks Lakshman -Original Message- From: Roman Gelfand [mailto:[EMAIL PROTECTED] Sent: Thursday, 14 September 2006 4:13 PM To: Lakshman Srilakshmanan Subject: RE: central Repository and mirrorOf Hi Lakshman, Could you please help me? I put repository tag in my POM file, as build sourceDirectorycheckouts/sourceDirectory /build repository idcentral/id nameInternal Mirror of Central Repository/name urlhttp://my.test.com/central/url /repository dependencies dependency and I get the following error: [INFO] Scanning for projects... [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: unknown POM Location: C:\quickbuild-1.0.9\working\root\BAC\Foundations\pom.xml Reason: Parse error reading POM. Reason: Unrecognised tag: 'repository' (positio n: START_TAG seen .../build\r\n repository... @13:15) [INFO] [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Parse error reading POM. Reaso n: Unrecognised tag: 'repository' (position: START_TAG seen ./build\r\n re pository... @13:15) *** Please advise. Thank you inadvance, Roman -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 05, 2006 11:03 AM To: Maven Users List Subject: central Repository and mirrorOf Hi All, Could someone please clarify the difference between declaring mirrorOfcentral/mirrorOf and repository idcentral/id nameInternal Mirror of Central Repository/name urlhttp://my.test/central/url /repository It appears to me that maven will look at mirrorOf to find it's download. So what would be the difference in declaring idcentral/id. To me it appears to be doing the same thing. I must be missing something. Could someone please help me to clarify this doubt Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [M2] Managing Repositories
Hi Andreas, I had the same problem and the way I resolved it is as follows. Firstly I used Proximity as my proxy server to create my internal repository. Then I implemented a web server to read the internal repository. The developers were provided with the web servers http link. The above approach ensured that the developers could not download any files into the internal Repository automatically. If I needed to install a new plugin/dependency I used to use the http link provided by Proximity. This would first put the files into the internal repository before installing it in my local repository. Hope this helps. Thanks Lakshman -Original Message- From: Andreas Guther [mailto:[EMAIL PROTECTED] Sent: Sunday, 17 September 2006 3:59 AM To: Maven Users List Subject: [M2] Managing Repositories Hi, I am struggling with the question on how to maintain a controlled internal repository with Maven 2. We want to have full control over the downloaded dependencies and configured Maven to use as central repository our internal repository server. With this configuration no external repository is used. In my settings.xml file I have configured Ibiblio as external repository server and activate the profile whenever I have to use components with dependencies that are not in our internal repository. The problem I have is that getting the internal/central repository updated with the new dependencies is rather a tedious and time intensive task, especially if for example a maven plug-in is added that comes with lots of transient dependencies. My question is: Ho do other teams deal with that problem? Are there tools that list differences between two different repositories (local and internal)? I used Maven Archiva as proxy repository but that does not give us the control over what gets added to the repository. Thanks in advance for any hint and suggestion. Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [M2] Managing Repositories
Hi barrie, After reading your post, I beg to differ on the need to lock down the repository. Locking down your repository has nothing to do with _not_ trusting your developers. The reason you lock down your repository is to avoid any unintentional library conflicts that may arise when you have multiple projects using the same repository. A single developer will not be preview to all the dependency matrix (especially the new graduates) and avoids any accidental library conflicts that may arise due to a new core library being installed. Thanks Lakshman -Original Message- From: Barrie Treloar [mailto:[EMAIL PROTECTED] Sent: Monday, 18 September 2006 11:02 AM To: Maven Users List Subject: Re: [M2] Managing Repositories On 9/17/06, Andreas Guther [EMAIL PROTECTED] wrote: Hi, I am struggling with the question on how to maintain a controlled internal repository with Maven 2. We want to have full control over the downloaded dependencies and configured Maven to use as central repository our internal repository server. With this configuration no external repository is used. I will link to my response to a similar query. http://www.nabble.com/forum/ViewPost.jtp?post=6087922framed=y Essentially I question the need for a locked down repository. About the only time I can see a need for this is because of security restrictions on network connections (i.e. defence with a secure and insecure network, as the secure network can not connect to ibiblio). Any other reason is just making busy work and adds no value. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
maven ignores settings.xml
Hi All, /opt/m2/bin/mvn clean -X When I run the above command in my Commons Project, maven, uses the ~/.m2/settings.xml file to resolve the repositories it needs to access. But when I run /opt/m2/bin/mvn archetype:create -DgroupId=customised -DartifactId=checkstyle -X maven ignores the ~/.m2/settings.xml file and attempts to access dependencies from http://repo1.maven.org/maven2. Is this the expected behaviour or am I missing something. Any assistance in this matter is greatly appreciated. Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven for .Net
Ya, I would, if I new the next thing about .Net world. How would tools like code coverage (cobertura), PMDCPD, checkstyle integrate with .Net ? If I need compatible tools in .Net does anyone know what they are called ? Thanks Lakshman -Original Message- From: Markus KARG [mailto:[EMAIL PROTECTED] Sent: Friday, 8 September 2006 1:42 AM To: Maven Users List Subject: Re: Maven for .Net AFAIK it should be possible to write a plugin that handles .net flavours, since Maven is 100% pure Java, and Java can use JNI or exec() to call native tools. So even there might be no such plugin yet, you might want to contribute one? Lakshman Srilakshmanan wrote: Hi All, My company has a fair few VB, MS .Net projects. Do we have a flavour of Maven for managing the above projects ? If not is there any plans to develop Maven for other technologies ? if the answer to my above question is _NO_ :), then does any one know of similar tools for the above technologies. Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: localRepository in user settings.xml
Hi, I would imagine you need to include the settings.xml under C:\Documents and Settings\borutb\.m2\ Why ? because that's where maven will look for the settings.xml file. Once maven has read your settings.xml it will relocated your localRepository to C:\m2\repository. Thanks Lakshman -Original Message- From: Borut Bolčina [mailto:[EMAIL PROTECTED] Sent: Friday, 8 September 2006 12:06 AM To: maven Subject: localRepository in user settings.xml Hello, I want my local repository to be at C:\m2\repository so I included ?xml version=1.0 encoding=UTF-8? settings localRepositoryC:\m2\repository/localRepository .. in settings.xml in C:\m2\settings.xml mvn help:effective-settings spits out [INFO] [help:effective-settings] [INFO] Effective settings: ?xml version=1.0 encoding=UTF-8?settings localRepositoryC:\Documents and Settings\borutb\.m2\repository/localRepository profiles .. which is not correct. This is the default. But if I put localRepository in conf/settings.xml then it works. Why my user settings are not everriding the default ones? Cheers, Borut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing third party libraries
Hi Jochen, Is there a -DgenerateCheckSum=true ??? Where can I get all the available options ? Thanks Lakshman -Original Message- From: Jochen Wiedmann [mailto:[EMAIL PROTECTED] Sent: Tuesday, 5 September 2006 10:06 PM To: Maven Users List Subject: Re: Installing third party libraries Dudu wrote: When I install a third part library, the poom is not generated automatically. Is right this behavior? -DgeneratePom=true - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why would Maven Not look in local repo?
It's an element in your settings.xml http://maven.apache.org/maven-settings/settings.html#class_repository for example --- repository idcentral/id urlhttp://repo1.maven.org/maven2/url releases enabledtrue/enabled updatePolicynever/updatePolicy /releases snapshots enabledfalse/enabled /snapshots /repository Note : the above repository does not contain snapshot versions, therefore the snapshot element above is redundant. I have included it for illustration only. Thanks Lakshman -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, 7 September 2006 2:06 AM To: Maven Users List Subject: RE: Why would Maven Not look in local repo? This is great info; but where and how do I implement the update policy=never configuration? Wayne Naccari Lakshman Srilakshmanan [EMAIL PROTECTED] 09/05/2006 07:26 PM Please respond to Maven Users List users@maven.apache.org To Maven Users List users@maven.apache.org cc Subject RE: Why would Maven Not look in local repo? Hi, I know the frustration. :) I was there ... Maven looks for updates daily at ibiblio using a reserved repository id central. Maven is configured to look at this daily for updates. Hence, even if you have the plugins/jar file in your Local Repo it looks for new version daily at central and any other repositories you may have setup. How to prevent this ? I hear you asking. There is a updatePolicy which must be set to never for every repository including central. This will cause maven to look at ibiblio only if the plugin/jar does not exist in your Local Repo. Thanks Lakshman -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 6 September 2006 7:46 AM To: users@maven.apache.org Subject: Why would Maven Not look in local repo? Importance: High It seems that Maven is looking directly into the Ibiblio repo for items it should be finding in the local repo. They are there right where they were yesterday. Now the builds are failing because it can't find local versions of components when it looks in the central repo. There's nothing in the history or log that shows it tried and failed to get these items from the local repo!!! Any ideas; some config issue? - This e-mail and any attachments are intended only for the individual or company to which it is addressed and may contain information which is privileged, confidential and prohibited from disclosure or unauthorized use under applicable law. If you are not the intended recipient of this e-mail, you are hereby notified that any use, dissemination, or copying of this e-mail or the information contained in this e-mail is strictly prohibited by the sender. If you have received this transmission in error, please return the material received to the sender and delete all copies from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven for .Net
Hi All, My company has a fair few VB, MS .Net projects. Do we have a flavour of Maven for managing the above projects ? If not is there any plans to develop Maven for other technologies ? if the answer to my above question is _NO_ :), then does any one know of similar tools for the above technologies. Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
central Repository and mirrorOf
Hi All, Could someone please clarify the difference between declaring mirrorOfcentral/mirrorOf and repository idcentral/id nameInternal Mirror of Central Repository/name urlhttp://my.test/central/url /repository It appears to me that maven will look at mirrorOf to find it's download. So what would be the difference in declaring idcentral/id. To me it appears to be doing the same thing. I must be missing something. Could someone please help me to clarify this doubt Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why would Maven Not look in local repo?
Hi, I know the frustration. :) I was there ... Maven looks for updates daily at ibiblio using a reserved repository id central. Maven is configured to look at this daily for updates. Hence, even if you have the plugins/jar file in your Local Repo it looks for new version daily at central and any other repositories you may have setup. How to prevent this ? I hear you asking. There is a updatePolicy which must be set to never for every repository including central. This will cause maven to look at ibiblio only if the plugin/jar does not exist in your Local Repo. Thanks Lakshman -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 6 September 2006 7:46 AM To: users@maven.apache.org Subject: Why would Maven Not look in local repo? Importance: High It seems that Maven is looking directly into the Ibiblio repo for items it should be finding in the local repo. They are there right where they were yesterday. Now the builds are failing because it can't find local versions of components when it looks in the central repo. There's nothing in the history or log that shows it tried and failed to get these items from the local repo!!! Any ideas; some config issue? - This e-mail and any attachments are intended only for the individual or company to which it is addressed and may contain information which is privileged, confidential and prohibited from disclosure or unauthorized use under applicable law. If you are not the intended recipient of this e-mail, you are hereby notified that any use, dissemination, or copying of this e-mail or the information contained in this e-mail is strictly prohibited by the sender. If you have received this transmission in error, please return the material received to the sender and delete all copies from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven 2.0 Help
Hi Ritchie, Could you please provide a full listing of all the files in your directory including full directory structure. Eg dir /s out.txt Could you also provide the full stack trace as the one you have provided appears to be missing information. Ref to line 3 below. create test class 'com.mycompany.app.AppTest'; nested exception is java.lang.ClassNotFoundException: com.mycompany.app.AppTest; nested exception is org.apache.maven.s is java.lang.ClassNotFoundException: com.mycompany.app.AppTest Thanks Lakshman -Original Message- From: Ritchie Francis [mailto:[EMAIL PROTECTED] Sent: Wednesday, 6 September 2006 3:55 AM To: users@maven.apache.org Subject: Maven 2.0 Help Hi, Sorry for pasting in a large stack trace but I'm tearing my hair out with Maven at the moment. I'm a newbie with this so please be patient. I downloaded Maven version 2.0 and followed the instructions regarding set up. I unzipped to C:/maven and it set the path as specified, I also have JDK 1.5 set too. I created the test project using: mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app then compile in the my-app dir using: mvn complie finally, I run the test command: mvn test However I get the stack trace below. I've tried deleting the default repository .m2 and starting again, but to no avail. Any assistance/pointers would be greatly appreciated. [INFO] Surefire report directory: C:\my-app\target\surefire-reports org.apache.maven.surefire.booter.SurefireExecutionException: Unable to create test class 'com.mycompany.app.AppTest'; nested exception is java.lang.ClassNotFoundException: com.mycompany.app.AppTest; nested exception is org.apache.maven.s is java.lang.ClassNotFoundException: com.mycompany.app.AppTest org.apache.maven.surefire.testset.TestSetFailedException: Unable to create test class 'com.mycompany.app.AppTest'; nested exception is java.lang.ClassNotFoundException: com.mycompany.app.AppTest java.lang.ClassNotFoundException: com.mycompany.app.AppTest at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedC lassLoader.java:100) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSet s(AbstractDirectoryTestSuit e.java:84) at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.ja va:147) at org.apache.maven.surefire.Surefire.run(Surefire.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Suref ireBooter.java:225) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java :747) [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] There are test failures. [INFO] [INFO] Trace org.apache.maven.BuildFailureException: There are test failures. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default LifecycleExecutor.java:540) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec ycle(DefaultLifecycleExecut or.java:469) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL ifecycleExecutor.java:448) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle Failures(DefaultLifecycleEx ecutor.java:301) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.ja va:268) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec ycleExecutor.java:137) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113) at org.apache.maven.cli.MavenCli.main(MavenCli.java:249) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at
RE: Making a single independent and offline maven build directory
Hi Sepand, If you don't want access to the internet and no access to ~/.m2/repository where are you going to get your dependencies from ? an internal (company) Repository. If you are going to get it from an internal repository, then just remove ~/.m2/repository and run your build. This will download all the jars plugins again and build it. On the other hand if you are trying to prevent the creation of ~/.m2/repository then I don't think it is possible. You may want to understand what you are trying to do. Thanks Lakshman -Original Message- From: Sepand M [mailto:[EMAIL PROTECTED] Sent: Wednesday, 6 September 2006 8:07 AM To: users@maven.apache.org Subject: Making a single independent and offline maven build directory Hi, I need to make a maven project build with no dependency on the internet. I also need this to be over the network (so no access to ~/.m2) and runnable without write permissions (except for the built files). If you're wondering, I'm hoping to check a copy of this into a source control system. Can maven to this easily? I know of the -o option, but I don't know how to make it work without the ~/.m2. I'd rather not touch the project POMs and I would really hate to have to create my own ftp/sftp/... local repository. Any help would be greatly appreciated. Regards, Sepand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven+Checkstyle - Configuration file location
Ya +1. I think I will do the same, Thanks Roy. Thanks Lakshman -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Tuesday, 5 September 2006 8:37 AM To: Maven Users List Subject: Re: Maven+Checkstyle - Configuration file location This is a great solution to this problem, Roy. Wayne On 9/4/06, Roy van der Kuil [EMAIL PROTECTED] wrote: Hi, We have a similar setup and have created a 'project' with only a couple of resources. (our own version of the checkstyle xml and suppressions). We deployed this 'jar' and made the maven-checkstyle-plugin dependant on that dependancy: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId dependencies dependency groupIdacompany/groupId artifactIdacompay_style/artifactId version1.0-SNAPSHOT/version /dependency /dependencies /plugin This actually works very well and makes sure every project uses the 'latest' style. On 9/4/06, Olivier Vierlinck [EMAIL PROTECTED] wrote: We use maven+checkstyle on a multi-project. We have defined our checks (mycheckstyle.xml) for one of the component. The xml file is stored right at the root of the component (next to the src and target folders) in the top pom file we have: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocationmycheckstyle.xml/configLocation /configuration /plugin So we have a structure like this topProject --- pom.xml --- subComponent1 --- --- src --- --- target --- --- pom.xml --- --- mycheckstyle.xml --- --- ... --- subComponent2 --- --- src --- --- target --- --- pom.xml --- --- ... --- --- subsubComponent2.1 --- --- --- src --- --- --- target --- --- --- pom.xml --- --- --- ... This works fine. But now, we would like to use the same configuration file for ALL our component. So, we would like to have our (single) mycheckstyle.xml file stored only once, right under the topProject, next to the top pom.xml file. How can we define that in the pom file. I tried using relative path (../mycheckstyle.xml), full url (file:../mycheckstyle.xml), using maven variables ($project.dir/mycheckstyle.xml) but without success, always with one or another error message from maven such as Unable to find location '../mycheckstyle.xml' as URL, File or Resource. Is there any way to combine maven's knowledge of the project/components tree so that each individual component knwos the top level and use it to locate the mycheckstyle.xml. Even better: is there a way to support component with different level in the tree (as subComponent2 and subComponent2.1 in the example above) Thanks, Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to override jar-plugin dependencies to use a custom version of maven-archiver?
Hi Max, Page 58, in Better builds with Maven explains how to achieve this. Essentially you have to do the following. dependencies dependency groupIdorg.codehaus.plexus/groupId artifactIdplexus-container-default/artifactId version1.0-alpha-9/version exclusions exclusion groupIdorg.codehaus.plexus/groupId artifactIdplexus-utils/artifactId /exclusion /exclusions /dependency dependency groupIdorg.codehaus.plexus/groupId artifactIdplexus-utils/artifactId version1.1/version scoperuntime/scope /dependency /dependencies Thanks Lakshman -Original Message- From: Max Bowsher [mailto:[EMAIL PROTECTED] Sent: Monday, 4 September 2006 10:06 PM To: Maven Users List Subject: Re: How to override jar-plugin dependencies to use a custom version of maven-archiver? Max Bowsher wrote: Is it possible to use POM elements to configure the standard maven-jar-plugin to use a custom version of maven-archiver? I am attempting to use: build plugins plugin artifactIdmaven-jar-plugin/artifactId dependencies dependency artifactIdmaven-archiver/artifactId groupIdorg.apache.maven/groupId version2.2-maxb-1/version scoperuntime/scope /dependency /dependencies However, this does not work. The version of maven-archiver specified directly in the jar plugin is used instead: 'mvn -X package' shows: [DEBUG] org.apache.maven.plugins:maven-jar-plugin:maven-plugin:2.1:runtime (selected for runtime) ... [DEBUG] org.apache.maven:maven-archiver:jar:2.2:runtime (selected for runtime) ... [DEBUG] org.apache.maven:maven-archiver:jar:2.2-maxb-1:runtime (removed - nearer found: 2.2) Must I make a custom version of the jar plugin too, to convince it to use a custom maven-archiver? Thanks in advance for any insight. Jason Dillon wrote: Not sure that maven can calculate that 2.2-maxb-1 2.2. Try to use a more standard version... like 2.3-SNAPSHOT, and if you want maxb-1, then put that in the classifier. I tried changing the version to 2.3-SNAPSHOT - no change, *exactly* the same behaviour, just substituting 2.3-SNAPSHOT for 2.2-maxb-1 in the output. Maven's claiming that 2.2 is nearer - not newer. -- Max Bowsher [EMAIL PROTECTED] http://www.mxtelecom.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: module.basedir
Hi Fox, Not sure what you mean by the root directory, but a basedir of a module can be accessed by ${basedir} Or you may define a variable in your POM properties BuildDir/home/lakshman/Build/try/BuildDir /properties And refer to it by ${BuildDir} Thanks Lakshman -Original Message- From: foxcoll [mailto:[EMAIL PROTECTED] Sent: Tuesday, 5 September 2006 10:50 AM To: users@maven.apache.org Subject: module.basedir I have been doing some searching on this forum, and since there seems to be no way of using a root directory, is there a way to use the basedir of a module, or a specific pom (or any other environmental variables for that matter)? Thanks Fox -- View this message in context: http://www.nabble.com/module.basedir-tf2218159.html#a6144307 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Prepare Sources Prepare Resources
Hi Douglas, I create my prepare resources in target. The main reason to do this is because a number of reports plugin will treat generated java code as project code if you create it under /src and some plugins don't provide a method of excluding them. The second reason is due to the maven standard/policy of creating generated sources into target. If you look at page 147 of Better builds with Maven, it states that pluign must include to project.addCompileSourceRoot(...). Thanks Lakshman -Original Message- From: Douglas Ferguson [mailto:[EMAIL PROTECTED] Sent: Friday, 1 September 2006 11:14 PM To: users Subject: Prepare Sources Prepare Resources Howdy, I was just curious about how folks are using prepare sources prepare resources. 1) When you generate sources/resources, do you generate them to /src or /target? If you generate them to /target do you have to add them to the sources in the pom.xml? 2) I need to generate an assembly.xml an application.properties file. The application.properties file is clearly a resources, assembly.xml doesn't exactly fit in either, does anybody see a reason why I can't treat it as a resource? D- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] mvn install
Hi All, I have the following in my pom.xml distributionManagement repository idinternalSnapshotRepository/id nameInternal Release Repository/name urlfile://maggie/internalRepository/url /repository snapshotRepository idinternalSnapshotRepository/id nameInternal Snapshot Repository/name urlfile://maggie/internalSnapshotRepository/url /snapshotRepository /distributionManagement But when I run mvn install it's installed under /home/lakshman/.m2/repository/org/codehaus/mojo/hibernate3-maven-plugin/ 1.0-SNAPSHOT/hibernate3-maven-plugin-1.0-SNAPSHOT.jar Could someone please point out what I am doing wrong ? Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Failing surefire tests
Guess what, I am having the same problem with log4j java.lang.NoClassDefFoundError: org/apache/log4j/Priority in surefire tests. How did you workout your jar file was not getting included in the test classpath ? Thanks Lakshman -Original Message- From: Jeff Mutonho [mailto:[EMAIL PROTECTED] Sent: Tuesday, 29 August 2006 7:02 PM To: Maven Users List Subject: Re: Failing surefire tests To avoid risking being reprimanded in public :) , I'll say that I'm not demanding answers ladies and gents.Just wondering if anyone has had any ideas on how I can try out other ways of resolving this issue? Thanks -- Jeff Mutonho GoogleTalk : ejbengine Skype: ejbengine Registered Linux user number 366042 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [m2] copy of Central Repository
Hi, You guys were great. You have answered all my questions and hit the nail on the head each and every time. Thanks again, I am now going to charge full steam ahead with trying to setup Proximity. No doubt, Tamás Cservenák will be fielding questions in the Proximity support forum. See you there Thanks again guys. Thanks Lakshman -Original Message- From: Jeff Jensen [mailto:[EMAIL PROTECTED] Sent: Monday, 28 August 2006 11:49 PM To: Lakshman Srilakshmanan Cc: 'Maven Users List' Subject: RE: [m2] copy of Central Repository Proximity allows configuring which remote repos to automatically download from - including none, enabling manual only. However I don't know about limiting it to one user. I think you need to ask Tamás Cservenák (Proximity author) on the privs capability. He will tell you to post on the Proximity support forum... -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: Sunday, August 27, 2006 10:34 PM To: [EMAIL PROTECTED] Cc: Maven Users List Subject: RE: [m2] copy of Central Repository Hi Jeff, I am sorry I did not understand your original mail. Further reading confirms that Proximity is what I am looking for. Could you please clarify one question before I charge down this path ? I actually control the internal.central repository. I don't allow developers to pollute the internal.central repository with any version of the software they want. Before the internal.central repository is upgraded we get a consensus from the development team. This ensures that we don't get any library conflicts. I controlled this in maven.1.x by ensuring that the internal.central repository was owned by xxx and xxx's localRepository was pointing to internal.central. This ensured that only xxx could place libraries into the repository and all the developers would get an error if the library did not exist. My initial reading of Proximity indicates that it will download from repo1.maven.org (or from where ever) _automatically_ when it can't find the library in internal.central. Is there a way of controlling this. Would I be able to control who can _automatically_ populate internal.central and give an error to the others ? Thanks again for you assistance in this issue. Thanks Lakshman -Original Message- From: Jeff Jensen [mailto:[EMAIL PROTECTED] Sent: Friday, 25 August 2006 10:24 PM To: 'Maven Users List' Subject: RE: [m2] copy of Central Repository That's fine, these products allow manual installation as well (in fact, they expect you to). This handles the use cases of using commercial artifacts (Oracle, MQ Series, and Java itself, etc.) and installing artifacts from your own company's products. By your statement, I wonder if you misunderstand how they are used/what they do. FYI, We use Proximity; it works great. I suggest reading its docs/site info. -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: Friday, August 25, 2006 3:20 AM To: Maven Users List Cc: [EMAIL PROTECTED] Subject: RE: [m2] copy of Central Repository Hi We can't do this because from time to time we may need to download files manually and install it. Thanks Lakshman -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey De Smet Sent: Friday, 25 August 2006 5:57 PM To: users@maven.apache.org Subject: Re: [m2] copy of Central Repository Putting up a maven proxy might solve your problem: the first time a jar is needed it downloads it from the central repo and caches it. There are 3 free implementations I know of: maven-proxy (from the maven guys): beta?, abandoned in favor of Archiva Archiva (from the maven guys): beta, needs to be build from source, but has some positive remarks on this list Proximity (from 3th party): sounds more stable, has had a bunch of releases and some positive remarks on this list Check this list for Archiva and proximity. Lakshman Srilakshmanan wrote, On 2006-08-25 8:53 AM: Hi All, In maven 1.x I could execute maven once on a project and build my local repository. I could then copy it on to my company's central server and get all the developers to refer to this for updates. When I needed a new plugin or dependency, I could run maven 1.x against ibiblio and follow the above process. The above strategy ensured that we had only the plugins dependencies we needed and not the whole central repository of 5G. I am not going into the details of how I kept this up-to-date as it would side track the main issue that I wish to discuss. Now, in maven 2 I did the same process as described above. The build started breaking, with errors such as -- plugin 'xxx' does not exist or no valid version could be found
RE: [m2] copy of Central Repository
Hi Jeff, I am sorry I did not understand your original mail. Further reading confirms that Proximity is what I am looking for. Could you please clarify one question before I charge down this path ? I actually control the internal.central repository. I don't allow developers to pollute the internal.central repository with any version of the software they want. Before the internal.central repository is upgraded we get a consensus from the development team. This ensures that we don't get any library conflicts. I controlled this in maven.1.x by ensuring that the internal.central repository was owned by xxx and xxx's localRepository was pointing to internal.central. This ensured that only xxx could place libraries into the repository and all the developers would get an error if the library did not exist. My initial reading of Proximity indicates that it will download from repo1.maven.org (or from where ever) _automatically_ when it can't find the library in internal.central. Is there a way of controlling this. Would I be able to control who can _automatically_ populate internal.central and give an error to the others ? Thanks again for you assistance in this issue. Thanks Lakshman -Original Message- From: Jeff Jensen [mailto:[EMAIL PROTECTED] Sent: Friday, 25 August 2006 10:24 PM To: 'Maven Users List' Subject: RE: [m2] copy of Central Repository That's fine, these products allow manual installation as well (in fact, they expect you to). This handles the use cases of using commercial artifacts (Oracle, MQ Series, and Java itself, etc.) and installing artifacts from your own company's products. By your statement, I wonder if you misunderstand how they are used/what they do. FYI, We use Proximity; it works great. I suggest reading its docs/site info. -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: Friday, August 25, 2006 3:20 AM To: Maven Users List Cc: [EMAIL PROTECTED] Subject: RE: [m2] copy of Central Repository Hi We can't do this because from time to time we may need to download files manually and install it. Thanks Lakshman -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey De Smet Sent: Friday, 25 August 2006 5:57 PM To: users@maven.apache.org Subject: Re: [m2] copy of Central Repository Putting up a maven proxy might solve your problem: the first time a jar is needed it downloads it from the central repo and caches it. There are 3 free implementations I know of: maven-proxy (from the maven guys): beta?, abandoned in favor of Archiva Archiva (from the maven guys): beta, needs to be build from source, but has some positive remarks on this list Proximity (from 3th party): sounds more stable, has had a bunch of releases and some positive remarks on this list Check this list for Archiva and proximity. Lakshman Srilakshmanan wrote, On 2006-08-25 8:53 AM: Hi All, In maven 1.x I could execute maven once on a project and build my local repository. I could then copy it on to my company's central server and get all the developers to refer to this for updates. When I needed a new plugin or dependency, I could run maven 1.x against ibiblio and follow the above process. The above strategy ensured that we had only the plugins dependencies we needed and not the whole central repository of 5G. I am not going into the details of how I kept this up-to-date as it would side track the main issue that I wish to discuss. Now, in maven 2 I did the same process as described above. The build started breaking, with errors such as -- plugin 'xxx' does not exist or no valid version could be found --. Further investigation revealed this problem was due to two missing files in my repository. a) maven-metadata.xml b) maven-metadata.xml.sha1 In my local repository these files are named as a) maven-metadata-central.xml b) maven-metadata-central.xml.sha1 so when I copied my local repository to my company's central repository the above files caused the problem. When I renamed the files as required, maven 2 was happy and everything started to work again. So my question is, is there a easier way of getting the required components from maven central repository copied to my company's central server without having to take a full copy ? Well, an alternative is to create a script to traverse the repository and rename the files as required. I would much appreciate to hear from anyone who has solved this problem or is there a tool/process that I have overlooked. Thanks in advance Lakshman -- With kind regards, Geoffrey De Smet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: [m2] copy of Central Repository
Hi Marc, Yes, I have done -U on my build. All that the -U does is reach out to the central repository and grab the latest version of the libraries/plugin you are using. We started using mvn deploy:deploy-file, but then realised that if we did a full build on the box that hosts our internal repo - this would do the job - and it does. However, I would like to know if there is a better or 'proper' solution to this. The problem I have is making the internal repos mentioned in your email above into an internal central repository that developers could use as a central repository. I hope I have clarified my problem to make it more clear. Thanks Lakshman -Original Message- From: Marc L. Veary [mailto:[EMAIL PROTECTED] Sent: Friday, 25 August 2006 7:23 PM To: 'Maven Users List' Subject: RE: [m2] copy of Central Repository Hi Lakshman, We have a number of these files some are *-local.xml, some are *-ibiblio.xml, some are the name of the repo from setting.xml on dev machines. I'm not an expert at this, and please excuse if I am stating the obvious, but did you try using -U switch? Kind regards, -- Marc -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: 25 August 2006 09:18 To: Maven Users List Subject: RE: [m2] copy of Central Repository Hi Marc, I did a full build on the box that hosts our internal repo, but as explained, it did not work for me. I have also explained, below, my finding why it did not work. Could you please confirm the name of the following files in your repository. a) maven-metadata*.xml b) maven-metadata*.xml.sha1 Is it possible you are still looking at the central server at http://repo1.maven.org/maven2 ?? Thanks Lakshman -Original Message- From: Marc L. Veary [mailto:[EMAIL PROTECTED] Sent: Friday, 25 August 2006 5:40 PM To: 'Maven Users List' Subject: RE: [m2] copy of Central Repository Hi. We started using mvn deploy:deploy-file, but then realised that if we did a full build on the box that hosts our internal repo - this would do the job - and it does. However, I would like to know if there is a better or 'proper' solution to this. Kind regards, -- Marc -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: 25 August 2006 07:54 To: Maven Users List Subject: [m2] copy of Central Repository Hi All, In maven 1.x I could execute maven once on a project and build my local repository. I could then copy it on to my company's central server and get all the developers to refer to this for updates. When I needed a new plugin or dependency, I could run maven 1.x against ibiblio and follow the above process. The above strategy ensured that we had only the plugins dependencies we needed and not the whole central repository of 5G. I am not going into the details of how I kept this up-to-date as it would side track the main issue that I wish to discuss. Now, in maven 2 I did the same process as described above. The build started breaking, with errors such as -- plugin 'xxx' does not exist or no valid version could be found --. Further investigation revealed this problem was due to two missing files in my repository. a) maven-metadata.xml b) maven-metadata.xml.sha1 In my local repository these files are named as a) maven-metadata-central.xml b) maven-metadata-central.xml.sha1 so when I copied my local repository to my company's central repository the above files caused the problem. When I renamed the files as required, maven 2 was happy and everything started to work again. So my question is, is there a easier way of getting the required components from maven central repository copied to my company's central server without having to take a full copy ? Well, an alternative is to create a script to traverse the repository and rename the files as required. I would much appreciate to hear from anyone who has solved this problem or is there a tool/process that I have overlooked. Thanks in advance Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] copy of Central Repository
Hi All, In maven 1.x I could execute maven once on a project and build my local repository. I could then copy it on to my company's central server and get all the developers to refer to this for updates. When I needed a new plugin or dependency, I could run maven 1.x against ibiblio and follow the above process. The above strategy ensured that we had only the plugins dependencies we needed and not the whole central repository of 5G. I am not going into the details of how I kept this up-to-date as it would side track the main issue that I wish to discuss. Now, in maven 2 I did the same process as described above. The build started breaking, with errors such as -- plugin 'xxx' does not exist or no valid version could be found --. Further investigation revealed this problem was due to two missing files in my repository. a) maven-metadata.xml b) maven-metadata.xml.sha1 In my local repository these files are named as a) maven-metadata-central.xml b) maven-metadata-central.xml.sha1 so when I copied my local repository to my company's central repository the above files caused the problem. When I renamed the files as required, maven 2 was happy and everything started to work again. So my question is, is there a easier way of getting the required components from maven central repository copied to my company's central server without having to take a full copy ? Well, an alternative is to create a script to traverse the repository and rename the files as required. I would much appreciate to hear from anyone who has solved this problem or is there a tool/process that I have overlooked. Thanks in advance Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [m2] copy of Central Repository
Hi Marc, I did a full build on the box that hosts our internal repo, but as explained, it did not work for me. I have also explained, below, my finding why it did not work. Could you please confirm the name of the following files in your repository. a) maven-metadata*.xml b) maven-metadata*.xml.sha1 Is it possible you are still looking at the central server at http://repo1.maven.org/maven2 ?? Thanks Lakshman -Original Message- From: Marc L. Veary [mailto:[EMAIL PROTECTED] Sent: Friday, 25 August 2006 5:40 PM To: 'Maven Users List' Subject: RE: [m2] copy of Central Repository Hi. We started using mvn deploy:deploy-file, but then realised that if we did a full build on the box that hosts our internal repo - this would do the job - and it does. However, I would like to know if there is a better or 'proper' solution to this. Kind regards, -- Marc -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: 25 August 2006 07:54 To: Maven Users List Subject: [m2] copy of Central Repository Hi All, In maven 1.x I could execute maven once on a project and build my local repository. I could then copy it on to my company's central server and get all the developers to refer to this for updates. When I needed a new plugin or dependency, I could run maven 1.x against ibiblio and follow the above process. The above strategy ensured that we had only the plugins dependencies we needed and not the whole central repository of 5G. I am not going into the details of how I kept this up-to-date as it would side track the main issue that I wish to discuss. Now, in maven 2 I did the same process as described above. The build started breaking, with errors such as -- plugin 'xxx' does not exist or no valid version could be found --. Further investigation revealed this problem was due to two missing files in my repository. a) maven-metadata.xml b) maven-metadata.xml.sha1 In my local repository these files are named as a) maven-metadata-central.xml b) maven-metadata-central.xml.sha1 so when I copied my local repository to my company's central repository the above files caused the problem. When I renamed the files as required, maven 2 was happy and everything started to work again. So my question is, is there a easier way of getting the required components from maven central repository copied to my company's central server without having to take a full copy ? Well, an alternative is to create a script to traverse the repository and rename the files as required. I would much appreciate to hear from anyone who has solved this problem or is there a tool/process that I have overlooked. Thanks in advance Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [m2] copy of Central Repository
Hi We can't do this because from time to time we may need to download files manually and install it. Thanks Lakshman -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey De Smet Sent: Friday, 25 August 2006 5:57 PM To: users@maven.apache.org Subject: Re: [m2] copy of Central Repository Putting up a maven proxy might solve your problem: the first time a jar is needed it downloads it from the central repo and caches it. There are 3 free implementations I know of: maven-proxy (from the maven guys): beta?, abandoned in favor of Archiva Archiva (from the maven guys): beta, needs to be build from source, but has some positive remarks on this list Proximity (from 3th party): sounds more stable, has had a bunch of releases and some positive remarks on this list Check this list for Archiva and proximity. Lakshman Srilakshmanan wrote, On 2006-08-25 8:53 AM: Hi All, In maven 1.x I could execute maven once on a project and build my local repository. I could then copy it on to my company's central server and get all the developers to refer to this for updates. When I needed a new plugin or dependency, I could run maven 1.x against ibiblio and follow the above process. The above strategy ensured that we had only the plugins dependencies we needed and not the whole central repository of 5G. I am not going into the details of how I kept this up-to-date as it would side track the main issue that I wish to discuss. Now, in maven 2 I did the same process as described above. The build started breaking, with errors such as -- plugin 'xxx' does not exist or no valid version could be found --. Further investigation revealed this problem was due to two missing files in my repository. a) maven-metadata.xml b) maven-metadata.xml.sha1 In my local repository these files are named as a) maven-metadata-central.xml b) maven-metadata-central.xml.sha1 so when I copied my local repository to my company's central repository the above files caused the problem. When I renamed the files as required, maven 2 was happy and everything started to work again. So my question is, is there a easier way of getting the required components from maven central repository copied to my company's central server without having to take a full copy ? Well, an alternative is to create a script to traverse the repository and rename the files as required. I would much appreciate to hear from anyone who has solved this problem or is there a tool/process that I have overlooked. Thanks in advance Lakshman -- With kind regards, Geoffrey De Smet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [m2] copy of Central Repository
Hi All, I think the answer lies in Maven Repository Manager. Pg 200 in the book Better Builds with Maven. Could someone please verify my understanding and whether a download is available ? Thanks Lakshman -Original Message- From: Lakshman Srilakshmanan Sent: Friday, 25 August 2006 4:54 PM To: Maven Users List Subject: [m2] copy of Central Repository Hi All, In maven 1.x I could execute maven once on a project and build my local repository. I could then copy it on to my company's central server and get all the developers to refer to this for updates. When I needed a new plugin or dependency, I could run maven 1.x against ibiblio and follow the above process. The above strategy ensured that we had only the plugins dependencies we needed and not the whole central repository of 5G. I am not going into the details of how I kept this up-to-date as it would side track the main issue that I wish to discuss. Now, in maven 2 I did the same process as described above. The build started breaking, with errors such as -- plugin 'xxx' does not exist or no valid version could be found --. Further investigation revealed this problem was due to two missing files in my repository. a) maven-metadata.xml b) maven-metadata.xml.sha1 In my local repository these files are named as a) maven-metadata-central.xml b) maven-metadata-central.xml.sha1 so when I copied my local repository to my company's central repository the above files caused the problem. When I renamed the files as required, maven 2 was happy and everything started to work again. So my question is, is there a easier way of getting the required components from maven central repository copied to my company's central server without having to take a full copy ? Well, an alternative is to create a script to traverse the repository and rename the files as required. I would much appreciate to hear from anyone who has solved this problem or is there a tool/process that I have overlooked. Thanks in advance Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to write groovy plugins/mojos?
Hi Did you try http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/groovy-maven-tools/ Thanks Lakshman -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, 25 August 2006 12:04 AM To: Maven Users List; Tomasz Pik Cc: Maven Users List Subject: Re: How to write groovy plugins/mojos? Thanks, I've tried to compile all the sources but it seems quite old and doesn't work well. I 've contacted the plugin developper but no answer (maybe holidays:), does anyone know if he still working on it ?? Maybe i can help ... Ben *** Benoit doumas J2EE consultant www.octo.com www.doumas.com *** Selon Tomasz Pik [EMAIL PROTECTED]: On 8/24/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all, I've seeing on the mailing list that it should be possible to write groovy mojos, like to write Ant mojos. But the project : groovy-maven-tools doesn't seem to work ... (http://mojo.codehaus.org/groovy-maven-tools = not found) you may find it here: http://svn.mojo.codehaus.org/browse/mojo/trunk/mojo/mojo-sandbox/groovy- maven-tools but I'm worry that's all I can help. regards, Tomek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I tell Maven to use my internal repository first?
Hi, Reading the book, Better builds with maven, on pg 28 it is suggested that the order in which you have defined repositories in your POM will determine the order maven will use to retrieve dependencies. Thanks Lakshman -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Tuesday, 8 August 2006 6:33 AM To: Maven Users List Subject: Re: How can I tell Maven to use my internal repository first? Most people resolve this by setting up a Maven Proxy (or Proximity) in their local corporate environment. Then you can configure your proxy to look at Central and/or local internal repo for artifacts. Wayne On 8/7/06, Wayne Fay [EMAIL PROTECTED] wrote: You can't tell Maven to check your local repo first. You can however override Central (with mirrorOf in settings) but then you will not able to connect to Central at all. Wayne On 8/7/06, Daniel Serodio [EMAIL PROTECTED] wrote: I have setup an internal repository in our intranet, and added it to the project's POM, but Maven still tries repo1.maven.org before trying our internal repo. How can I tell it to try my internal repository first? It's the only one listed in the project's POM. Maven is 2.0.4 TIA, Daniel Serodio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maven2 / hibernate3- schema-export
Hi Marco, Your hbm.xml file must be located in src/main/resources When you run mvn clean resources:resources hibernate3:hbm2java the hbm.xml files are copied into target/classes and then the java source files are generated. Alternatively you could generate the hbm.xml file directly into target/classes and run mvn hibernate3:hbm2java. Thanks Lakshman From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Wednesday, 23 August 2006 11:12 PM To: Lakshman Srilakshmanan Subject: Re: maven2 / hibernate3- schema-export Hi Lakshman, htanx for the link! i managed to build it and use it but i am still having problems .. i am generating hbm.xml files out of my annotated classes using xdoclet, and somehow i'd need to tell to the plugin where to find the .hbm.xml . how can i configure that? thanks and regards marco On 8/23/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Marco The link I provided is for anonymous access as shown below. Happy hunting :) svn co http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-hibernate3/hibernate3-maven-plugin hibernate3-maven-plugin Ahibernate3-maven-plugin/src Ahibernate3-maven-plugin/src/main Ahibernate3-maven-plugin/src/main/java Ahibernate3-maven-plugin/src/main/java/org Ahibernate3-maven-plugin/src/main/java/org/codehaus Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3 Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/HibernateExporterMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/converter Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/converter/ProviderConfigurationConverter.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/Hbm2JavaGeneratorMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/Hbm2CfgXmlExporterMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/SchemaExportMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/SchemaUpdateMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/Hbm2DDLExporterMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/Hbm2DocExporterMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/Hbm2HbmXmlExporterMojo.java Ahibernate3-maven-plugin/src/main/resources Ahibernate3-maven-plugin/src/main/resources/META-INF Ahibernate3-maven-plugin/src/main/resources/META-INF/plexus Ahibernate3-maven-plugin/src/main/resources/META-INF/plexus/components.xml Ahibernate3-maven-plugin/src/site Ahibernate3-maven-plugin/src/site/site.xml Ahibernate3-maven-plugin/src/site/apt Ahibernate3-maven-plugin/src/site/apt/howto.apt Ahibernate3-maven-plugin/src/site/apt/confighibernate.apt Ahibernate3-maven-plugin/src/site/apt/configoutputdirectory.apt Ahibernate3-maven-plugin/pom.xml U hibernate3-maven-plugin Thanks Lakshman From: Marco Mistroni [mailto: [EMAIL PROTECTED] Sent: Tuesday, 22 August 2006 11:25 PM To: Lakshman Srilakshmanan Subject: Re: maven2 / hibernate3- schema-export Hello Lakshman, i didnt manage to donwload the plugin... :( any links to SVN for anonymous access? thanks and regards marco On 8/22/06, Marco Mistroni [EMAIL PROTECTED] wrote: Hello Lakshman, thanx very much!!! i will surely try i tout and by end of to day i'll get back to tell you how it went thanx a lot and regards Marco On 8/22/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Marco, No problem. I had to download hibernate3 plugin from http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-hibernate3 and compile it locally before I could get it to work. Besides the command I ran are mvn clean resources:resources hibernate3:hbm2java mvn clean resources:resources hibernate3:schema-export Hope it helps. build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version1.0-SNAPSHOT/version executions execution configuration hibernate configurationFile/src/main/resources/hibernate.cfg.xml/configurationFile /hibernate outputDirectory hbm2cfgxmlsrc/main/resources/hbm2cfgxml !-- hbm2dlltarget/hibernate3/sql/hbm2dll -- /outputDirectory outputFileSMS.sql/outputFile /configuration /execution /executions /plugin /plugins extensions extension groupIdjdbc.jtds/groupId artifactIdjtds/artifactId version1.2/version !-- groupIdhsqldb/groupId artifactIdhsqldb/artifactId
RE: maven2 / hibernate3- schema-export
Hi Marco, It appears that the hibernate.cfg.xml is required only when generating schema (ie hibernate3:export-schema). It does not appear to need hibernate.properties. But I do remember some tools third party applications needing the hibernate.properties. What command are you running to generate your source files from hbm.xml files. Just a note I am not generating my hbm files using xdoclet. Thanks Lakshman _ From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Thursday, 24 August 2006 3:04 PM To: Lakshman Srilakshmanan Subject: Re: maven2 / hibernate3- schema-export Hello Lakshman, thanks for your reply.. i have one little question: does the plugin work even if i have an hibernate.properties instead of hibernate.cfg.xml? thanks nad regards marco On 8/24/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Marco, Your hbm.xml file must be located in src/main/resources When you run mvn clean resources:resources hibernate3:hbm2java the hbm.xml files are copied into target/classes and then the java source files are generated. Alternatively you could generate the hbm.xml file directly into target/classes and run mvn hibernate3:hbm2java. Thanks Lakshman From: Marco Mistroni [mailto: [EMAIL PROTECTED] Sent: Wednesday, 23 August 2006 11:12 PM To: Lakshman Srilakshmanan Subject: Re: maven2 / hibernate3- schema-export Hi Lakshman, htanx for the link! i managed to build it and use it but i am still having problems .. i am generating hbm.xml files out of my annotated classes using xdoclet, and somehow i'd need to tell to the plugin where to find the .hbm.xml . how can i configure that? thanks and regards marco On 8/23/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Marco The link I provided is for anonymous access as shown below. Happy hunting :) svn co http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-hibernate3/hi bernate3-maven-plugin hibernate3-maven-plugin Ahibernate3-maven-plugin/src Ahibernate3-maven-plugin/src/main Ahibernate3-maven-plugin/src/main/java Ahibernate3-maven-plugin/src/main/java/org Ahibernate3-maven-plugin/src/main/java/org/codehaus Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3 Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/Hibe rnateExporterMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/conv erter Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/conv erter/ProviderConfigurationConverter.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/expo rter Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/expo rter/Hbm2JavaGeneratorMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/expo rter/Hbm2CfgXmlExporterMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/expo rter/SchemaExportMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/expo rter/SchemaUpdateMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/expo rter/Hbm2DDLExporterMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/expo rter/Hbm2DocExporterMojo.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/expo rter/Hbm2HbmXmlExporterMojo.java Ahibernate3-maven-plugin/src/main/resources Ahibernate3-maven-plugin/src/main/resources/META-INF Ahibernate3-maven-plugin/src/main/resources/META-INF/plexus Ahibernate3-maven-plugin/src/main/resources/META-INF/plexus/components.x ml Ahibernate3-maven-plugin/src/site Ahibernate3-maven-plugin/src/site/site.xml Ahibernate3-maven-plugin/src/site/apt Ahibernate3-maven-plugin/src/site/apt/howto.apt Ahibernate3-maven-plugin/src/site/apt/confighibernate.apt Ahibernate3-maven-plugin/src/site/apt/configoutputdirectory.apt Ahibernate3-maven-plugin/pom.xml U hibernate3-maven-plugin Thanks Lakshman From: Marco Mistroni [mailto: [EMAIL PROTECTED] Sent: Tuesday, 22 August 2006 11:25 PM To: Lakshman Srilakshmanan Subject: Re: maven2 / hibernate3- schema-export Hello Lakshman, i didnt manage to donwload the plugin... :( any links to SVN for anonymous access? thanks and regards marco On 8/22/06, Marco Mistroni [EMAIL PROTECTED] wrote: Hello Lakshman, thanx very much!!! i will surely try i tout and by end of to day i'll get back to tell you how it went thanx a lot and regards Marco On 8/22/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Marco, No problem. I had to download hibernate3 plugin from http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-hibernate3 and compile it locally before I could get it to work. Besides the command I ran are mvn clean resources:resources hibernate3:hbm2java mvn clean resources:resources hibernate3:schema-export Hope it helps. build plugins plugin
RE: maven2 / hibernate3- schema-export
Hi Marco The link I provided is for anonymous access as shown below. Happy hunting :) svn co http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-hibernate3/hibernate3-maven-plugin hibernate3-maven-plugin Ahibernate3-maven-plugin/src Ahibernate3-maven-plugin/src/main Ahibernate3-maven-plugin/src/main/java Ahibernate3-maven-plugin/src/main/java/org Ahibernate3-maven-plugin/src/main/java/org/codehaus Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3 A hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/HibernateExporterMojo.java A hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/converter A hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/converter/ProviderConfigurationConverter.java Ahibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter A hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/Hbm2JavaGeneratorMojo.java A hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/Hbm2CfgXmlExporterMojo.java A hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/SchemaExportMojo.java A hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/SchemaUpdateMojo.java A hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/Hbm2DDLExporterMojo.java A hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/Hbm2DocExporterMojo.java A hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/exporter/Hbm2HbmXmlExporterMojo.java Ahibernate3-maven-plugin/src/main/resources Ahibernate3-maven-plugin/src/main/resources/META-INF Ahibernate3-maven-plugin/src/main/resources/META-INF/plexus Ahibernate3-maven-plugin/src/main/resources/META-INF/plexus/components.xml Ahibernate3-maven-plugin/src/site Ahibernate3-maven-plugin/src/site/site.xml Ahibernate3-maven-plugin/src/site/apt Ahibernate3-maven-plugin/src/site/apt/howto.apt Ahibernate3-maven-plugin/src/site/apt/confighibernate.apt Ahibernate3-maven-plugin/src/site/apt/configoutputdirectory.apt Ahibernate3-maven-plugin/pom.xml U hibernate3-maven-plugin Thanks Lakshman From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Tuesday, 22 August 2006 11:25 PM To: Lakshman Srilakshmanan Subject: Re: maven2 / hibernate3- schema-export Hello Lakshman, i didnt manage to donwload the plugin... :( any links to SVN for anonymous access? thanks and regards marco On 8/22/06, Marco Mistroni [EMAIL PROTECTED] wrote: Hello Lakshman, thanx very much!!! i will surely try i tout and by end of to day i'll get back to tell you how it went thanx a lot and regards Marco On 8/22/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Marco, No problem. I had to download hibernate3 plugin from http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-hibernate3 and compile it locally before I could get it to work. Besides the command I ran are mvn clean resources:resources hibernate3:hbm2java mvn clean resources:resources hibernate3:schema-export Hope it helps. build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version1.0-SNAPSHOT/version executions execution configuration hibernate configurationFile/src/main/resources/hibernate.cfg.xml/configurationFile /hibernate outputDirectory hbm2cfgxmlsrc/main/resources/hbm2cfgxml !-- hbm2dlltarget/hibernate3/sql/hbm2dll -- /outputDirectory outputFileSMS.sql/outputFile /configuration /execution /executions /plugin /plugins extensions extension groupIdjdbc.jtds/groupId artifactIdjtds/artifactId version1.2/version !-- groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.8.0.4/version -- /extension /extensions /build Thanks Lakshman From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Monday, 21 August 2006 9:00 PM To: Lakshman
RE: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file
Hi Bryan, When you execute mvn clean resources:resources does your hibernate.cfg.xml file get copied into target/classes ? Thanks Lakshman -Original Message- From: Bryan Woodcox [mailto:[EMAIL PROTECTED] Sent: Tuesday, 22 August 2006 2:10 PM To: users@maven.apache.org Subject: RE: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file Lakshman, Thanks for the response. My Category.hbm.xml was not in the src/main/resources directory, but I have moved it there to now avail. I am running mvn clean generate-sources to execute the build. Attempting a mvn clean resources:resources hibernate3:hbm2java yields the same error/stack trace as I included in the original posting. Any other suggestions? This seems like a simple problem, but it has cause great delay for me. Very annoying! Bryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file
Hi Bryan, I am asking the obvious, but do you have your hibernate.cfg.xml and CategoryImpl.hbm.xml in src/main/resources. Secondly, are you executing mvn clean resources:resources hibernate3:hbm2java Thanks Lakshman -Original Message- From: Bryan Woodcox [mailto:[EMAIL PROTECTED] Sent: Sunday, 20 August 2006 6:47 AM To: users@maven.apache.org Subject: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file I am using the hibernate3 plugin for maven2. When I attempt to generate my POJO's from my hbm files I get the following error. [INFO] Preparing hibernate3:hbm2java [WARNING] Removing: hbm2java from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [hibernate3:hbm2java {execution: hbm2java}] Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment clinit INFO: Hibernate 3.2 cr2 Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment clinit INFO: hibernate.properties not found Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment buildBytecodeProvider INFO: Bytecode provider name : cglib Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment clinit INFO: using JDK 1.4 java.sql.Timestamp handling Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Configuration configure INFO: configuring from file: hibernate.cfg.xml Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Configuration addResource INFO: Reading mappings from resource: CategoryImpl.hbm.xml [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Resource: CategoryImpl.hbm.xml not found [INFO] [INFO] Trace org.hibernate.MappingException: Resource: CategoryImpl.hbm.xml not found at org.hibernate.cfg.Configuration.addResource(Configuration.java:512) at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(Annotation Conf iguration.java:348) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1 474) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1453) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1427) . . . My configuration is as follows. Hibernate.cfg.xml ?xml version='1.0' encoding='utf-8'? !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate Configuration DTD//EN http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd; hibernate-configuration !-- a SessionFactory instance -- session-factory name=hibernate_session !-- begin: properties -- property name=connection.driver_classcom.mysql.jdbc.Driver/property property name=connection.urljdbc:mysql://localhost:3306/wcs/property property name=connection.usernameroot/property property name=connection.passwordxxx/property property name=dialectorg.hibernate.dialect.MySQLDialect/property property name=show_sqlfalse/property !-- end: properties -- mapping resource=CategoryImpl.hbm.xml/ mapping resource=src/main/domain/AddressFormatImpl.hbm.xml/ mapping resource=src/main/domain/AddressImpl.hbm.xml/ /session-factory /hibernate-configuration Pom.xml excerpt build resources resource directorysrc/main/resources/directory filteringtrue/filtering /resource resource directorysrc/main/domain/directory filteringtrue/filtering /resource /resources extensions extension groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.0.2/version /extension /extensions plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version1.0-SNAPSHOT/version executions execution idhbm2java/id phasegenerate-sources/phase goals goalhbm2java/goal /goals configuration hibernate configurationFilesrc/main/resources/hibernate.cfg.xml/configurationFi le /hibernate outputDirectory hbm2javasrc/main/java/hbm2java /outputDirectory /configuration /execution I am using hibernate-tools-3.2.0.beta6a with hibernate-3.2.0rc2. I
RE: maven2 / hibernate3- schema-export
Hi Marco, As we don't know what problems you are having, I am taking a stab in the dark. Have you included the dependency jars ie dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version3.1.2/version /dependency dependency groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.8.0.4/version /dependency extensions extension groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.8.0.4/version /extension /extensions Have you also configured the driver and url in your hibernate.cfg.xml Thanks Lakshman -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Monday, 21 August 2006 4:21 AM To: Maven Users List Subject: maven2 / hibernate3- schema-export hi all i am trying to generate a schema out of my hibernate classes but i can't manage i am trying first to generate hbm.xml files using xdoclet, and then i am trying to generate a schema using hibernate3 plugin here's my pom.xml (only relevant part of build) build plugins plugin artifactIdxdoclet-maven-plugin/artifactId groupIdorg.codehaus.mojo/groupId executions execution phasegenerate-sources/phase goals goalxdoclet/goal /goals configuration tasks echo message=Generating HBM files from java source to ${basedir}/src/main/resources/ hibernatedoclet destdir=${basedir}/src/main/resources/ excludedtags=@version,@author,@todo,@see,@desc verbose=true fileset dir=${basedir}/src/main/java includes=**/hibernate/*.java/ hibernate version=3.0 / /hibernatedoclet /tasks /configuration /execution /executions /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version1.0-SNAPSHOT/version configuration hibernate configurationFile/src/main/resources/hibernate.properties/configurati onFile /hibernate outputDirectory hbm2ddlsrc/main/resources/hbm2ddl /outputDirectory /configuration /plugin /plugins /build can anyone tell me what am i doing wrong?? thanks in advance and regards Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hibernate3:schema-export
Hi All, Could someone please explain why hibernate is trying to create the tables in the database when all I want it to do is generate the schema file only. Any thought is this matter is greatly appreciated. When I execute mvn clean resources:resources hibernate3:schema-export -e I get the error displayed below. INFO: Reading mappings from file: /home/lakshman/Build/try/SMSService/target/classes/au/com/sc/enterprises ms/persistence/EnterpriseSmsLog.hbm.xml Aug 21, 2006 4:57:46 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues INFO: Mapping class: au.com.sc.enterprisesms.persistence.EnterpriseSmsLog - Enterprise_SMS_Log Aug 21, 2006 4:57:46 PM org.hibernate.dialect.Dialect init INFO: Using dialect: org.hibernate.dialect.SQLServerDialect Aug 21, 2006 4:57:46 PM org.hibernate.tool.hbm2ddl.SchemaExport execute INFO: Running hbm2ddl schema export Aug 21, 2006 4:57:46 PM org.hibernate.tool.hbm2ddl.SchemaExport execute INFO: exporting generated schema to database Aug 21, 2006 4:57:46 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: Using Hibernate built-in connection pool (not for production use!) Aug 21, 2006 4:57:46 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: Hibernate connection pool size: 20 Aug 21, 2006 4:57:46 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: autocommit mode: false Aug 21, 2006 4:57:46 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: using driver: net.sourceforge.jtds.jdbc.Driver at URL: jdbc:jtds:sqlserver://DEVSQL01:1254/SubstanceTest;instance=DEV02;schema= dbo Aug 21, 2006 4:57:46 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: connection properties: {user=dbopTest, password=} Aug 21, 2006 4:57:46 PM org.hibernate.tool.hbm2ddl.SchemaExport create SEVERE: Unsuccessful: create table SubstanceTest.dbo.Enterprise_SMS_Log (sms_id numeric(19,0) not null, customer_phone varchar(15) not null, application_phone varchar(15) not null, last_update datetime not null, mobile_carrier_name varchar(50) null, sms_body varchar(160) not null, message_type varchar(10) not null, service_provider_sms_reference varchar(50) null, sms_sent tinyint null, response_message varchar(250) null, primary key (sms_id)) Aug 21, 2006 4:57:46 PM org.hibernate.tool.hbm2ddl.SchemaExport create SEVERE: There is already an object named 'Enterprise_SMS_Log' in the database. Aug 21, 2006 4:57:46 PM org.hibernate.tool.hbm2ddl.SchemaExport execute INFO: schema export complete Aug 21, 2006 4:57:46 PM org.hibernate.connection.DriverManagerConnectionProvider close INFO: cleaning up connection pool: jdbc:jtds:sqlserver://SQL01:1254/SubstanceTest;instance=DEV02;schema=dbo [WARNING] 1 error(s) occurred while performing schema-export. [WARNING] Error #1: java.sql.SQLException: There is already an object named 'Enterprise_SMS_Log' in the database. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Errors while performing schema-export [INFO] [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Errors while performing schema-export at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default LifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa l(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL ifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle Failures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec ycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Errors while performing schema-export at
RE: maven2 / hibernate3- schema-export
Hi Marco, No problem. I had to download hibernate3 plugin from http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-hibernate3 and compile it locally before I could get it to work. Besides the command I ran are mvn clean resources:resources hibernate3:hbm2java mvn clean resources:resources hibernate3:schema-export Hope it helps. build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version1.0-SNAPSHOT/version executions execution configuration hibernate configurationFile/src/main/resources/hibernate.cfg.xml/configurationF ile /hibernate outputDirectory hbm2cfgxmlsrc/main/resources/hbm2cfgxml !-- hbm2dlltarget/hibernate3/sql/hbm2dll -- /outputDirectory outputFileSMS.sql/outputFile /configuration /execution /executions /plugin /plugins extensions extension groupIdjdbc.jtds/groupId artifactIdjtds/artifactId version1.2/version !-- groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.8.0.4/version -- /extension /extensions /build Thanks Lakshman _ From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Monday, 21 August 2006 9:00 PM To: Lakshman Srilakshmanan Subject: Re: maven2 / hibernate3- schema-export Hi Lakshman, thanx fo ryour reply.. my main problem is that i canont even get the schema-export goal to be executed... that is why i m little lost.. would you mind sending me a copy of your build section of your pom.xml (if it is not too confidential) so that i can try to get it at run, even with errors? thanks in advance and regards marco PS if i'd run mvn install, i suppose the schema-export goal should be executed as part of the install.. am i correct? On 8/21/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Marco, As we don't know what problems you are having, I am taking a stab in the dark. Have you included the dependency jars ie dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version 3.1.2/version /dependency dependency groupIdhsqldb/groupId artifactIdhsqldb/artifactId version 1.8.0.4 http://1.8.0.4 /version /dependency extensions extension groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.8.0.4/version /extension /extensions Have you also configured the driver and url in your hibernate.cfg.xml Thanks Lakshman -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Monday, 21 August 2006 4:21 AM To: Maven Users List Subject: maven2 / hibernate3- schema-export hi all i am trying to generate a schema out of my hibernate classes but i can't manage i am trying first to generate hbm.xml files using xdoclet, and then i am trying to generate a schema using hibernate3 plugin here's my pom.xml (only relevant part of build) build plugins plugin artifactIdxdoclet-maven-plugin/artifactId groupIdorg.codehaus.mojo/groupId executions execution phasegenerate-sources/phase goals goalxdoclet/goal /goals configuration tasks echo message=Generating HBM files from java source to ${basedir}/src/main/resources/ hibernatedoclet destdir=${basedir}/src/main/resources/ excludedtags=@version,@author,@todo,@see,@desc verbose=true fileset dir=${basedir}/src/main/java includes=**/hibernate/*.java/ hibernate version=3.0 / /hibernatedoclet /tasks /configuration /execution /executions /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version1.0-SNAPSHOT/version configuration hibernate configurationFile/src/main/resources/hibernate.properties/configurati onFile
ant dependency list
Hi All, Going through the examples provided in Developing Custom Maven Plugin in Better Builds with Maven, I find that example 5.4.2 (Notifying Other Developers with an Ant Mojo) does not work. The error message is Failed to initialise MIME mail which means that the ant mojo could not find mail.jar and/or activation.jar. I have included both the jar files in the maven-buildinfo-plugin pom.xml and in the guinea-pig pom.xml to no avail. Do I have to pass the maven.compile.classpath to the notify.mojos.xml. If yes, then could someone please show me how. I know how to pass it to an external ant build.xml file, but this ant mojo.xml file exists within the plugin. Any assistance is much appreciated. Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hibernate hbm.xml file not found
Hi All, When I try to generate-sources for hibernate java files from xxx.hbm.xml from within maven using goalhbm2java/goal nothing is created. But, if I get (by hook or by crook) the xxx.hbm.xml file into target/classes then I am able to generate the java files. I believe this is because hibernate tool looks in hibernate classpath for the xxx.hbm.xml files. How do I include src/main/resources into the hibernate classpath or do I have to create an ant task to copy the xxx.hbm.xml file into target/classes in the generate-sources phase before executing hbm2java. Is there an alternate way or is this a bug ?? Could someone please point me in the right direction. Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hibernate plugin not binding?
Hi Cristian Thanks for providing me with your feedback. I did finally solve this problem by downloading and compiling it locally. http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-hibernate3/hi bernate3-maven-plugin/ my pom.xml is setup as follows dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version3.1.2/version /dependency dependency groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.8.0.4/version /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version1.0-SNAPSHOT/version executions execution idgenerate-hibernate/id phasegenerate-sources/phase configuration hibernate configurationFile/src/main/resources/hibernate.cfg.xml/configurationF ile /hibernate outputDirectory hbm2cfgxmlsrc/main/resources/hbm2cfgxml hbm2javatarget/hibernate3/generated-sources/hbm2java /outputDirectory /configuration goals goalhbm2java/goal /goals /execution /executions /plugin /plugins extensions extension groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.8.0.4/version /extension /extensions /build Hope it helps :) Thanks Lakshman -Original Message- From: Cristian Jansenson [mailto:[EMAIL PROTECTED] Sent: Tuesday, 15 August 2006 11:07 AM To: Lakshman Srilakshmanan Subject: RE: Hibernate plugin not binding? No problem... and I didn't resolve this problem. My understanding on this issue is that, as of the date I reported it, it was not resolved. Furthermore, some people informally solved the problem by modifying the plugin; However, they didn't submit the fix because it was a hack more than a real fix. I suspect this issue will be addressed with the official version of the pluggin. Cristian -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: Sunday, August 13, 2006 8:10 PM To: [EMAIL PROTECTED] Subject: Hibernate plugin not binding? Hi Cristian Sorry for contacting you directly, but did you resolve the above issue I have included a link to the above problem you raised for your convenience. http://www.mail-archive.com/users@maven.apache.org/msg41711.html Your assistance is greatly appreciated. Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hibernate plugin not binding?
Hi All, I am having the same problem, but I have not seen a resolution to it on this thread. Is there a resolution, is this a bug ? Thanks Lakshman -Original Message- From: GoPokes64 [mailto:[EMAIL PROTECTED] Sent: Thursday, 3 August 2006 2:37 PM To: users@maven.apache.org Subject: Re: Hibernate plugin not binding? I'm having the same issue. Is there a way to override the execution of the hibernate goals default phase of compile? I need to run the generation in the generate-sources and then have the compile run. Thanks -- View this message in context: http://www.nabble.com/Hibernate-plugin-not-binding-- tf1550494.html#a5626709 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Super Pom
Hi Stephen, Thanks for your suggestion, I was coming to the same conclusion. What puzzled me was the manual Better Builds with Maven pg 24, where they refer to a Super POM that is implicitly inherited by all pom's. I guess this is buried deep in the maven code somewhere and not available for the end user. Could you please confirm my observation above, about the Super POM. Thanks Lakshman -Original Message- From: Stephen Duncan [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 July 2006 10:38 AM To: Maven Users List Subject: Re: Super Pom You can choose to make a super-pom that all your projects inherit from to provide common configuration. - Stephen On 7/26/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Emmanuel, Thanks for your reply. The http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html describes how to include a customised checkstyle within a POM. I need to know the location of the super POM itself, if one exists. Thanks Lakshman -Original Message- From: Emmanuel Venisse [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 July 2006 5:28 PM To: Maven Users List Subject: Re: Super Pom http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html Lakshman Srilakshmanan a écrit : Hi All, I have used maven 1.x for a couple of years now and am in the process of migrating to maven 2.x I need to set some configuration globally (eg customised checkstyle). I find the appropriate place would be to include it in the super pom. Unfortunately I don't seem to be able to find it. Could you please direct me to where it is located. Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Super Pom
Thanks Stephen, Sending to maven users list for future reference. Thanks Lakshman -Original Message- From: Stephen Duncan [mailto:[EMAIL PROTECTED] Sent: Friday, 28 July 2006 12:09 PM To: Lakshman Srilakshmanan Subject: Re: Super Pom Yes. That Super POM is basically a set of default values built in to Maven (from my understanding). This includes things like a profile activated by performRelease=true that includes the javadoc:jar and source:jar goals at package time, etc. - Stephen On 7/27/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Stephen, Thanks for your suggestion, I was coming to the same conclusion. What puzzled me was the manual Better Builds with Maven pg 24, where they refer to a Super POM that is implicitly inherited by all pom's. I guess this is buried deep in the maven code somewhere and not available for the end user. Could you please confirm my observation above, about the Super POM. Thanks Lakshman -Original Message- From: Stephen Duncan [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 July 2006 10:38 AM To: Maven Users List Subject: Re: Super Pom You can choose to make a super-pom that all your projects inherit from to provide common configuration. - Stephen On 7/26/06, Lakshman Srilakshmanan [EMAIL PROTECTED] wrote: Hi Emmanuel, Thanks for your reply. The http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html describes how to include a customised checkstyle within a POM. I need to know the location of the super POM itself, if one exists. Thanks Lakshman -Original Message- From: Emmanuel Venisse [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 July 2006 5:28 PM To: Maven Users List Subject: Re: Super Pom http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html Lakshman Srilakshmanan a écrit : Hi All, I have used maven 1.x for a couple of years now and am in the process of migrating to maven 2.x I need to set some configuration globally (eg customised checkstyle). I find the appropriate place would be to include it in the super pom. Unfortunately I don't seem to be able to find it. Could you please direct me to where it is located. Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Super Pom
Hi All, I have used maven 1.x for a couple of years now and am in the process of migrating to maven 2.x I need to set some configuration globally (eg customised checkstyle). I find the appropriate place would be to include it in the super pom. Unfortunately I don't seem to be able to find it. Could you please direct me to where it is located. Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Super Pom
Hi Emmanuel, Thanks for your reply. The http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html describes how to include a customised checkstyle within a POM. I need to know the location of the super POM itself, if one exists. Thanks Lakshman -Original Message- From: Emmanuel Venisse [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 July 2006 5:28 PM To: Maven Users List Subject: Re: Super Pom http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html Lakshman Srilakshmanan a écrit : Hi All, I have used maven 1.x for a couple of years now and am in the process of migrating to maven 2.x I need to set some configuration globally (eg customised checkstyle). I find the appropriate place would be to include it in the super pom. Unfortunately I don't seem to be able to find it. Could you please direct me to where it is located. Thanks Lakshman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]