Re: Custom metadata in a POM?
Hi, Using Artifactory you can attach any number of named metadata to a deployed file (or folder). This metadata can be either XML or property-based. It is fully searchable and can be attached and retrieved using simple REST queries (as long as the end user has the "annotate permission"), so there is no need for much custom development. Basically, to add and consume custom metadata to/from a zip you only use to use simple REST commands to a URL in the form of http://host:port/path-to-artifact:metadata-name, which is very lightweight on the repository. You can find more info about this here: http://www.jfrog.org/confluence/x/CQCq. The list of named metadata is also available though REST API ( http://www.jfrog.org/confluence/x/C4K5) and since metadata is searchable you can even use it to manage your artifacts by manipulating search results found according to metadata queries (promote/move, copy etc.), but that's a different story :) Hope that helps, Yoav http://www.jfrog.org/ On Sun, Jun 6, 2010 at 9:54 PM, Les Hazlewood wrote: > Yep, Nexus would be fantastic for this - we're basically trying to > come up with the most efficient mechanism to do the following: > > 1. A Grails developer releases a plugin. This process first entails > (ideally) Grails uploading it to a Maven repo (i.e. Nexus). > 2. Grails (during its 'release-plugin' command) next 'pings' the > global Grails Plugin Portal (http://www.grails.org/plugin/home) with > the location of the released artifact(s). > 3. The Plugin Portal downloads the plugin metadata when it can based > on the location specified in #2 and updates its website pages to > ensure that any searches in the Portal reflect the new release. > > The key here is #3 - finding the best way for the Portal to > most-efficiently download and read in the plugin metadata without > having to download the entire plugin release.zip. The Portal has to > support this for hundreds of plugins every day - it has to be as lean > as possible. > > Best, > > Les > > On Sun, Jun 6, 2010 at 7:38 AM, Jason van Zyl wrote: > > Nexus can utilize anything contained in the repository. Whether a piece > of metadata exists alongside the artifact or within it, a Nexus plugin could > be created to process the information. So you don't need to change the way > Grails plugins are packaged in order to extract the metadata and make it > available. We know from experience that Nexus is perfect for plugin systems > :-) > > > > On Jun 4, 2010, at 4:28 PM, Les Hazlewood wrote: > > > >> Is this possible? So, in addition to stuff like , is it > >> possible to add additional metadata? > >> > >> I'm asking because the Grails development team is exploring the > >> possibility of using a Maven repository (e.g. Nexus) to host Grails > >> plugins. A Grails plugin is a .zip file, but the Grails environment > >> (and the global Grails Plugin Portal > >> http://www.grails.org/plugin/home) need to read Grails-specific > >> metadata about that .zip without having to download the .zip first. > >> I'm proposing that the POM could serve that purpose *if* POMs can hold > >> additional metadata somehow. > >> > >> Any ideas? > >> > >> Thanks, > >> > >> Les > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >> For additional commands, e-mail: users-h...@maven.apache.org > >> > > > > Thanks, > > > > Jason > > > > -- > > Jason van Zyl > > Founder, Apache Maven > > http://twitter.com/jvanzyl > > - > > > > > > > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Custom metadata in a POM?
Yep, Nexus would be fantastic for this - we're basically trying to come up with the most efficient mechanism to do the following: 1. A Grails developer releases a plugin. This process first entails (ideally) Grails uploading it to a Maven repo (i.e. Nexus). 2. Grails (during its 'release-plugin' command) next 'pings' the global Grails Plugin Portal (http://www.grails.org/plugin/home) with the location of the released artifact(s). 3. The Plugin Portal downloads the plugin metadata when it can based on the location specified in #2 and updates its website pages to ensure that any searches in the Portal reflect the new release. The key here is #3 - finding the best way for the Portal to most-efficiently download and read in the plugin metadata without having to download the entire plugin release.zip. The Portal has to support this for hundreds of plugins every day - it has to be as lean as possible. Best, Les On Sun, Jun 6, 2010 at 7:38 AM, Jason van Zyl wrote: > Nexus can utilize anything contained in the repository. Whether a piece of > metadata exists alongside the artifact or within it, a Nexus plugin could be > created to process the information. So you don't need to change the way > Grails plugins are packaged in order to extract the metadata and make it > available. We know from experience that Nexus is perfect for plugin systems > :-) > > On Jun 4, 2010, at 4:28 PM, Les Hazlewood wrote: > >> Is this possible? So, in addition to stuff like , is it >> possible to add additional metadata? >> >> I'm asking because the Grails development team is exploring the >> possibility of using a Maven repository (e.g. Nexus) to host Grails >> plugins. A Grails plugin is a .zip file, but the Grails environment >> (and the global Grails Plugin Portal >> http://www.grails.org/plugin/home) need to read Grails-specific >> metadata about that .zip without having to download the .zip first. >> I'm proposing that the POM could serve that purpose *if* POMs can hold >> additional metadata somehow. >> >> Any ideas? >> >> Thanks, >> >> Les >> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> > > Thanks, > > Jason > > -- > Jason van Zyl > Founder, Apache Maven > http://twitter.com/jvanzyl > - > > > > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Custom metadata in a POM?
Nexus can utilize anything contained in the repository. Whether a piece of metadata exists alongside the artifact or within it, a Nexus plugin could be created to process the information. So you don't need to change the way Grails plugins are packaged in order to extract the metadata and make it available. We know from experience that Nexus is perfect for plugin systems :-) On Jun 4, 2010, at 4:28 PM, Les Hazlewood wrote: > Is this possible? So, in addition to stuff like , is it > possible to add additional metadata? > > I'm asking because the Grails development team is exploring the > possibility of using a Maven repository (e.g. Nexus) to host Grails > plugins. A Grails plugin is a .zip file, but the Grails environment > (and the global Grails Plugin Portal > http://www.grails.org/plugin/home) need to read Grails-specific > metadata about that .zip without having to download the .zip first. > I'm proposing that the POM could serve that purpose *if* POMs can hold > additional metadata somehow. > > Any ideas? > > Thanks, > > Les > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl -
Re: Custom metadata in a POM?
Very cool - thanks for the pointer! I'll have to check it out. - Les On Fri, Jun 4, 2010 at 3:27 PM, Kalle Korhonen wrote: > On Fri, Jun 4, 2010 at 3:07 PM, Les Hazlewood wrote: >> It definitely doesn't have to sit in the POM file if that's considered >> bad practice. The key is that the Plugin Portal would need to >> download something lightweight to discover the metadata and not the >> actual plugin. There is already a Grails plugin.xml file that they >> use for this purpose, but it currently is bundled inside the plugin >> .zip - not ideal. I'm sure that can be re-used. >> The main goal though was to have that plugin.xml somewhere external to >> the plugin .zip so the Plugin Portal can 'know' about the plugin and >> not need to download it directly. I'll bring up your suggestions - I > > Sounds like publishing the plugin.xml might be the right path since > such a thing exists already. Jar plugin additionally packages the pom > file by default into the jar, in this case you'd just need to do the > opposite. You could very simply create a prototype configuration with > the buildhelper plugin, see "Attach additional artifacts to your > project" section at > http://mojo.codehaus.org/build-helper-maven-plugin/usage.html. I'd > designate a custom type, such as .gpm for that xml file though to make > it easily identifiable. > > Kalle > >> On Fri, Jun 4, 2010 at 2:10 PM, Kalle Korhonen >> wrote: >>> On Fri, Jun 4, 2010 at 1:28 PM, Les Hazlewood wrote: Is this possible? So, in addition to stuff like , is it possible to add additional metadata? plugins. >>> >>> Seems like a potential misuse of the pom.xml. The power of the project >>> object model is that it's standardized and contains the metadata >>> common to all projects (as much as possible). Even if you could do it, >>> why would this custom metadata need to sit in the pom file if it's >>> specific to a particular environment or technology only? Wouldn't be >>> cleaner and simpler to to create a .gpm (Grails Plugin Metadata) with >>> its own schema and whip up a plugin that reads it in from a >>> pre-defined source location, possibly also adding it both to the zip >>> and attaching it as a secondary artifact to the module? If you wanted >>> to specify this metadata as part of the pom, you'd probably still want >>> to create a custom plugin for it. The configuration section for a >>> plugin can carry arbitrary xml data. For example, see jar plugin's >>> manifest customization at >>> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html. >>> You could follow the same approach for your custom plugin. >>> >>> Kalle >>> >>> - >>> 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 >> >> > > - > 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
Re: Custom metadata in a POM?
On Fri, Jun 4, 2010 at 3:07 PM, Les Hazlewood wrote: > It definitely doesn't have to sit in the POM file if that's considered > bad practice. The key is that the Plugin Portal would need to > download something lightweight to discover the metadata and not the > actual plugin. There is already a Grails plugin.xml file that they > use for this purpose, but it currently is bundled inside the plugin > .zip - not ideal. I'm sure that can be re-used. > The main goal though was to have that plugin.xml somewhere external to > the plugin .zip so the Plugin Portal can 'know' about the plugin and > not need to download it directly. I'll bring up your suggestions - I Sounds like publishing the plugin.xml might be the right path since such a thing exists already. Jar plugin additionally packages the pom file by default into the jar, in this case you'd just need to do the opposite. You could very simply create a prototype configuration with the buildhelper plugin, see "Attach additional artifacts to your project" section at http://mojo.codehaus.org/build-helper-maven-plugin/usage.html. I'd designate a custom type, such as .gpm for that xml file though to make it easily identifiable. Kalle > On Fri, Jun 4, 2010 at 2:10 PM, Kalle Korhonen > wrote: >> On Fri, Jun 4, 2010 at 1:28 PM, Les Hazlewood wrote: >>> Is this possible? So, in addition to stuff like , is it >>> possible to add additional metadata? >>> plugins. >> >> Seems like a potential misuse of the pom.xml. The power of the project >> object model is that it's standardized and contains the metadata >> common to all projects (as much as possible). Even if you could do it, >> why would this custom metadata need to sit in the pom file if it's >> specific to a particular environment or technology only? Wouldn't be >> cleaner and simpler to to create a .gpm (Grails Plugin Metadata) with >> its own schema and whip up a plugin that reads it in from a >> pre-defined source location, possibly also adding it both to the zip >> and attaching it as a secondary artifact to the module? If you wanted >> to specify this metadata as part of the pom, you'd probably still want >> to create a custom plugin for it. The configuration section for a >> plugin can carry arbitrary xml data. For example, see jar plugin's >> manifest customization at >> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html. >> You could follow the same approach for your custom plugin. >> >> Kalle >> >> - >> 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 > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Custom metadata in a POM?
Hi Kalle, It definitely doesn't have to sit in the POM file if that's considered bad practice. The key is that the Plugin Portal would need to download something lightweight to discover the metadata and not the actual plugin. There is already a Grails plugin.xml file that they use for this purpose, but it currently is bundled inside the plugin .zip - not ideal. I'm sure that can be re-used. The main goal though was to have that plugin.xml somewhere external to the plugin .zip so the Plugin Portal can 'know' about the plugin and not need to download it directly. I'll bring up your suggestions - I think they're great! Thanks! Les On Fri, Jun 4, 2010 at 2:10 PM, Kalle Korhonen wrote: > On Fri, Jun 4, 2010 at 1:28 PM, Les Hazlewood wrote: >> Is this possible? So, in addition to stuff like , is it >> possible to add additional metadata? >> plugins. > > Seems like a potential misuse of the pom.xml. The power of the project > object model is that it's standardized and contains the metadata > common to all projects (as much as possible). Even if you could do it, > why would this custom metadata need to sit in the pom file if it's > specific to a particular environment or technology only? Wouldn't be > cleaner and simpler to to create a .gpm (Grails Plugin Metadata) with > its own schema and whip up a plugin that reads it in from a > pre-defined source location, possibly also adding it both to the zip > and attaching it as a secondary artifact to the module? If you wanted > to specify this metadata as part of the pom, you'd probably still want > to create a custom plugin for it. The configuration section for a > plugin can carry arbitrary xml data. For example, see jar plugin's > manifest customization at > http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html. > You could follow the same approach for your custom plugin. > > Kalle > > - > 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
Re: Custom metadata in a POM?
On Fri, Jun 4, 2010 at 1:28 PM, Les Hazlewood wrote: > Is this possible? So, in addition to stuff like , is it > possible to add additional metadata? > plugins. A Grails plugin is a .zip file, but the Grails environment > http://www.grails.org/plugin/home) need to read Grails-specific > metadata about that .zip without having to download the .zip first. > I'm proposing that the POM could serve that purpose *if* POMs can hold > additional metadata somehow. Seems like a potential misuse of the pom.xml. The power of the project object model is that it's standardized and contains the metadata common to all projects (as much as possible). Even if you could do it, why would this custom metadata need to sit in the pom file if it's specific to a particular environment or technology only? Wouldn't be cleaner and simpler to to create a .gpm (Grails Plugin Metadata) with its own schema and whip up a plugin that reads it in from a pre-defined source location, possibly also adding it both to the zip and attaching it as a secondary artifact to the module? If you wanted to specify this metadata as part of the pom, you'd probably still want to create a custom plugin for it. The configuration section for a plugin can carry arbitrary xml data. For example, see jar plugin's manifest customization at http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html. You could follow the same approach for your custom plugin. Kalle - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org