How to know , where any artifact can be found?
Hi All, I have maven-utils-parent-1.0.pom and this have dependencyManagement as shown below. Not by reading this pom I am in need to download all its dependencies (jar files). One way is that I try downloading(using ArtifactResolver's resolve method) from central, but it is possible that these dependencies doesn't exist in central. My question is : how would I know where to look for these dependencies, by reading pom(maven-utils-parent-1.0.pom)?. Is there any way to extract repositories information where these dependencies can be found.?? dependencyManagement dependencies !-- Internal project dependencies -- dependency groupId${project.groupId}/groupId artifactIdmaven-utils/artifactId version${project.version}/version /dependency !-- Third-party software -- dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.14/version /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency !-- Java EE -- dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.5/version scopeprovided/scope /dependency dependency groupIdjavax.servlet.jsp/groupId artifactIdjsp-api/artifactId version2.1/version scopeprovided/scope /dependency /dependencies /dependencyManagement Thanks, Amaresh
Re: Advice on version control
Nexus is now installed, yes it was quick, and it does solve our problem. This exercise has also raised other issues with our procedures which we will now address and it seem that Nexus will help us again. I am grateful for the usual highly constructive advice from the list. Thanks, Eric. On Thu, Jun 17, 2010 at 12:50 AM, Ron Wheeler rwhee...@artifact-software.com wrote: On 15/06/2010 9:04 AM, Eric Rotick wrote: All good advice but my feeling is that is all comes down to one basic rule; if it can go wrong, it will. We've all been there; the code's written, the documentation's done and it's just about to go out the door when someone spots something. The project lead looks at it and decides it's a minor change and won't upset anything. There's the problem. When the pressure is on, you make these silly mistakes. If there was something that really did stop the re-release of a non snapshot project then it has to be done by the book and the mistake avoided. Even the additional work to bump other versions must be better than the application failing. I know there will always be the occasion when the change really is minor, like in say documentation and you could have gotten away with it but I would certainly prefer that there was a 'machine' waiting patiently to stop things like this in their tracks. Someone with Nexus admin privs can delete a release and then you can re-release it. Not a great thing to have happen but at least someone has to explicitly recognize that the release was bad and the new one is not. They also have to explain to all the potential users that they have to delete the bad release from their local Maven cache. Ron I'm going to see if Nexus really is that quick to install. Of course, it's a bit late now! It is quick to install. On Tue, Jun 15, 2010 at 1:52 PM, Jeff Jensen jeffjen...@upstairstechnology.com wrote: And the release plugin does the version number changes (from snapshot to release, commit POM, bump to next snapshot version, commit) for you... I wonder if using it would help your process consistency by eliminating a few manual things. -Original Message- From: Adrian Shum [mailto:tcs...@taifook.com] Sent: Tuesday, June 15, 2010 7:42 AM To: Maven Users List Subject: RE: Advice on version control I think the main point is: after release, change the POM version immediately to snapshot again. By doing so, people shouldn't re-release accidentally (They will only re-release a snapshot, which is harmless), unless they explicitly change the POM version and re-release themselves. I think it is more of a procedure issue instead :) -- Best Regards, AdRiAN ShUM -Original Message- From: Eric Rotick [mailto:pc.gree...@gmail.com] Sent: Tuesday, June 15, 2010 7:53 PM To: Maven Users List Subject: Re: Advice on version control This is exactly what we've been doing and it's been working well for years but we now realise it's very fragile. The change that broke the system was seemingly benign and the project lead also though so but in reality it was not. If the policy of single releases only for non snapshots was enforced then the other elements would have required a minimum of a version bump and the system would still be fine. I've often wondered why we needed a repo manager and now I know ;-) On Tue, Jun 15, 2010 at 12:38 PM, Adrian Shumtcs...@taifook.com wrote: Here is the practice I am adopting now: Whenever the project is open for change, use SNAPSHOT version. Change the version to a concrete version number when you decide to perform a release. Do your release branching and tagging etc, and then immediate change the POM version back to SNAPSHOT. i.e. whenever a project source is subject to change, use SNAPSHOT as version in POM -- Best Regards, AdRiAN ShUM -Original Message- From: Eric Rotick [mailto:pc.gree...@gmail.com] Sent: Tuesday, June 15, 2010 7:22 PM To: users@maven.apache.org Subject: Advice on version control This might be more to do with SCM than Maven but as Maven seems to have the handle on most things I thought I'd ask this list first. It is clear that the version contained in the pom is vitally important and the process by which a version or revision number is incremented is clear. Unfortunately, someone made a mistake of making a significant change to some source and re-released the jars without changing the version. The result was that the client application would not talk to the server in certain conditions. Basically, given our current procedures, this was a problem waiting to happen. Although it is clear what needs to happen it eludes us how this is enforced. It seems that we need the ability to write snapshots any number of times but non snapshots can only be written once and then no more. Hmm, I've just thought, maybe this is what the likes of Nexus and Artifactory would do, but as
Re: How to know , where any artifact can be found?
Install Nexus and these problem (and a lot of other ones) go away. Out of the box, it will find all of the common dependencies and you can add more 3rd party repos if you need some odd stuff. You will save yourself a lot of grief and false starts with maven if you get Nexus going early in the project. Ron On 17/06/2010 3:04 AM, amaresh mourya wrote: Hi All, I have maven-utils-parent-1.0.pom and this havedependencyManagement as shown below. Not by reading this pom I am in need to download all its dependencies (jar files). One way is that I try downloading(using ArtifactResolver's resolve method) from central, but it is possible that these dependencies doesn't exist in central. My question is : how would I know where to look for these dependencies, by reading pom(maven-utils-parent-1.0.pom)?. Is there any way to extract repositories information where these dependencies can be found.?? dependencyManagement dependencies !-- Internal project dependencies -- dependency groupId${project.groupId}/groupId artifactIdmaven-utils/artifactId version${project.version}/version /dependency !-- Third-party software -- dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.14/version /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency !-- Java EE -- dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.5/version scopeprovided/scope /dependency dependency groupIdjavax.servlet.jsp/groupId artifactIdjsp-api/artifactId version2.1/version scopeprovided/scope /dependency /dependencies /dependencyManagement Thanks, Amaresh - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-eclipse-plugin and POM packaging projects
M2Eclipse does some things fine but not all. Use case: pom A define a resource folder I have in eclipse, imported with M2E, project A and B, the latter inherit from A. Change the resource folder in A from eclipse, save. Nothing change in eclipse. So while changing a dep in the pom make the builder run, changing resourcer requires maven-eclipse-plugin. Or maybe I am making something wrong. On Wed, Jun 16, 2010 at 9:18 PM, Wayne Fay wayne...@gmail.com wrote: Actually, m-e-p does not create any .project while M2Eclipse import both of them... and the multi-module is useless and I will just delete it. IMO you are better off just switching over to m2eclipse full time instead of continuing to fight with m-e-p. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Daniele Dellafiore http://danieledellafiore.net
Re: How to know , where any artifact can be found?
Thanks, but.. I am creating an application which requires download of artifacts for the results coming from Nexus query(This gives me ArtifactInfo and this has repository name), My problem is when I go for download of any artifact, and if this artifact is of packaging type 'jar', I am able to download this jar since I know what repository I have to use, but if packaging type is 'pom', I am in need to download it first(I know from where to download i.e repository value from ArtifactInfo) and then extract the all dependenciesand download them one by one. I am not sure where I should look for it (dependencies from downloaded depedency-name.pom file), if I create an object of ArtifactInfo for this what would be the value of repository. ---Amaresh On Thu, Jun 17, 2010 at 4:53 PM, Ron Wheeler rwhee...@artifact-software.com wrote: Install Nexus and these problem (and a lot of other ones) go away. Out of the box, it will find all of the common dependencies and you can add more 3rd party repos if you need some odd stuff. You will save yourself a lot of grief and false starts with maven if you get Nexus going early in the project. Ron On 17/06/2010 3:04 AM, amaresh mourya wrote: Hi All, I have maven-utils-parent-1.0.pom and this havedependencyManagement as shown below. Not by reading this pom I am in need to download all its dependencies (jar files). One way is that I try downloading(using ArtifactResolver's resolve method) from central, but it is possible that these dependencies doesn't exist in central. My question is : how would I know where to look for these dependencies, by reading pom(maven-utils-parent-1.0.pom)?. Is there any way to extract repositories information where these dependencies can be found.?? dependencyManagement dependencies !-- Internal project dependencies -- dependency groupId${project.groupId}/groupId artifactIdmaven-utils/artifactId version${project.version}/version /dependency !-- Third-party software -- dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.14/version /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency !-- Java EE -- dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.5/version scopeprovided/scope /dependency dependency groupIdjavax.servlet.jsp/groupId artifactIdjsp-api/artifactId version2.1/version scopeprovided/scope /dependency /dependencies /dependencyManagement Thanks, Amaresh - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-eclipse-plugin and POM packaging projects
you can right click on one of the project root folders, select the maven item and one of the sub-menu items will do what you want -S On 17 June 2010 12:28, Daniele Dellafiore ilde...@gmail.com wrote: M2Eclipse does some things fine but not all. Use case: pom A define a resource folder I have in eclipse, imported with M2E, project A and B, the latter inherit from A. Change the resource folder in A from eclipse, save. Nothing change in eclipse. So while changing a dep in the pom make the builder run, changing resourcer requires maven-eclipse-plugin. Or maybe I am making something wrong. On Wed, Jun 16, 2010 at 9:18 PM, Wayne Fay wayne...@gmail.com wrote: Actually, m-e-p does not create any .project while M2Eclipse import both of them... and the multi-module is useless and I will just delete it. IMO you are better off just switching over to m2eclipse full time instead of continuing to fight with m-e-p. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Daniele Dellafiore http://danieledellafiore.net
releasing a hierarchy of parent poms with the Release plugin
For a collection of parent poms, arranged in a hierarchy, e.g., A (is parent of) B (is parent of) C, all at version e.g. 1-SNAPSHOT when I put all of these into an aggregate project, specifying modules A, B, and C, the mvn release:prepare -DdryRun=true works fine, but the mvn release:prepare fails when it tries to resolve the parent of B and looks for a version 1 (without the SNAPSHOT), which obviously isn't in any repo (because it's one of the set being released). Is there a way to release all of these together, or do I have to have 3 individual release votes, waiting in each case for the 1 version to reach the central repo before commencing with the release:prepare of the the next lower one in the hierarchy? -Marshall Schor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven-plugins
I'm getting a HTTP 403 when trying to connect to http://maven-plugins.sourceforge.net/repository/ Has anyone accessed that repo lately? I'm trying to get the Cobertura plugin -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven-plugins
I'm getting a HTTP 403 when trying to connect to http://maven-plugins.sourceforge.net/repository/ Last I checked, that is for Maven1 plugins, right? Are you still using M1 or trying to find Cobertura for M2? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: unpack-dependencies unpacks all dependencies
-Original Message- From: GALLAGHER, RON (ATTSI) [mailto:rg7...@att.com] Sent: Wednesday, June 16, 2010 9:00 PM To: Maven Users List Subject: RE: unpack-dependencies unpacks all dependencies Eric, The properties you should use are includeGroupIds [1] and includeArtifactIds [2]. The POM file you provided does not pluralize those properties. Ah, so I should. It works fine with the right element names. Thanks! So what are the non-plural ones (and why aren't they documented)? Or, if those aren't valid elements at all, why doesn't the build fail due to invalid xml? eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: releasing a hierarchy of parent poms with the Release plugin
Have you tried specifying the parent.relativePath element? /Anders On Thu, Jun 17, 2010 at 17:43, Marshall Schor m...@schor.com wrote: For a collection of parent poms, arranged in a hierarchy, e.g., A (is parent of) B (is parent of) C, all at version e.g. 1-SNAPSHOT when I put all of these into an aggregate project, specifying modules A, B, and C, the mvn release:prepare -DdryRun=true works fine, but the mvn release:prepare fails when it tries to resolve the parent of B and looks for a version 1 (without the SNAPSHOT), which obviously isn't in any repo (because it's one of the set being released). Is there a way to release all of these together, or do I have to have 3 individual release votes, waiting in each case for the 1 version to reach the central repo before commencing with the release:prepare of the the next lower one in the hierarchy? -Marshall Schor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven-plugins
On Thu, Jun 17, 2010 at 2:02 PM, Wayne Fay wayne...@gmail.com wrote: I'm getting a HTTP 403 when trying to connect to http://maven-plugins.sourceforge.net/repository/ Last I checked, that is for Maven1 plugins, right? Are you still using M1 or trying to find Cobertura for M2? yes I do want the M2 plugin.. I see that the M2 is at codehaus Thanks for pointing that out -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: releasing a hierarchy of parent poms with the Release plugin
On 6/17/2010 3:17 PM, Anders Hammar wrote: Have you tried specifying the parent.relativePath element? Thanks, that appears to have done the trick! -Marshall /Anders On Thu, Jun 17, 2010 at 17:43, Marshall Schor m...@schor.com wrote: For a collection of parent poms, arranged in a hierarchy, e.g., A (is parent of) B (is parent of) C, all at version e.g. 1-SNAPSHOT when I put all of these into an aggregate project, specifying modules A, B, and C, the mvn release:prepare -DdryRun=true works fine, but the mvn release:prepare fails when it tries to resolve the parent of B and looks for a version 1 (without the SNAPSHOT), which obviously isn't in any repo (because it's one of the set being released). Is there a way to release all of these together, or do I have to have 3 individual release votes, waiting in each case for the 1 version to reach the central repo before commencing with the release:prepare of the the next lower one in the hierarchy? -Marshall Schor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
copying resources from /src/main/resources to target/webapp/web-inf/html
Hi all, I need to copy my resources located at src/main/resources, which are html files to target/web-inf/html. This is needed to create the war file. I've tried setting up maven resources plug in as follows plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version executions execution idcopy-package-config/id phasepackage/phase goals goalcopy-resources/goal /goals configuration outputDirectory${basedir}/web-inf/html/outputDirectory resources resource directory${basedir}/src/main/resources/directory filteringtrue/filtering /resource /resources /configuration /execution /executions /plugin I got [1] Inside the definition for plugin 'maven-resources-plugin' specify the following: configuration ... resourcesVALUE/resources /configuration. any help I really would appreciate thanks in advance -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: copying resources from /src/main/resources to target/webapp/web-inf/html
I need to copy my resources located at src/main/resources, which are html files to target/web-inf/html. This is needed to create the war file. Wouldn't a more reasonable solution be for you to adapt your webapp project to use the webapp archetype layout?? Your html files should be in src/main/webapp and they will automatically be copied into the proper location under target during the build. Why are you doing things the hard way?? Smart users do not fight Maven, but work with it. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: problems with jar in central?
Agreed ... I'm sure they tried to re-release. So I'm using dependencyManagement to force 3.0.2 :) But if you don't allow it, why is central's .sha1 wrong for the corresponding jar file in this case? Alternatively, would you consider allowing re-release for jars/checksums that don't match? Otherwise it seems there is no simple way to correct them once broken. I will follow up with the woodstox folks and point them towards the MEV link. Zac On Tue, Jun 15, 2010 at 8:52 AM, Brian Fox bri...@infinity.nu wrote: This implies to me that they attempted to re-release the same jar after it was synced to central. We don't allow that, hence the difference between the source repo and central - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Exporting Ant properties to Maven
Hi, Could someone please explain how to export properties defined in an Ant block into Maven? http://stackoverflow.com/questions/3066252/exporting-maven-properties-from-ant-code Basically I'm trying to ensure that ${basedir} contains unix-style slashes under Windows and this is the only way I knew how to do it. Is there a better way? Thanks, Gili -- View this message in context: http://maven.40175.n5.nabble.com/Exporting-Ant-properties-to-Maven-tp510023p510023.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Strange surefire error
On Tue, Jun 15, 2010 at 8:02 AM, Kristian Rosenvold kristian.rosenv...@gmail.com wrote: Does it fail immediately or does it run the tests first ? Is the plugin configured with forkedProcessTimeoutInSeconds ? Kristian Yes, it fails directly. I have configured to use plexus-utils v.1.5.9 and surefire plugin 2.5 now, still not working. Tested with different JVMs to build the plexus-util Sun's JVM 1.5.0 = OK Sun's JVM 1.6.0 = OK IBM's JVM 1.5.0 = NOK (3 tests failed) IBM's JVM 1.6.0 = NOK (33 tests failed) With IBM's JVM 1.5.0 it still works for us so our problem with IBM's JVM 1.6.0 should be in the new 33 failed test. The approach we have right now is to define Sun's JVM on surefire-plugin and to use: forkMode=always forkedProcessTimeoutInSeconds=60 The team have executed once and succeeded so will do som more tests. Still it's a workaround and it would be best if plexus-util would work with IBM JVM :) -- Regards Joacim