passing the deployed artifact URL to another system
Hi users, I was wondering if there was a simple way to achieve the following. I have looked at the deploy plugin project pages, searched the mailing list and interwebs and I can't find examples of what I am trying to do or a possible method for me to achieve it. I use maven to upload software to a nexus repository, no fancy tricks just jars and wars put into snapshot and release repositories. I have written a small app which collates data about where artifacts have been deployed and what tests have been run against them. My problem is this. I want to store the full nexus url of artifacts in my other app, to use as the main reference for data about them. I started writing a maven plugin to achieve this (passing the URL in an HTML post as data) but I can't find a way to get the deploy URL which is used during the deploy phase of the maven build. I thought about constructing the url myself as the pattern is formulaic, but it involves timestamps, which if I generate again will be different to the real ones. If anyone knows a way to achieve this or can share examples of a way it has been done. I would be most appreciative. Regards Adam D
Re: dependency build-classpath returns wrong order
I have been able to understand where the issue is, but not how to solve it. The wrong classpath is generated when I use the configuration property excludeScope=provided. So if I run: mvn dependency:build-classpath I get the correct classpath, but if I run: mvn dependency:build-classpath -DexcludeScope=provided then the classpath has a weird order that doesn't correspond to the dependency tree. Is this a known bug of the dependency plugin? -- View this message in context: http://maven.40175.n5.nabble.com/dependency-build-classpath-returns-wrong-order-tp5773306p5773488.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: passing the deployed artifact URL to another system
These are not the droids you are looking for... Also, this is not the problem you want to solve... Nexus Pro has this nice feature called staging whereby the URL you deploy to is not the same URL that people download from. I know Artifactory has similar features. The final nail in the coffin is that very often the deployment repository is not configured as the download repository, as you deploy into an internal repository but download from a group proxying repository (so that you get fast builds by only asking 1 repository) For the 99% the deploy URL is not the same as the download URL, so the best you can do is query the attached artifact to determine the timestamp that was used (for -SNAPSHOT deployment) and then construct the URL based off the configured download URL that you expect to be downstream from where you made your deployment On 21 October 2013 11:00, Adam Downer adam.dow...@gamesys.co.uk wrote: Hi users, I was wondering if there was a simple way to achieve the following. I have looked at the deploy plugin project pages, searched the mailing list and interwebs and I can't find examples of what I am trying to do or a possible method for me to achieve it. I use maven to upload software to a nexus repository, no fancy tricks just jars and wars put into snapshot and release repositories. I have written a small app which collates data about where artifacts have been deployed and what tests have been run against them. My problem is this. I want to store the full nexus url of artifacts in my other app, to use as the main reference for data about them. I started writing a maven plugin to achieve this (passing the URL in an HTML post as data) but I can't find a way to get the deploy URL which is used during the deploy phase of the maven build. I thought about constructing the url myself as the pattern is formulaic, but it involves timestamps, which if I generate again will be different to the real ones. If anyone knows a way to achieve this or can share examples of a way it has been done. I would be most appreciative. Regards Adam D
Re: passing the deployed artifact URL to another system
Thanks for your reply Stephen, So, in my case at least, things are pretty simple - No nexus pro. So no staging or other middle man type repos. - No repository grouping. Releases is releases and snapshots is snapshots (we have restrictions on who can access what and setting up groups made this harder to manage effectively. My builds upload to http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar Then production deployment will reference http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar to get it on the environment. I agree that people with more complicated setups (involving proxies, staging repos, groups and non-nexus) will not find this so useful but I still find it hard to believe that no one else has wanted to pass a download url of an artifact from one build to another, maybe as a parameter in a deployment script for instance. The build process outputs the full URL to the console during the build. [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Retrieving previous build number from deploy-snapshots Uploading: http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar 4/7757K ... So the URL is constructed somewhere in the maven execution to be used by the deploy phase. Even if you can only point me to the maven deploy code which does the construct, that would be helpful. On 21/10/2013 13:30, Stephen Connolly stephen.alan.conno...@gmail.com wrote: These are not the droids you are looking for... Also, this is not the problem you want to solve... Nexus Pro has this nice feature called staging whereby the URL you deploy to is not the same URL that people download from. I know Artifactory has similar features. The final nail in the coffin is that very often the deployment repository is not configured as the download repository, as you deploy into an internal repository but download from a group proxying repository (so that you get fast builds by only asking 1 repository) For the 99% the deploy URL is not the same as the download URL, so the best you can do is query the attached artifact to determine the timestamp that was used (for -SNAPSHOT deployment) and then construct the URL based off the configured download URL that you expect to be downstream from where you made your deployment On 21 October 2013 11:00, Adam Downer adam.dow...@gamesys.co.uk wrote: Hi users, I was wondering if there was a simple way to achieve the following. I have looked at the deploy plugin project pages, searched the mailing list and interwebs and I can't find examples of what I am trying to do or a possible method for me to achieve it. I use maven to upload software to a nexus repository, no fancy tricks just jars and wars put into snapshot and release repositories. I have written a small app which collates data about where artifacts have been deployed and what tests have been run against them. My problem is this. I want to store the full nexus url of artifacts in my other app, to use as the main reference for data about them. I started writing a maven plugin to achieve this (passing the URL in an HTML post as data) but I can't find a way to get the deploy URL which is used during the deploy phase of the maven build. I thought about constructing the url myself as the pattern is formulaic, but it involves timestamps, which if I generate again will be different to the real ones. If anyone knows a way to achieve this or can share examples of a way it has been done. I would be most appreciative. Regards Adam D - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: passing the deployed artifact URL to another system
On 21 October 2013 14:23, Adam Downer adam.dow...@gamesys.co.uk wrote: Thanks for your reply Stephen, So, in my case at least, things are pretty simple - No nexus pro. So no staging or other middle man type repos. - No repository grouping. Releases is releases and snapshots is snapshots (we have restrictions on who can access what and setting up groups made this harder to manage effectively. My builds upload to http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar Then production deployment will reference http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar to get it on the environment. You are using a sub-optimal repository manager setup then. you should be running a proxy of central + your releases + your snapshots as a minimum and forcing everyone to use mirrorOf*/mirrorOf to that proxy... I agree that people with more complicated setups (involving proxies, staging repos, groups and non-nexus) will not find this so useful but I still find it hard to believe that no one else has wanted to pass a download url of an artifact from one build to another, maybe as a parameter in a deployment script for instance. The build process outputs the full URL to the console during the build. [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Retrieving previous build number from deploy-snapshots Uploading: http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar 4/7757K ... So the URL is constructed somewhere in the maven execution to be used by the deploy phase. Even if you can only point me to the maven deploy code which does the construct, that would be helpful. On 21/10/2013 13:30, Stephen Connolly stephen.alan.conno...@gmail.com wrote: These are not the droids you are looking for... Also, this is not the problem you want to solve... Nexus Pro has this nice feature called staging whereby the URL you deploy to is not the same URL that people download from. I know Artifactory has similar features. The final nail in the coffin is that very often the deployment repository is not configured as the download repository, as you deploy into an internal repository but download from a group proxying repository (so that you get fast builds by only asking 1 repository) For the 99% the deploy URL is not the same as the download URL, so the best you can do is query the attached artifact to determine the timestamp that was used (for -SNAPSHOT deployment) and then construct the URL based off the configured download URL that you expect to be downstream from where you made your deployment On 21 October 2013 11:00, Adam Downer adam.dow...@gamesys.co.uk wrote: Hi users, I was wondering if there was a simple way to achieve the following. I have looked at the deploy plugin project pages, searched the mailing list and interwebs and I can't find examples of what I am trying to do or a possible method for me to achieve it. I use maven to upload software to a nexus repository, no fancy tricks just jars and wars put into snapshot and release repositories. I have written a small app which collates data about where artifacts have been deployed and what tests have been run against them. My problem is this. I want to store the full nexus url of artifacts in my other app, to use as the main reference for data about them. I started writing a maven plugin to achieve this (passing the URL in an HTML post as data) but I can't find a way to get the deploy URL which is used during the deploy phase of the maven build. I thought about constructing the url myself as the pattern is formulaic, but it involves timestamps, which if I generate again will be different to the real ones. If anyone knows a way to achieve this or can share examples of a way it has been done. I would be most appreciative. Regards Adam D - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Support for dependencies in reporter plugins
For plugins intended for reporting, it would be nice if users could configure their dependencies directly in the reporterpluginsplugin, rather than having to write a dummy buildpluginsplugin. This would simplify configuring cobertura-maven-plugin for sun tool dependencies, for example. -- Cheers, Andrew Pennebaker apenneba...@42six.com
Re: passing the deployed artifact URL to another system
I have continued to dig into the code in order to try and find a potential answer wo my question. The mvane deploy plugin code https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-deploy-pluginhttps://svn.apache.org/repos/asf/maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java Probably contains the info I am looking for, or at least the method by which to consistently generate the info. I have also come across the shade plugin. Which seems to override the default behaviour of other plugins for its own purposes. I am thinking that maybe my maven plugin could override a portion of the standard deploy plugin in order to expose the information I require. Or maybe I am talking about two plugins now, an extension to 'deploy' to expose the required info in a ${project.finalRepoUploadURL} way and a second plugin to take that info and send it to my apps rest endpoint. Thanks in advance. Adam D From: Adam Downer adam.dow...@gamesys.co.ukmailto:adam.dow...@gamesys.co.uk Date: Monday, 21 October 2013 11:00 To: users@maven.apache.orgmailto:users@maven.apache.org users@maven.apache.orgmailto:users@maven.apache.org Subject: passing the deployed artifact URL to another system Hi users, I was wondering if there was a simple way to achieve the following. I have looked at the deploy plugin project pages, searched the mailing list and interwebs and I can't find examples of what I am trying to do or a possible method for me to achieve it. I use maven to upload software to a nexus repository, no fancy tricks just jars and wars put into snapshot and release repositories. I have written a small app which collates data about where artifacts have been deployed and what tests have been run against them. My problem is this. I want to store the full nexus url of artifacts in my other app, to use as the main reference for data about them. I started writing a maven plugin to achieve this (passing the URL in an HTML post as data) but I can't find a way to get the deploy URL which is used during the deploy phase of the maven build. I thought about constructing the url myself as the pattern is formulaic, but it involves timestamps, which if I generate again will be different to the real ones. If anyone knows a way to achieve this or can share examples of a way it has been done. I would be most appreciative. Regards Adam D
Re: passing the deployed artifact URL to another system
There is a free version of nexus available; it is quite easy to configure. Why do you want to avoid the tools with which maven works best? A repository manager of some kind is a basic assumption of much of the way maven users work. It seems as though you are going out of your way to make it hard for yourself. On Oct 21, 2013, at 9:23 AM, Adam Downer adam.dow...@gamesys.co.uk wrote: Thanks for your reply Stephen, So, in my case at least, things are pretty simple - No nexus pro. So no staging or other middle man type repos. - No repository grouping. Releases is releases and snapshots is snapshots (we have restrictions on who can access what and setting up groups made this harder to manage effectively. My builds upload to http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar Then production deployment will reference http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar to get it on the environment. I agree that people with more complicated setups (involving proxies, staging repos, groups and non-nexus) will not find this so useful but I still find it hard to believe that no one else has wanted to pass a download url of an artifact from one build to another, maybe as a parameter in a deployment script for instance. The build process outputs the full URL to the console during the build. [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Retrieving previous build number from deploy-snapshots Uploading: http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar 4/7757K ... So the URL is constructed somewhere in the maven execution to be used by the deploy phase. Even if you can only point me to the maven deploy code which does the construct, that would be helpful. On 21/10/2013 13:30, Stephen Connolly stephen.alan.conno...@gmail.com wrote: These are not the droids you are looking for... Also, this is not the problem you want to solve... Nexus Pro has this nice feature called staging whereby the URL you deploy to is not the same URL that people download from. I know Artifactory has similar features. The final nail in the coffin is that very often the deployment repository is not configured as the download repository, as you deploy into an internal repository but download from a group proxying repository (so that you get fast builds by only asking 1 repository) For the 99% the deploy URL is not the same as the download URL, so the best you can do is query the attached artifact to determine the timestamp that was used (for -SNAPSHOT deployment) and then construct the URL based off the configured download URL that you expect to be downstream from where you made your deployment On 21 October 2013 11:00, Adam Downer adam.dow...@gamesys.co.uk wrote: Hi users, I was wondering if there was a simple way to achieve the following. I have looked at the deploy plugin project pages, searched the mailing list and interwebs and I can't find examples of what I am trying to do or a possible method for me to achieve it. I use maven to upload software to a nexus repository, no fancy tricks just jars and wars put into snapshot and release repositories. I have written a small app which collates data about where artifacts have been deployed and what tests have been run against them. My problem is this. I want to store the full nexus url of artifacts in my other app, to use as the main reference for data about them. I started writing a maven plugin to achieve this (passing the URL in an HTML post as data) but I can't find a way to get the deploy URL which is used during the deploy phase of the maven build. I thought about constructing the url myself as the pattern is formulaic, but it involves timestamps, which if I generate again will be different to the real ones. If anyone knows a way to achieve this or can share examples of a way it has been done. I would be most appreciative. Regards Adam D - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - Author, Getting Started with Apache Maven http://www.packtpub.com/getting-started-with-apache-maven/video Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.fuzzyfacetheater.com/misfile/!
Re: passing the deployed artifact URL to another system
Hi Russell, Adam everyone, Russell wrote: There is a free version of nexus available He already said he is using Nexus. And anyway, use Nexus does not address his actual question. Adam wrote: I want to store the full nexus url of artifacts in my other app, to use as the main reference for data about them. Personally I would like a little more information before passing judgment about what you are trying to achieve. The thing about distributed repositories across the Internet is: there is no one central index of all of them. (http://mvnrepository.com/ tries but it is only a few of them. It can't possibly know about all of them, especially non-public ones.) If I understand correctly, you are trying to derive a remote repository path from a GAV. Is that correct? Firstly, I will second what Stephen pointed out: the deploy path (i.e., for upload) is not the same thing as the resolution path (i.e., for downloading again later). I am guessing your application actually cares about where these artifacts (and their POMs) can be downloaded, rather than what path was actually used at deploy time. If so, is there something wrong with simply having a hardcoded list of repository base URLs, from which you can scan for the GAVs? That's pretty much what Maven does with its repositories elements. Regards, Curtis On Mon, Oct 21, 2013 at 11:58 AM, Russell Gold r...@gold-family.us wrote: There is a free version of nexus available; it is quite easy to configure. Why do you want to avoid the tools with which maven works best? A repository manager of some kind is a basic assumption of much of the way maven users work. It seems as though you are going out of your way to make it hard for yourself. On Oct 21, 2013, at 9:23 AM, Adam Downer adam.dow...@gamesys.co.uk wrote: Thanks for your reply Stephen, So, in my case at least, things are pretty simple - No nexus pro. So no staging or other middle man type repos. - No repository grouping. Releases is releases and snapshots is snapshots (we have restrictions on who can access what and setting up groups made this harder to manage effectively. My builds upload to http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar Then production deployment will reference http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar to get it on the environment. I agree that people with more complicated setups (involving proxies, staging repos, groups and non-nexus) will not find this so useful but I still find it hard to believe that no one else has wanted to pass a download url of an artifact from one build to another, maybe as a parameter in a deployment script for instance. The build process outputs the full URL to the console during the build. [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Retrieving previous build number from deploy-snapshots Uploading: http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio n/artifact.jar 4/7757K ... So the URL is constructed somewhere in the maven execution to be used by the deploy phase. Even if you can only point me to the maven deploy code which does the construct, that would be helpful. On 21/10/2013 13:30, Stephen Connolly stephen.alan.conno...@gmail.com wrote: These are not the droids you are looking for... Also, this is not the problem you want to solve... Nexus Pro has this nice feature called staging whereby the URL you deploy to is not the same URL that people download from. I know Artifactory has similar features. The final nail in the coffin is that very often the deployment repository is not configured as the download repository, as you deploy into an internal repository but download from a group proxying repository (so that you get fast builds by only asking 1 repository) For the 99% the deploy URL is not the same as the download URL, so the best you can do is query the attached artifact to determine the timestamp that was used (for -SNAPSHOT deployment) and then construct the URL based off the configured download URL that you expect to be downstream from where you made your deployment On 21 October 2013 11:00, Adam Downer adam.dow...@gamesys.co.uk wrote: Hi users, I was wondering if there was a simple way to achieve the following. I have looked at the deploy plugin project pages, searched the mailing list and interwebs and I can't find examples of what I am trying to do or a possible method for me to achieve it. I use maven to upload software to a nexus repository, no fancy tricks just jars and wars put into snapshot and release repositories. I have written a small app which collates data about where artifacts have been deployed and what tests have been run against them. My problem is this. I want to store the full nexus url of artifacts in my other
Problem downloading dependencies
Hi, I'm very new to maven so I have no idea what's causing this error. I have a sample application and I type mvn clean install -U, which seems to grab all dependencies except one: [WARNING] The POM for org.springframework.osgi:servlet-api.osgi:jar:2.5-SNAPSHOT is missing, no dependency information available Because of this, building my project eventually has an error: [INFO] [INFO] Reactor Summary: [INFO] [INFO] simple-bundle . SUCCESS [1.029s] [INFO] simpleweb-war . SUCCESS [2.764s] [INFO] simple-kar FAILURE [3.378s] [INFO] simpleweb . SKIPPED [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 7.632s [INFO] Finished at: Mon Oct 21 14:25:17 CDT 2013 [INFO] Final Memory: 29M/561M [INFO] [ERROR] Failed to execute goal on project simple-kar: Could not resolve dependencies for project com.good.server:simple-kar:pom:1.0: Could not find artifact org.springframework.osgi:servlet-api.osgi:jar:2.5-SNAPSHOT in repository.springsource.snapshot (http://repo.springsource.org/snapshot) - [Help 1] I have tried messing around with repositories in my pom.xml, but that doesn't seem to help. Here is my project pom.xml (for simple-kar). Any idea whats going on? ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.good.server/groupId artifactIdsimple-kar/artifactId version1.0/version packagingpom/packaging repositories repository idrepository.springsource.snapshot/id nameSpringSource Snapshot Repository/name urlhttp://repo.springsource.org/snapshot/url /repository repository idmvnrepository/id urlhttp://repo1.maven.org/maven2/url !--snapshots enabledfalse/enabled /snapshots releases enabledtrue/enabled /releases-- /repository /repositories properties java.version1.7/java.version org.springframework.version3.1.1.RELEASE /org.springframework.version project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjavax.servlet/groupId artifactIdjavax.servlet-api/artifactId version3.0.1/version scopeprovided/scope /dependency dependency groupIdorg.springframework.osgi/groupId artifactIdspring-osgi-web/artifactId version1.1.2/version /dependency /dependencies build plugins plugin groupIdorg.apache.karaf.tooling/groupId artifactIdfeatures-maven-plugin/artifactId version2.2.8/version executions execution idcreate-kar/id goals goalcreate-kar/goal /goals configuration featuresFilesrc/main/resources/features.xml/featuresFile /configuration /execution /executions /plugin /plugins /build /project - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-ear-pugin modify applicaion.xml
thanks used following setting to get it work. applicationXmlsrc/main/resources/META-INF/application.xml/applicationXml On Thu, Oct 17, 2013 at 6:26 PM, Wayne Fay wayne...@gmail.com wrote: I have requirement to exclude some entries in application.xml during ear build. ... In my case I need to maintain the same EAR structure in the build but have to exclude entries Alpha.jar and Beta.jar from application.xml during build. I am fairly certain you can provide an application.xml rather than just taking the one that Maven generates for you. Check the configuration options documentation for m-ear-p. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
include a new file under
Hi, I am using maven-ear-plugin to generate my ear. I need to include a new file xml under EAR/META-INF/myxmlfile how can I include that in my META-INF/
Re: include a new file under
I have earSourceIncludessrc/main/resources/META-INF/myxmlFile.xml/earSourceIncludes but its not included under EAR/META-INF/ Thanks On Tue, Oct 22, 2013 at 10:31 AM, Surendran D surendra...@gmail.com wrote: Hi, I am using maven-ear-plugin to generate my ear. I need to include a new file xml under EAR/META-INF/myxmlfile how can I include that in my META-INF/
Re: include a new file under
Just figured it out it worked after adding following configuration earSourceDirectory${basedir}/src/main/resources/earSourceDirectory earSourceIncludesMETA-INF/myxmlFile.xml/earSourceIncludes On Tue, Oct 22, 2013 at 10:51 AM, Surendran D surendra...@gmail.com wrote: I have earSourceIncludessrc/main/resources/META-INF/myxmlFile.xml/earSourceIncludes but its not included under EAR/META-INF/ Thanks On Tue, Oct 22, 2013 at 10:31 AM, Surendran D surendra...@gmail.comwrote: Hi, I am using maven-ear-plugin to generate my ear. I need to include a new file xml under EAR/META-INF/myxmlfile how can I include that in my META-INF/