Re: [VOTE] Release Maven Release plugin version 2.2.1
+1 from me bringing us to 3 binding votes On 28 July 2011 15:56, Stephen Connolly stephen.alan.conno...@gmail.com wrote: Hi, This is a patch release to fix a particularly nasty regression: http://jira.codehaus.org/browse/MRELEASE-697 We solved 3 issues: http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11144styleName=Htmlversion=17502 Staging repo: https://repository.apache.org/content/repositories/maven-009/ Source distribution: https://repository.apache.org/content/repositories/maven-009/org/apache/maven/release/maven-release/2.2.1/maven-release-2.2.1-source-release.zip SCM tag: http://svn.apache.org/repos/asf/maven/release/tags/maven-release-2.2.1 Staging site: http://maven.apache.org/plugins/maven-release-plugin-2.2.1/ http://maven.apache.org/maven-release/staging/ Guide to testing staged releases: http://maven.apache.org/guides/development/guide-testing-releases.html Guide to previewing site content ahead of the sync: http://www.apache.org/dev/project-site.html (and search on the page for HTTP proxy) Vote open for 72 hours. [ ] +1 [ ] +0 [ ] -1 Thanks, -Stephen - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[RESULT] [VOTE] Release Maven Release plugin version 2.2.1
Hi, The vote has passed with the following result: +1 (binding): Stephen Connolly, John Casey, Mark Struberg +1 (non-binding): Lukas Theussl, Mark Derricutt, Baptiste Mathus I will promote the artifacts to the central repo. -Stephen On 28 July 2011 15:56, Stephen Connolly stephen.alan.conno...@gmail.com wrote: Hi, This is a patch release to fix a particularly nasty regression: http://jira.codehaus.org/browse/MRELEASE-697 We solved 3 issues: http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11144styleName=Htmlversion=17502 Staging repo: https://repository.apache.org/content/repositories/maven-009/ Source distribution: https://repository.apache.org/content/repositories/maven-009/org/apache/maven/release/maven-release/2.2.1/maven-release-2.2.1-source-release.zip SCM tag: http://svn.apache.org/repos/asf/maven/release/tags/maven-release-2.2.1 Staging site: http://maven.apache.org/plugins/maven-release-plugin-2.2.1/ http://maven.apache.org/maven-release/staging/ Guide to testing staged releases: http://maven.apache.org/guides/development/guide-testing-releases.html Guide to previewing site content ahead of the sync: http://www.apache.org/dev/project-site.html (and search on the page for HTTP proxy) Vote open for 72 hours. [ ] +1 [ ] +0 [ ] -1 Thanks, -Stephen - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
PlexusContainer#lookupList(role) returns only one component
Hello Everybody, I just noticed that PlexusContainer#lookupList(role) will only return a list with one component even there are two components available for the role. After playing around I figured out that the method returns a list with both components when I use different hints in my component descriptors. Is there a way to gather all components of a specific role regardless of their hints (and even if the hints are equal)? I'd like to use that to realize some kind of whiteboard pattern. Regards, Bernd - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: PlexusContainer#lookupList(role) returns only one component
In plexus role+hint forms a composite key. In your case, you had a component conflict, and Plexus stashed one component over another (it's undefined which wins, but probably depends on classpath ordering or so). If you want Plexus to manage them as two distinct components, you have to make them have two distinct keys, hence role+hint must differ on them. BTW, which plexus are you using? The classic (oldie) or the SISU-plexus-shim? Thanks, ~t~ On Tue, Aug 2, 2011 at 11:38 AM, bernd.v...@bosch-si.com wrote: Hello Everybody, I just noticed that PlexusContainer#lookupList(role) will only return a list with one component even there are two components available for the role. After playing around I figured out that the method returns a list with both components when I use different hints in my component descriptors. Is there a way to gather all components of a specific role regardless of their hints (and even if the hints are equal)? I'd like to use that to realize some kind of whiteboard pattern. Regards, Bernd - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
AW: PlexusContainer#lookupList(role) returns only one component
I'm using the SISU-plexus-shim (sisu-inject-plexus-2.1.1). In plexus role+hint forms a composite key. In your case, you had a component conflict, and Plexus stashed one component over another (it's undefined which wins, but probably depends on classpath ordering or so). Sure, I expected this behavior for the simple lookup methods which only returns one component but not for the lookupList methods... I hoped I could use this to get all registered components (as I'm used to from other IoCs). Is it possible to use guice directly in a SISU-plexus-shim environment? Thanks, Bernd
Re: PlexusContainer#lookupList(role) returns only one component
Inline. On Tue, Aug 2, 2011 at 12:05 PM, bernd.v...@bosch-si.com wrote: In plexus role+hint forms a composite key. In your case, you had a component conflict, and Plexus stashed one component over another (it's undefined which wins, but probably depends on classpath ordering or so). Sure, I expected this behavior for the simple lookup methods which only returns one component but not for the lookupList methods... I hoped I could use this to get all registered components (as I'm used to from other IoCs). The plexus component registry is keyed like this, so I _think_ you cannot do this with Plexus. Is it possible to use guice directly in a SISU-plexus-shim environment? Yes, you can still use Module and other nifty things More about SISU here: http://sisu.sonatype.org/index.html Thanks, ~t~ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: PlexusContainer#lookupList(role) returns only one component
It might be possible, but I would not suggest this as it's an implementation detail. It might be a safe route to use JSR-330 only, but its still not guaranteed. LieGrue, strub --- On Tue, 8/2/11, Tamás Cservenák ta...@cservenak.net wrote: From: Tamás Cservenák ta...@cservenak.net Subject: Re: PlexusContainer#lookupList(role) returns only one component To: Maven Developers List dev@maven.apache.org Date: Tuesday, August 2, 2011, 10:52 AM Inline. On Tue, Aug 2, 2011 at 12:05 PM, bernd.v...@bosch-si.com wrote: In plexus role+hint forms a composite key. In your case, you had a component conflict, and Plexus stashed one component over another (it's undefined which wins, but probably depends on classpath ordering or so). Sure, I expected this behavior for the simple lookup methods which only returns one component but not for the lookupList methods... I hoped I could use this to get all registered components (as I'm used to from other IoCs). The plexus component registry is keyed like this, so I _think_ you cannot do this with Plexus. Is it possible to use guice directly in a SISU-plexus-shim environment? Yes, you can still use Module and other nifty things More about SISU here: http://sisu.sonatype.org/index.html Thanks, ~t~ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: More POM5 writing
On 07/31/2011 05:12 PM, Benson Margulies wrote: https://cwiki.apache.org/confluence/display/MAVEN/Moving+forward+with+the+POM+data+model It would [...] be a bad idea to try to use namespaces as a versioning technique. - if you want to allow Schema validation of the entire POM, I think you have to do this. Otherwise you cannot add new (optional) elements - lest older versions of Maven or plugins be confused by them - or remove obsolete elements - lest older POMs suddenly fail to validate. Code building a model from a range of versioned namespaces could choose to have a single model for all of them, if the differences are minor and easily dealt with in small if-then blocks, or could define new models for major revisions; this is awkward but probably no worse than handling undeclared changes to an existing schema. Anyway having to type modelVersion4.0.0/modelVersion is no better than xmlns=http://maven.apache.org/POM/4.0.0;, I think. At least the latter means that a Schema-aware XML editor/IDE can assist you. What _is_ bad in Maven currently (at least as of 3.0.3) is that whereas modelVersion is required, you are permitted to write the POM with no namespace declaration at all. This means that any code inspecting or modifying a POM has to have a (rarely used) code branch to deal with no-namespace elements, which is cumbersome. Worse, Maven seems to have a different idea of what valid content is than the schema says. For example, the schema says xs:element name=modelVersion minOccurs=0 ... but Maven will report 'modelVersion' is missing. as a fatal error. Certainly there will be some semantic constraints that XML Schema cannot capture - e.g. groupId can be omitted from project if parent specifies it - but these ought to be minimized. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[ANN] Maven Release Plugin 2.2.1 Released
The Maven team is pleased to announce the release of the Maven Release Plugin, version 2.2.1. This plugin is used to release a project with Maven, saving a lot of repetitive, manual work. Releasing a project is made in two steps: prepare and perform. http://maven.apache.org/plugins/maven-release-plugin/ You should specify the version in your project's plugin configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-release-plugin/artifactId version2.2.1/version /plugin Release Notes - Maven 2.x Release Plugin - Version 2.2.1 ** Bug * [MRELEASE-697] - version 2.2 includes SNAPSHOT in default tag name ** Improvement * [MRELEASE-239] - release:perform and release:prepare should accept multi-line goals/preparationGoals configurations * [MRELEASE-499] - Add to FAQ: prepare fails because of inheriting parent scm Enjoy, -The Maven Team - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
AW: PlexusContainer#lookupList(role) returns only one component
It might be a safe route to use JSR-330 only, but it's still not guaranteed. Currently, I'm trying to figure out how I can use (and possibly mix up) sisu-plexus with plain JSR-330 components.. any hints? The thing is, that the IoC container of the environment I'm running in is sisu-plexus and I'd like to hook my JSR-330 components into this container and also re-use sisu-plexus components from my components. As far as I understand, this should be possible... but until now I'm not familiar with JSR-330 and the way components are loaded there... I am grateful for any hint :-) - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: More POM5 writing
On Aug 2, 2011, at 8:00 AM, Jesse Glick wrote: Worse, Maven seems to have a different idea of what valid content is than the schema says. For example, the schema says xs:element name=modelVersion minOccurs=0 ... but Maven will report 'modelVersion' is missing. as a fatal error. Certainly there will be some semantic constraints that XML Schema cannot capture - e.g. groupId can be omitted from project if parent specifies it - but these ought to be minimized. The schema is being generated from the Modello model so if you see things that are incorrect then you probably need to fix them in the Modello XSD plugin[1] [1]: https://github.com/sonatype/modello/tree/master/modello-plugins/modello-plugin-xsd - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - First, the taking in of scattered particulars under one Idea, so that everyone understands what is being talked about ... Second, the separation of the Idea into parts, by dividing it at the joints, as nature directs, not breaking any limb in half as a bad carver might. -- Plato, Phaedrus (Notes on the Synthesis of Form by C. Alexander)
Re: Upgrading maven-checkstyle-plugin checkstyle version support
Stephen, That won't work, because checkstyle changed its groupId from checkstyle to com.puppycrawl.tools since 5.2, so afaik we're stuck until m-checkstyle-p 2.7 is released (unless you can exclude top level dependencies from a plugin, but I wouldn't know how). Olivier Lamy mentioned in another thread on the user list that he might start working on this beginning of this month, so... fingers crossed ! Cheers, -g On 29 July 2011 09:10, Stephen Connolly stephen.alan.conno...@gmail.com wrote: You could just try with checkstyle 5.3. there is the ability to override the dependencies of a plugin project build plugins plugin artifactIdmaven-checkstyle-plugin/artifactId dependencies ... insert the newer version of checkstyle (not the plugin) here /dependencies /plugin /plugins /build /project If the only change is a version bumb, then you can achieve that by overriding with a bumped version in your pom... No new release needed unless the newer version has changed its API -Stephen On 28 July 2011 15:57, Chris Whelan chrismichaelwhe...@gmail.com wrote: Hi all, I'm looking to use the maven-checkstyle-plugin with checkstyle 5.3, but it only supports 5.0 as of the 2.6 release of the plugin. Looking at trunk it seems to already have been upgraded to 5.3 but there haven't been commits for a couple of months. I'm using a few rules which are not available on 5.0 so can't currently make use of this plug-in. I have a few queries: 1. What are the plans for releasing v2.7 of the plugin? Is there any more work outstanding for checkstyle 5.3/5.4 support? I'd be happy to help with any remaining tasks to get this pushed out the door as it would be a useful upgrade for me. 2. I've done a quick diff of the 1.6 tag against trunk and looking at the changes, the only change related to the checkstyle 5.3 upgrade seems to be bumping the version number of the dependency in the plugin's pom file. Is this all that's needed to make the new plugins from checkstyle 5.3 executable via the plugin? 3. Given that new checkstyle releases pop up every now and again and are likely to include new plug-ins but not necessarily break the API used by maven-checkstyle-plugin, is there another mechanism that could be used to make the upgrade easier? I'm thinking something like a plugin configuration setting checkstyle.version which could be used to specify the checkstyle dependency used by the plug-in. That way it would be possible to use the plugin with future minor releases of checkstyle without having to do a new release of the plug-in itself? I might be oversimplifying things, I'm not sure if additional configuration or glue code is needed to make the new checkstyle rules available through the plug-in when upgrading to 5.3 and beyond. Obviously this would break if checkstyle changed their API but the benefits could well be worth it and the value could easily be defaulted. I'd be happy to work on this and submit a patch if someone can give me an initial pointer to let me know if they think it would be possible. Cheers, Chris - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: AW: PlexusContainer#lookupList(role) returns only one component
The problem is imo that JSR-330 (as opposed to JSR-299 which is a superset) only specifies the basic syntax (not even the mechanism) for the 'injection' part. But it does specify nothing about how the things going to be injected should be created/provided, etc. The safest route would indeed still be the plexus way. LieGrue, strub --- On Tue, 8/2/11, bernd.v...@bosch-si.com bernd.v...@bosch-si.com wrote: From: bernd.v...@bosch-si.com bernd.v...@bosch-si.com Subject: AW: PlexusContainer#lookupList(role) returns only one component To: dev@maven.apache.org Date: Tuesday, August 2, 2011, 12:33 PM It might be a safe route to use JSR-330 only, but it's still not guaranteed. Currently, I'm trying to figure out how I can use (and possibly mix up) sisu-plexus with plain JSR-330 components.. any hints? The thing is, that the IoC container of the environment I'm running in is sisu-plexus and I'd like to hook my JSR-330 components into this container and also re-use sisu-plexus components from my components. As far as I understand, this should be possible... but until now I'm not familiar with JSR-330 and the way components are loaded there... I am grateful for any hint :-) - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: More POM5 writing
Just wondering about the sonatype github URL. Isn't modello still a codehaus project? LieGrue, strub --- On Tue, 8/2/11, Jason van Zyl ja...@sonatype.com wrote: From: Jason van Zyl ja...@sonatype.com Subject: Re: More POM5 writing To: Maven Developers List dev@maven.apache.org Date: Tuesday, August 2, 2011, 12:39 PM On Aug 2, 2011, at 8:00 AM, Jesse Glick wrote: Worse, Maven seems to have a different idea of what valid content is than the schema says. For example, the schema says xs:element name=modelVersion minOccurs=0 ... but Maven will report 'modelVersion' is missing. as a fatal error. Certainly there will be some semantic constraints that XML Schema cannot capture - e.g. groupId can be omitted from project if parent specifies it - but these ought to be minimized. The schema is being generated from the Modello model so if you see things that are incorrect then you probably need to fix them in the Modello XSD plugin[1] [1]: https://github.com/sonatype/modello/tree/master/modello-plugins/modello-plugin-xsd - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - First, the taking in of scattered particulars under one Idea, so that everyone understands what is being talked about ... Second, the separation of the Idea into parts, by dividing it at the joints, as nature directs, not breaking any limb in half as a bad carver might. -- Plato, Phaedrus (Notes on the Synthesis of Form by C. Alexander) - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: More POM5 writing
Jesse, I don't agree with your analysis. My view is as follows: 1) POM5 should have strategically located xs:any and xs:anyAttribute elements that give tools fair warning of future extensions. I wish POM4 had them, but such is life. As things are, the community seems in general to be comfortable with a small risk of breaking some fragile tools by making small changes to POM4. 2) Adding explicit elements next to xs:any is a far more user-friendly extensibility mechanism than creating a hodgepodge of namespaces and prefixes. 3) I understand the theoretical advantage in correctness of changing the schema URI for each new version, but I question the practical utility. I can't think of a use case in which it actually helps anything. --benson On Tue, Aug 2, 2011 at 8:00 AM, Jesse Glick jesse.gl...@oracle.com wrote: On 07/31/2011 05:12 PM, Benson Margulies wrote: https://cwiki.apache.org/confluence/display/MAVEN/Moving+forward+with+the+POM+data+model It would [...] be a bad idea to try to use namespaces as a versioning technique. - if you want to allow Schema validation of the entire POM, I think you have to do this. Otherwise you cannot add new (optional) elements - lest older versions of Maven or plugins be confused by them - or remove obsolete elements - lest older POMs suddenly fail to validate. Code building a model from a range of versioned namespaces could choose to have a single model for all of them, if the differences are minor and easily dealt with in small if-then blocks, or could define new models for major revisions; this is awkward but probably no worse than handling undeclared changes to an existing schema. Anyway having to type modelVersion4.0.0/modelVersion is no better than xmlns=http://maven.apache.org/POM/4.0.0;, I think. At least the latter means that a Schema-aware XML editor/IDE can assist you. What _is_ bad in Maven currently (at least as of 3.0.3) is that whereas modelVersion is required, you are permitted to write the POM with no namespace declaration at all. This means that any code inspecting or modifying a POM has to have a (rarely used) code branch to deal with no-namespace elements, which is cumbersome. Worse, Maven seems to have a different idea of what valid content is than the schema says. For example, the schema says xs:element name=modelVersion minOccurs=0 ... but Maven will report 'modelVersion' is missing. as a fatal error. Certainly there will be some semantic constraints that XML Schema cannot capture - e.g. groupId can be omitted from project if parent specifies it - but these ought to be minimized. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: AW: PlexusContainer#lookupList(role) returns only one component
On 2 Aug 2011, at 13:33, bernd.v...@bosch-si.com wrote: It might be a safe route to use JSR-330 only, but it's still not guaranteed. Currently, I'm trying to figure out how I can use (and possibly mix up) sisu-plexus with plain JSR-330 components.. any hints? The thing is, that the IoC container of the environment I'm running in is sisu-plexus and I'd like to hook my JSR-330 components into this container If this is not specific to Maven then perhaps it's better to continue the discussion over at sisu-...@sonatype.org since the container in Maven currently runs in strict Plexus mode. This is so plugin developers don't accidentally depend on new container features (JSR330 or otherwise) before the community has had a chance to properly discuss them. BTW, which environment are you running in? and also re-use sisu-plexus components from my components. As far as I understand, this should be possible... but until now I'm not familiar with JSR-330 and the way components are loaded there... I am grateful for any hint :-) - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: More POM5 writing
No Jason moved it some months ago with plexus(*) to sonatype github account I think that codehaus SCM is closed (RO) for these projects. Arnaud On Tue, Aug 2, 2011 at 2:50 PM, Mark Struberg strub...@yahoo.de wrote: Just wondering about the sonatype github URL. Isn't modello still a codehaus project? LieGrue, strub --- On Tue, 8/2/11, Jason van Zyl ja...@sonatype.com wrote: From: Jason van Zyl ja...@sonatype.com Subject: Re: More POM5 writing To: Maven Developers List dev@maven.apache.org Date: Tuesday, August 2, 2011, 12:39 PM On Aug 2, 2011, at 8:00 AM, Jesse Glick wrote: Worse, Maven seems to have a different idea of what valid content is than the schema says. For example, the schema says xs:element name=modelVersion minOccurs=0 ... but Maven will report 'modelVersion' is missing. as a fatal error. Certainly there will be some semantic constraints that XML Schema cannot capture - e.g. groupId can be omitted from project if parent specifies it - but these ought to be minimized. The schema is being generated from the Modello model so if you see things that are incorrect then you probably need to fix them in the Modello XSD plugin[1] [1]: https://github.com/sonatype/modello/tree/master/modello-plugins/modello-plugin-xsd - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - First, the taking in of scattered particulars under one Idea, so that everyone understands what is being talked about ... Second, the separation of the Idea into parts, by dividing it at the joints, as nature directs, not breaking any limb in half as a bad carver might. -- Plato, Phaedrus (Notes on the Synthesis of Form by C. Alexander) - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: More POM5 writing
that's bad news. Why not pull them back? codehaus has a nice git hosting service too... I don't like to get another area of troubles... LieGrue, strub --- On Tue, 8/2/11, Arnaud Héritier aherit...@gmail.com wrote: From: Arnaud Héritier aherit...@gmail.com Subject: Re: More POM5 writing To: Maven Developers List dev@maven.apache.org Date: Tuesday, August 2, 2011, 1:32 PM No Jason moved it some months ago with plexus(*) to sonatype github account I think that codehaus SCM is closed (RO) for these projects. Arnaud On Tue, Aug 2, 2011 at 2:50 PM, Mark Struberg strub...@yahoo.de wrote: Just wondering about the sonatype github URL. Isn't modello still a codehaus project? LieGrue, strub --- On Tue, 8/2/11, Jason van Zyl ja...@sonatype.com wrote: From: Jason van Zyl ja...@sonatype.com Subject: Re: More POM5 writing To: Maven Developers List dev@maven.apache.org Date: Tuesday, August 2, 2011, 12:39 PM On Aug 2, 2011, at 8:00 AM, Jesse Glick wrote: Worse, Maven seems to have a different idea of what valid content is than the schema says. For example, the schema says xs:element name=modelVersion minOccurs=0 ... but Maven will report 'modelVersion' is missing. as a fatal error. Certainly there will be some semantic constraints that XML Schema cannot capture - e.g. groupId can be omitted from project if parent specifies it - but these ought to be minimized. The schema is being generated from the Modello model so if you see things that are incorrect then you probably need to fix them in the Modello XSD plugin[1] [1]: https://github.com/sonatype/modello/tree/master/modello-plugins/modello-plugin-xsd - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - First, the taking in of scattered particulars under one Idea, so that everyone understands what is being talked about ... Second, the separation of the Idea into parts, by dividing it at the joints, as nature directs, not breaking any limb in half as a bad carver might. -- Plato, Phaedrus (Notes on the Synthesis of Form by C. Alexander) - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
AW: PlexusContainer#lookupList(role) returns only one component
BTW, which environment are you running in? Maven 3.0.3 :-) Currently, I'm developing a Maven Core extension (see apache-maven-3.0.3/lib/ext/README.txt) that extends Maven with an extensible generator framework that is intended to generate Maven poms and other artifacts for non-Maven projects before Maven reads the project files and starts the actual build. We want to use that to derive and generate Eclipse feature and update-site projects from our plugins and tests as well as the pom files for Maven-Tycho. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: More POM5 writing
I let you see that with Jason but I think he had some motivations he explained few months ago. (Yes without modello, plexus, aether, sisu, Apache Maven is an empty shell but it is like this for years as many of these projects were hosted previously on codehaus and now are on Github or Eclipse ...) Arnaud On Tue, Aug 2, 2011 at 3:36 PM, Mark Struberg strub...@yahoo.de wrote: that's bad news. Why not pull them back? codehaus has a nice git hosting service too... I don't like to get another area of troubles... LieGrue, strub --- On Tue, 8/2/11, Arnaud Héritier aherit...@gmail.com wrote: From: Arnaud Héritier aherit...@gmail.com Subject: Re: More POM5 writing To: Maven Developers List dev@maven.apache.org Date: Tuesday, August 2, 2011, 1:32 PM No Jason moved it some months ago with plexus(*) to sonatype github account I think that codehaus SCM is closed (RO) for these projects. Arnaud On Tue, Aug 2, 2011 at 2:50 PM, Mark Struberg strub...@yahoo.de wrote: Just wondering about the sonatype github URL. Isn't modello still a codehaus project? LieGrue, strub --- On Tue, 8/2/11, Jason van Zyl ja...@sonatype.com wrote: From: Jason van Zyl ja...@sonatype.com Subject: Re: More POM5 writing To: Maven Developers List dev@maven.apache.org Date: Tuesday, August 2, 2011, 12:39 PM On Aug 2, 2011, at 8:00 AM, Jesse Glick wrote: Worse, Maven seems to have a different idea of what valid content is than the schema says. For example, the schema says xs:element name=modelVersion minOccurs=0 ... but Maven will report 'modelVersion' is missing. as a fatal error. Certainly there will be some semantic constraints that XML Schema cannot capture - e.g. groupId can be omitted from project if parent specifies it - but these ought to be minimized. The schema is being generated from the Modello model so if you see things that are incorrect then you probably need to fix them in the Modello XSD plugin[1] [1]: https://github.com/sonatype/modello/tree/master/modello-plugins/modello-plugin-xsd - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - First, the taking in of scattered particulars under one Idea, so that everyone understands what is being talked about ... Second, the separation of the Idea into parts, by dividing it at the joints, as nature directs, not breaking any limb in half as a bad carver might. -- Plato, Phaedrus (Notes on the Synthesis of Form by C. Alexander) - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
surefire-api not relocating the classes of commons-lang though it's in m-shade-p config
Hi, I was recently looking at surefire-api-2.9.jar for my work. According to the pom, it uses m-shade-p to shade two artifacts org.codehaus.plexus:plexus-utils and commons-lang:commons-lang with their relocations clearly specified. But I don't see the shaded classes for commons-lang in the generated jar. Plexus-utils is shaded to org.apache.maven.surefire.shade.org.codehaus.plexus.util correctly though. commons-lang is not a dependency of surefire as I see. Is it an obsolete code in the pom or is it the behavior expected for surefire-api? Please clarify. mvn log for the shade:shade execution is at [1]. There isn't any word about commons-lang either! I'm using the official build maven-2.2.1 [1] http://paste.pocoo.org/show/451244/ Thanks, --Kasun -- ~~~***'***~~~ Kasun Gajasinghe, University of Moratuwa, Sri Lanka. Blog: http://blog.kasunbg.org Twitter: http://twitter.com/kasunbg - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: surefire-api not relocating the classes of commons-lang though it's in m-shade-p config
It's not used and obsolete as of now. This may change in the future. Kristian Den 2. aug. 2011 kl. 16:16 skrev Kasun Gajasinghe kasu...@gmail.com: Hi, I was recently looking at surefire-api-2.9.jar for my work. According to the pom, it uses m-shade-p to shade two artifacts org.codehaus.plexus:plexus-utils and commons-lang:commons-lang with their relocations clearly specified. But I don't see the shaded classes for commons-lang in the generated jar. Plexus-utils is shaded to org.apache.maven.surefire.shade.org.codehaus.plexus.util correctly though. commons-lang is not a dependency of surefire as I see. Is it an obsolete code in the pom or is it the behavior expected for surefire-api? Please clarify. mvn log for the shade:shade execution is at [1]. There isn't any word about commons-lang either! I'm using the official build maven-2.2.1 [1] http://paste.pocoo.org/show/451244/ Thanks, --Kasun -- ~~~***'***~~~ Kasun Gajasinghe, University of Moratuwa, Sri Lanka. Blog: http://blog.kasunbg.org Twitter: http://twitter.com/kasunbg - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: surefire-api not relocating the classes of commons-lang though it's in m-shade-p config
On Tue, Aug 2, 2011 at 7:52 PM, Kristian Rosenvold kristian.rosenv...@gmail.com wrote: It's not used and obsolete as of now. This may change in the future. Ok, thanks... --Kasun Kristian Den 2. aug. 2011 kl. 16:16 skrev Kasun Gajasinghe kasu...@gmail.com: Hi, I was recently looking at surefire-api-2.9.jar for my work. According to the pom, it uses m-shade-p to shade two artifacts org.codehaus.plexus:plexus-utils and commons-lang:commons-lang with their relocations clearly specified. But I don't see the shaded classes for commons-lang in the generated jar. Plexus-utils is shaded to org.apache.maven.surefire.shade.org.codehaus.plexus.util correctly though. commons-lang is not a dependency of surefire as I see. Is it an obsolete code in the pom or is it the behavior expected for surefire-api? Please clarify. mvn log for the shade:shade execution is at [1]. There isn't any word about commons-lang either! I'm using the official build maven-2.2.1 [1] http://paste.pocoo.org/show/451244/ Thanks, --Kasun -- ~~~***'***~~~ Kasun Gajasinghe, University of Moratuwa, Sri Lanka. Blog: http://blog.kasunbg.org Twitter: http://twitter.com/kasunbg - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org -- ~~~***'***~~~ Kasun Gajasinghe, University of Moratuwa, Sri Lanka. Blog: http://blog.kasunbg.org Twitter: http://twitter.com/kasunbg - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Maven 2/3 and Cobetura plugin with both TestNG and JUnit tests (with Surefire plugin configuration)
On Mon, Aug 1, 2011 at 9:56 AM, Larry Shatzer, Jr. lar...@gmail.com wrote: I want to run with both JUnit and TestNG. By removing JUnit (and the tests that JUnit run), it ran just fine, as do the inverse, just JUnit and no TestNG. It is the combination of both of them. To help, instead of having gists, I created a github project: https://github.com/larrys/CoverageBug which you can fetch and run locally and see exactly what I'm talking about and be able to possibly tweak or debug any issues that I lack the knowledge to do. I removed cobertura out of the picture and ran emma instead, and produced similar results. --- T E S T S --- Running com.company.JUnitTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Running com.company.TestNGTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 If I just run the test lifecycle, it will execute the tests. Somehow a plugin that calls the test lifecycle in Maven 3 when both TestNG and JUnit are configured to run have issues. I also tried the latest surefire plugin snapshot build (built locally), and it has no effect. So I started going through various versions of Surefire. 2.7.1, 2.7, 2.6, 2.5, 2.4.3, 2.4.2, and 2.4.1 had similar output as below (ran test phase 3 times, but still did not execute tests!): --- T E S T S --- Running com.company.JUnitTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Running com.company.TestNGTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-surefire-plugin:2.7.1:test (test-junit) @ coveragebug --- [INFO] Surefire report directory: C:\development\coverage-bug\coveragebug\target\surefire-reports --- T E S T S --- Running com.company.JUnitTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Running com.company.TestNGTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-surefire-plugin:2.7.1:test (test-testng) @ coveragebug --- [INFO] Surefire report directory: C:\development\coverage-bug\coveragebug\target\surefire-reports --- T E S T S --- Running com.company.JUnitTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Running com.company.TestNGTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 When I get to 2.3.1: --- T E S T S --- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-surefire-plugin:2.3.1:test (test-junit) @ coveragebug --- [INFO] Surefire report directory: C:\development\coverage-bug\coveragebug\target\surefire-reports --- T E S T S --- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-surefire-plugin:2.3.1:test (test-testng) @ coveragebug --- [INFO] Surefire report directory: C:\development\coverage-bug\coveragebug\target\surefire-reports --- T E S T S --- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 It does it three times, but does not actually show the test classes it is supposed to try to be running. 2.3 has issues with TestNG: --- T E S T S --- org.apache.maven.surefire.booter.SurefireExecutionException: org.testng.xml.XmlSuite.setParallel(Z)V; nested exception is java .lang.NoSuchMethodError: org.testng.xml.XmlSuite.setParallel(Z)V java.lang.NoSuchMethodError: org.testng.xml.XmlSuite.setParallel(Z)V at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:123) at org.apache.maven.surefire.Surefire.run(Surefire.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Re: AW: PlexusContainer#lookupList(role) returns only one component
I recently used lookupMap API [1] to detect which wagon providers was available in m-site-p 3.0 It worked like a charm Regards, Hervé [1] http://plexus.codehaus.org/plexus-containers/plexus-container- default/apidocs/org/codehaus/plexus/PlexusContainer.html#lookupMap(java.lang.Class) Le mardi 2 août 2011, bernd.v...@bosch-si.com a écrit : I'm using the SISU-plexus-shim (sisu-inject-plexus-2.1.1). In plexus role+hint forms a composite key. In your case, you had a component conflict, and Plexus stashed one component over another (it's undefined which wins, but probably depends on classpath ordering or so). Sure, I expected this behavior for the simple lookup methods which only returns one component but not for the lookupList methods... I hoped I could use this to get all registered components (as I'm used to from other IoCs). Is it possible to use guice directly in a SISU-plexus-shim environment? Thanks, Bernd - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Maven 2/3 and Cobetura plugin with both TestNG and JUnit tests (with Surefire plugin configuration)
One last update. If I remove the execution sections that tell Surefire to run both TestNG and Junit, and put dependencies on the Surefire Plugin like so: dependencies dependency groupIdorg.apache.maven.surefire/groupId artifactIdsurefire-junit4/artifactId version${surefire.version}/version /dependency dependency groupIdorg.apache.maven.surefire/groupId artifactIdsurefire-testng/artifactId version${surefire.version}/version /dependency /dependencies I get the results I expect. --- T E S T S --- Running com.company.JUnitTest JUnit Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.037 sec Flushing results... Flushing results done Cobertura: Loaded information on 1 classes. Cobertura: Saved information on 1 classes. Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 --- T E S T S --- Running TestSuite TestNG Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.311 sec Flushing results... Flushing results done Cobertura: Loaded information on 1 classes. Cobertura: Saved information on 1 classes. Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
RE: Maven 2/3 and Cobetura plugin with both TestNG and JUnit tests (with Surefire plugin configuration)
org.testng.xml.XmlSuite.setParallel(Z)Vparameter is string and returns void go here http://testng.org/doc/download.html and get the 6.1.1 testng /* Note this method in XMLSuite */ /** * Sets the parallel mode * @param parallel the parallel mode */ public void setParallel(String parallel) { m_parallel = parallel; } /* usable pom.xml */ ?xml version=1.0 encoding=UTF-8? !-- The MIT License Copyright (c) 2009 codehaus.org. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- 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 groupIdorg.testng/groupId artifactIdtestng/artifactId version6.1.1/version packagingjar/packaging dependencies dependency groupIdcom.google.inject/groupId artifactIdguice/artifactId version2.0/version /dependency dependency groupIdbsh/groupId artifactIdbsh/artifactId version1.3.0/version /dependency dependency groupIdorg.apache.tools/groupId artifactIdant/artifactId version1.8.0/version /dependency dependency groupIdcom.beust/groupId artifactIdjcommander/artifactId version1.5/version /dependency dependency groupIdorg.yaml/groupId artifactIdsnakeyaml/artifactId version1.4/version /dependency dependency groupIdjunit.framework/groupId artifactIdjunit/artifactId version4.7/version /dependency /dependencies /project make this mod to Suite3 public class Suite3 //{ extends junit.framework.TestCase { /*MCG */ include MIT License so we dont upset benson Martin -- __ Put longwinded disclaimer here Date: Tue, 2 Aug 2011 10:57:16 -0600 Subject: Re: Maven 2/3 and Cobetura plugin with both TestNG and JUnit tests (with Surefire plugin configuration) From: lar...@gmail.com To: dev@maven.apache.org On Mon, Aug 1, 2011 at 9:56 AM, Larry Shatzer, Jr. lar...@gmail.com wrote: I want to run with both JUnit and TestNG. By removing JUnit (and the tests that JUnit run), it ran just fine, as do the inverse, just JUnit and no TestNG. It is the combination of both of them. To help, instead of having gists, I created a github project: https://github.com/larrys/CoverageBug which you can fetch and run locally and see exactly what I'm talking about and be able to possibly tweak or debug any issues that I lack the knowledge to do. I removed cobertura out of the picture and ran emma instead, and produced similar results. --- T E S T S --- Running com.company.JUnitTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Running com.company.TestNGTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 If I just run the test lifecycle, it will execute the tests. Somehow a plugin that calls the test lifecycle in Maven 3 when both TestNG and JUnit are configured to run have issues. I also tried the latest surefire plugin snapshot build (built locally), and it has no effect. So I started going through various versions of Surefire. 2.7.1, 2.7, 2.6, 2.5, 2.4.3, 2.4.2, and 2.4.1 had similar output as below (ran test phase 3 times, but still did not execute tests!): --- T E S T S --- Running com.company.JUnitTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Running com.company.TestNGTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec There are no tests to run. Results : Tests run: 0,
Re: [VOTE] Release Maven Site Plugin version 3.0 and Maven Reporting Exec version 1.0.1
+1 from me On 2011-07-30 17:03, Dennis Lundberg wrote: Hi, We solved 46+1 issues: http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11146styleName=Htmlversion=16829 http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11761styleName=Htmlversion=17501 There are still a couple of issues left in JIRA: http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=truepid=11146status=1 Staging repos: https://repository.apache.org/content/repositories/maven-015/ https://repository.apache.org/content/repositories/maven-016/ Staging sites: http://maven.apache.org/plugins/maven-site-plugin-3.0/ http://maven.apache.org/shared/maven-reporting-exec-1.0.1/ Guide to testing staged releases: http://maven.apache.org/guides/development/guide-testing-releases.html Vote open for 72 hours. [ ] +1 [ ] +0 [ ] -1 -- Dennis Lundberg - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[RESULT] [VOTE] Release Maven Site Plugin version 3.0 and Maven Reporting Exec version 1.0.1
Hi, The vote has passed with the following result : +1 (binding): Hervé Boutemy, Mark Struberg, Olivier Lamy, Vincent Siveton, Dennis Lundberg +1 (non binding): Lukas Theussl +0 (non binding): Benson Margulies I will promote the artifacts to the central repo. On 2011-07-30 17:03, Dennis Lundberg wrote: Hi, We solved 46+1 issues: http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11146styleName=Htmlversion=16829 http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11761styleName=Htmlversion=17501 There are still a couple of issues left in JIRA: http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=truepid=11146status=1 Staging repos: https://repository.apache.org/content/repositories/maven-015/ https://repository.apache.org/content/repositories/maven-016/ Staging sites: http://maven.apache.org/plugins/maven-site-plugin-3.0/ http://maven.apache.org/shared/maven-reporting-exec-1.0.1/ Guide to testing staged releases: http://maven.apache.org/guides/development/guide-testing-releases.html Vote open for 72 hours. [ ] +1 [ ] +0 [ ] -1 -- Dennis Lundberg - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
POM reader that preserves CDATA?
Hi all, I'm working on some tooling for $dayjob that needs to manipulate POM files according to certain rules. The problem I'm running into is that some of the POMs it much manipulate contain CDATA sections, comments, etc. Also, since the modified POM often will be used as the basis for a patch file, I'd like to preserve as much of the ordering and existing whitespace in the file as possible, to minimize the patchfile size. I'm currently using the JDom-driven, Modello-generated writer, coupled with the stock XPP3-driven reader (not the best, I know). It's losing the CDATA (big problem) and injecting ^M (wrong line ending, little problem)... Does anyone have experience with this? Anyone maybe have an advanced POM reader/writer stashed somewhere that can preserve CDATA and the like? Thanks, -john -- John Casey Developer, PMC Chair - Apache Maven (http://maven.apache.org) Blog: http://www.johnofalltrades.name/ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: POM reader that preserves CDATA?
In general, you really can't expect to retain CDATA unless you build a DOM tree, and maybe not then. It's a fundamental principle of XML that CDATA isn't part of 'the infoset' -- the data that is represented by the file. A parser is under no obligation to faithfully report this stuff, so long as the right text ends up in the right place. However, forget xpp3 and all that ancient lumber. Use Woodstox, or the Xerces DOM, and you can probably find enough options to ask it to do what you need. On Tue, Aug 2, 2011 at 6:00 PM, John Casey jdca...@commonjava.org wrote: Hi all, I'm working on some tooling for $dayjob that needs to manipulate POM files according to certain rules. The problem I'm running into is that some of the POMs it much manipulate contain CDATA sections, comments, etc. Also, since the modified POM often will be used as the basis for a patch file, I'd like to preserve as much of the ordering and existing whitespace in the file as possible, to minimize the patchfile size. I'm currently using the JDom-driven, Modello-generated writer, coupled with the stock XPP3-driven reader (not the best, I know). It's losing the CDATA (big problem) and injecting ^M (wrong line ending, little problem)... Does anyone have experience with this? Anyone maybe have an advanced POM reader/writer stashed somewhere that can preserve CDATA and the like? Thanks, -john -- John Casey Developer, PMC Chair - Apache Maven (http://maven.apache.org) Blog: http://www.johnofalltrades.name/ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: POM reader that preserves CDATA?
On 8/2/11 6:10 PM, Benson Margulies wrote: In general, you really can't expect to retain CDATA unless you build a DOM tree, and maybe not then. It's a fundamental principle of XML that CDATA isn't part of 'the infoset' -- the data that is represented by the file. A parser is under no obligation to faithfully report this stuff, so long as the right text ends up in the right place. However, forget xpp3 and all that ancient lumber. Use Woodstox, or the Xerces DOM, and you can probably find enough options to ask it to do what you need. yeah, that's basically what I was afraid I'd be left with...in other words, no quick and easy solution, but basically a reinvention of the model reader with a lot of extras. On Tue, Aug 2, 2011 at 6:00 PM, John Caseyjdca...@commonjava.org wrote: Hi all, I'm working on some tooling for $dayjob that needs to manipulate POM files according to certain rules. The problem I'm running into is that some of the POMs it much manipulate contain CDATA sections, comments, etc. Also, since the modified POM often will be used as the basis for a patch file, I'd like to preserve as much of the ordering and existing whitespace in the file as possible, to minimize the patchfile size. I'm currently using the JDom-driven, Modello-generated writer, coupled with the stock XPP3-driven reader (not the best, I know). It's losing the CDATA (big problem) and injecting ^M (wrong line ending, little problem)... Does anyone have experience with this? Anyone maybe have an advanced POM reader/writer stashed somewhere that can preserve CDATA and the like? Thanks, -john -- John Casey Developer, PMC Chair - Apache Maven (http://maven.apache.org) Blog: http://www.johnofalltrades.name/ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org -- John Casey Developer, PMC Chair - Apache Maven (http://maven.apache.org) Blog: http://www.johnofalltrades.name/ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: POM reader that preserves CDATA?
Don't we need this for the maven-release-manager anyway once we start adding arbitrary stuff? LieGrue, strub --- On Tue, 8/2/11, John Casey jdca...@commonjava.org wrote: From: John Casey jdca...@commonjava.org Subject: Re: POM reader that preserves CDATA? To: Maven Developers List dev@maven.apache.org Date: Tuesday, August 2, 2011, 10:22 PM On 8/2/11 6:10 PM, Benson Margulies wrote: In general, you really can't expect to retain CDATA unless you build a DOM tree, and maybe not then. It's a fundamental principle of XML that CDATA isn't part of 'the infoset' -- the data that is represented by the file. A parser is under no obligation to faithfully report this stuff, so long as the right text ends up in the right place. However, forget xpp3 and all that ancient lumber. Use Woodstox, or the Xerces DOM, and you can probably find enough options to ask it to do what you need. yeah, that's basically what I was afraid I'd be left with...in other words, no quick and easy solution, but basically a reinvention of the model reader with a lot of extras. On Tue, Aug 2, 2011 at 6:00 PM, John Caseyjdca...@commonjava.org wrote: Hi all, I'm working on some tooling for $dayjob that needs to manipulate POM files according to certain rules. The problem I'm running into is that some of the POMs it much manipulate contain CDATA sections, comments, etc. Also, since the modified POM often will be used as the basis for a patch file, I'd like to preserve as much of the ordering and existing whitespace in the file as possible, to minimize the patchfile size. I'm currently using the JDom-driven, Modello-generated writer, coupled with the stock XPP3-driven reader (not the best, I know). It's losing the CDATA (big problem) and injecting ^M (wrong line ending, little problem)... Does anyone have experience with this? Anyone maybe have an advanced POM reader/writer stashed somewhere that can preserve CDATA and the like? Thanks, -john -- John Casey Developer, PMC Chair - Apache Maven (http://maven.apache.org) Blog: http://www.johnofalltrades.name/ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org -- John Casey Developer, PMC Chair - Apache Maven (http://maven.apache.org) Blog: http://www.johnofalltrades.name/ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: POM reader that preserves CDATA?
versions-maven-plugin tackles this head-on. one of these days i'll get some time to finish xevpp.codehaus.org - Stephen --- Sent from my Android phone, so random spelling mistakes, random nonsense words and other nonsense are a direct result of using swype to type on the screen On 2 Aug 2011 23:00, John Casey jdca...@commonjava.org wrote: Hi all, I'm working on some tooling for $dayjob that needs to manipulate POM files according to certain rules. The problem I'm running into is that some of the POMs it much manipulate contain CDATA sections, comments, etc. Also, since the modified POM often will be used as the basis for a patch file, I'd like to preserve as much of the ordering and existing whitespace in the file as possible, to minimize the patchfile size. I'm currently using the JDom-driven, Modello-generated writer, coupled with the stock XPP3-driven reader (not the best, I know). It's losing the CDATA (big problem) and injecting ^M (wrong line ending, little problem)... Does anyone have experience with this? Anyone maybe have an advanced POM reader/writer stashed somewhere that can preserve CDATA and the like? Thanks, -john -- John Casey Developer, PMC Chair - Apache Maven (http://maven.apache.org) Blog: http://www.johnofalltrades.name/ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: More POM5 writing
On 08/02/2011 08:52 AM, Benson Margulies wrote: Adding explicit elements next to xs:any is a far more user-friendly extensibility mechanism than creating a hodgepodge of namespaces and prefixes. Agreed. But if ease of hand editing trumps validation and other tool support, do you really want to use namespaces at all? - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: More POM5 writing
On 08/02/2011 08:39 AM, Jason van Zyl wrote: The schema is being generated from the Modello model so if you see things that are incorrect... For the record, XsdGenerator.java explains: // Usually, would only do this if the field is not required, but due to inheritance, it may be // present, even if not here, so we need to let it slide - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: POM reader that preserves CDATA?
On 08/02/2011 06:00 PM, John Casey wrote: Anyone maybe have an advanced POM reader/writer stashed somewhere that can preserve CDATA and the like? http://code.google.com/p/decentxml/source/browse/trunk/src/test/java/de/pdark/decentxml/MavenSNR.java is said to. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: POM reader that preserves CDATA?
We use decentxml in some tycho tools for bumping versions and it works well. On Aug 2, 2011, at 7:49 PM, Jesse Glick wrote: On 08/02/2011 06:00 PM, John Casey wrote: Anyone maybe have an advanced POM reader/writer stashed somewhere that can preserve CDATA and the like? http://code.google.com/p/decentxml/source/browse/trunk/src/test/java/de/pdark/decentxml/MavenSNR.java is said to. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl - A party which is not afraid of letting culture, business, and welfare go to ruin completely can be omnipotent for a while. -- Jakob Burckhardt
Re: POM reader that preserves CDATA?
You could TRY feeding the pom schema into JAXB to generate JAXB objects from it. From there, using a JAXBContext, you can call context.createBinder and then use that to unmarshall the XML DOM into JAXB objects. You can then manipulate the JAXB objects and then have it update the XML after word using the Binder. Supposedly, the binder allows semi-preserving of the infoset while using the JAXB objects. That said, I've never tried it, particularly with CDATA. :-) Dan On Tuesday, August 02, 2011 6:00:25 PM John Casey wrote: Hi all, I'm working on some tooling for $dayjob that needs to manipulate POM files according to certain rules. The problem I'm running into is that some of the POMs it much manipulate contain CDATA sections, comments, etc. Also, since the modified POM often will be used as the basis for a patch file, I'd like to preserve as much of the ordering and existing whitespace in the file as possible, to minimize the patchfile size. I'm currently using the JDom-driven, Modello-generated writer, coupled with the stock XPP3-driven reader (not the best, I know). It's losing the CDATA (big problem) and injecting ^M (wrong line ending, little problem)... Does anyone have experience with this? Anyone maybe have an advanced POM reader/writer stashed somewhere that can preserve CDATA and the like? Thanks, -john -- Daniel Kulp dk...@apache.org http://dankulp.com/blog Talend - http://www.talend.com - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: POM reader that preserves CDATA?
Just to confirm what Jason said. The code in question is [1] and from our testing, decentxml provides perfect read-write roundtrip without loosing any formatting anywhere in the document, including cdata, comments, whitespaces, etc, and with no special effort on our part. [1] https://github.com/sonatype/sonatype-tycho/tree/master/tycho-release/tycho-versions-plugin/src/main/java/org/eclipse/tycho/versions/pom -- Regards, Igor On 11-08-03 3:59 AM, Jason van Zyl wrote: We use decentxml in some tycho tools for bumping versions and it works well. On Aug 2, 2011, at 7:49 PM, Jesse Glick wrote: On 08/02/2011 06:00 PM, John Casey wrote: Anyone maybe have an advanced POM reader/writer stashed somewhere that can preserve CDATA and the like? http://code.google.com/p/decentxml/source/browse/trunk/src/test/java/de/pdark/decentxml/MavenSNR.java is said to. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org