[GitHub] [maven-doxia] hboutemy commented on a change in pull request #35: DOXIA-614: support source reference in doxia parser
hboutemy commented on a change in pull request #35: URL: https://github.com/apache/maven-doxia/pull/35#discussion_r447273790 ## File path: doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java ## @@ -49,18 +32,33 @@ import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet; import org.apache.maven.doxia.util.HtmlTools; import org.apache.maven.doxia.util.XmlValidator; - import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.pull.MXParser; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; - import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; +import java.io.BufferedReader; Review comment: is it possible to avoid such reformatting of imports, please? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-doxia] hboutemy commented on a change in pull request #35: DOXIA-614: support source reference in doxia parser
hboutemy commented on a change in pull request #35: URL: https://github.com/apache/maven-doxia/pull/35#discussion_r447273709 ## File path: doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java ## @@ -37,6 +29,13 @@ import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.component.annotations.Requirement; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; +import java.io.StringReader; +import java.util.Properties; + Review comment: is it possible to avoid such reformatting of imports, please? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-doxia] elharo commented on a change in pull request #35: DOXIA-614: support source reference in doxia parser
elharo commented on a change in pull request #35: URL: https://github.com/apache/maven-doxia/pull/35#discussion_r447236450 ## File path: doxia-core/src/main/java/org/apache/maven/doxia/Doxia.java ## @@ -52,6 +52,22 @@ void parse( Reader source, String parserId, Sink sink ) throws ParserNotFoundException, ParseException; +/** + * Parses the given source model using a parser with given id, + * and emits Doxia events into the given sink. + * + * @param source not null reader that provides the source document. + * You could use newReader methods from {@link org.codehaus.plexus.util.ReaderFactory}. + * @param parserId Identifier for the parser to use. Review comment: I assume that's an oversight since it contradicts the language of the doc and only appears in an example This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-doxia] abelsromero commented on pull request #5: [DOXIA-534] Migrate logging to Sl4j
abelsromero commented on pull request #5: URL: https://github.com/apache/maven-doxia/pull/5#issuecomment-651344760 > I'm not in favor of removing doxia-logging: deprecating and modifying it to use slf4j would be more compatible > I know there are not so much Doxia extensions in the wild: there is at least asciidoc I know of. I didn't check, but would be useful to not break this one at least I mantain the asciidoctor extension and I am fine with removing logging-api. In fact we have problems sharing code between the our normal Mojo and the doxia parser because one uses "maven.plugin.logging.Log" and the other "maven.doxia.logging.Log". Moving doxia to Sl4j won't fix it 100%, but will be one step closer. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-doxia] abelsromero commented on a change in pull request #35: DOXIA-614: support source reference in doxia parser
abelsromero commented on a change in pull request #35: URL: https://github.com/apache/maven-doxia/pull/35#discussion_r447224575 ## File path: doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java ## @@ -179,15 +178,32 @@ protected File getBasedir() public void parse( String string, Sink sink ) throws ParseException { -parse( new StringReader( string ), sink ); +this.parse( string, sink, null ); } - + +/** + * {@inheritDoc} + * + * Convenience method to parse an arbitrary string and emit events into the given sink. + * + * @param string A string that provides the source input. + * @param sink A sink that consumes the Doxia events. Review comment: If all the JavaDocs need to be reviewed, these maybe should be addressed in a specific effort with a specific JIRA issue. I just added the information related to the new parameter `reference` following the patterns already pressent in the project. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-doxia] abelsromero commented on a change in pull request #35: DOXIA-614: support source reference in doxia parser
abelsromero commented on a change in pull request #35: URL: https://github.com/apache/maven-doxia/pull/35#discussion_r447224915 ## File path: doxia-core/src/main/java/org/apache/maven/doxia/Doxia.java ## @@ -41,24 +41,35 @@ * Parses the given source model using a parser with given id, * and emits Doxia events into the given sink. * - * @param source not null reader that provides the source document. - * You could use newReader methods from {@link org.codehaus.plexus.util.ReaderFactory}. - * @param parserId Identifier for the parser to use. - * @param sink A sink that consumes the Doxia events. - * @throws org.apache.maven.doxia.parser.manager.ParserNotFoundException - * if no parser could be found for the given id. - * @throws org.apache.maven.doxia.parser.ParseException if the model could not be parsed. + * @param source not null reader that provides the source document + * @param parserId identifier for the parser to use + * @param sink a sink that consumes the Doxia events + * @throws ParserNotFoundException If no parser could be found for the given id + * @throws ParseException If the model could not be parsed */ void parse( Reader source, String parserId, Sink sink ) throws ParserNotFoundException, ParseException; +/** + * Parses the given source model using a parser with given id, + * and emits Doxia events into the given sink. + * + * @param source not null reader that provides the source document + * @param parserId identifier for the parser to use + * @param sink a sink that consumes the Doxia events + * @param reference string containing the reference to the source (e.g. filename) + * @throws ParserNotFoundException If no parser could be found for the given id + * @throws ParseException If the model could not be parsed Review comment: Please refer to my previous question https://github.com/apache/maven-doxia/pull/35#discussion_r446685351 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-doxia] abelsromero commented on a change in pull request #35: DOXIA-614: support source reference in doxia parser
abelsromero commented on a change in pull request #35: URL: https://github.com/apache/maven-doxia/pull/35#discussion_r447219577 ## File path: doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java ## @@ -100,7 +98,7 @@ private boolean validate = false; /** {@inheritDoc} */ -public void parse( Reader source, Sink sink ) +public void parse( Reader source, Sink sink, String reference ) Review comment: Please, refer to the JIRA tp follow on this topic: https://issues.apache.org/jira/browse/DOXIA-614. This is indeed no compatible but, necessary. Moreover it seems this change was already planed. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-doxia] abelsromero commented on a change in pull request #35: DOXIA-614: support source reference in doxia parser
abelsromero commented on a change in pull request #35: URL: https://github.com/apache/maven-doxia/pull/35#discussion_r447219577 ## File path: doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java ## @@ -100,7 +98,7 @@ private boolean validate = false; /** {@inheritDoc} */ -public void parse( Reader source, Sink sink ) +public void parse( Reader source, Sink sink, String reference ) Review comment: Please, refer to the JIRA for the conversation https://issues.apache.org/jira/browse/DOXIA-614 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-doxia] elharo commented on a change in pull request #35: DOXIA-614: support source reference in doxia parser
elharo commented on a change in pull request #35: URL: https://github.com/apache/maven-doxia/pull/35#discussion_r447151457 ## File path: doxia-core/src/main/java/org/apache/maven/doxia/Doxia.java ## @@ -41,24 +41,35 @@ * Parses the given source model using a parser with given id, * and emits Doxia events into the given sink. * - * @param source not null reader that provides the source document. - * You could use newReader methods from {@link org.codehaus.plexus.util.ReaderFactory}. - * @param parserId Identifier for the parser to use. - * @param sink A sink that consumes the Doxia events. - * @throws org.apache.maven.doxia.parser.manager.ParserNotFoundException - * if no parser could be found for the given id. - * @throws org.apache.maven.doxia.parser.ParseException if the model could not be parsed. + * @param source not null reader that provides the source document + * @param parserId identifier for the parser to use + * @param sink a sink that consumes the Doxia events + * @throws ParserNotFoundException If no parser could be found for the given id + * @throws ParseException If the model could not be parsed */ void parse( Reader source, String parserId, Sink sink ) throws ParserNotFoundException, ParseException; +/** + * Parses the given source model using a parser with given id, + * and emits Doxia events into the given sink. + * + * @param source not null reader that provides the source document + * @param parserId identifier for the parser to use + * @param sink a sink that consumes the Doxia events + * @param reference string containing the reference to the source (e.g. filename) + * @throws ParserNotFoundException If no parser could be found for the given id + * @throws ParseException If the model could not be parsed + */ +void parse( Reader source, String parserId, Sink sink, String reference ) +throws ParserNotFoundException, ParseException; + /** * Return a parser for the given parserId. * - * @param parserId Identifier for the parser to use. - * @return the parser defining by parserId. - * @throws org.apache.maven.doxia.parser.manager.ParserNotFoundException - * if no parser could be found for the given id. + * @param parserId identifier for the parser to use + * @return the parser defining by parserId Review comment: defining --> defined or better yet identified ## File path: doxia-core/src/main/java/org/apache/maven/doxia/Doxia.java ## @@ -41,24 +41,35 @@ * Parses the given source model using a parser with given id, * and emits Doxia events into the given sink. * - * @param source not null reader that provides the source document. - * You could use newReader methods from {@link org.codehaus.plexus.util.ReaderFactory}. - * @param parserId Identifier for the parser to use. - * @param sink A sink that consumes the Doxia events. - * @throws org.apache.maven.doxia.parser.manager.ParserNotFoundException - * if no parser could be found for the given id. - * @throws org.apache.maven.doxia.parser.ParseException if the model could not be parsed. + * @param source not null reader that provides the source document + * @param parserId identifier for the parser to use + * @param sink a sink that consumes the Doxia events + * @throws ParserNotFoundException If no parser could be found for the given id + * @throws ParseException If the model could not be parsed */ void parse( Reader source, String parserId, Sink sink ) throws ParserNotFoundException, ParseException; +/** + * Parses the given source model using a parser with given id, + * and emits Doxia events into the given sink. + * + * @param source not null reader that provides the source document + * @param parserId identifier for the parser to use + * @param sink a sink that consumes the Doxia events + * @param reference string containing the reference to the source (e.g. filename) + * @throws ParserNotFoundException If no parser could be found for the given id Review comment: If --> if ## File path: doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java ## @@ -179,15 +178,32 @@ protected File getBasedir() public void parse( String string, Sink sink ) throws ParseException { -parse( new StringReader( string ), sink ); +this.parse( string, sink, null ); } - + +/** + * {@inheritDoc} + * + * Convenience method to parse an arbitrary string and emit events into the given sink. + * + * @param string A string that provides the source input. + * @param sink A sink that consumes the Doxia events. Review comment: A --> a no period ditto below ##
[GitHub] [maven-doxia] abelsromero commented on pull request #35: DOXIA-614: support source reference in doxia parser
abelsromero commented on pull request #35: URL: https://github.com/apache/maven-doxia/pull/35#issuecomment-651269972 Applied the suggestions tried to keep commit history clean. - Squashed test change in Test commit - Added new commit for Doxia's JavaDoc review This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Announcing ApacheCon @Home 2020
Hi, Apache enthusiast! (You’re receiving this because you’re subscribed to one or more dev or user mailing lists for an Apache Software Foundation project.) The ApacheCon Planners and the Apache Software Foundation are pleased to announce that ApacheCon @Home will be held online, September 29th through October 1st, 2020. We’ll be featuring content from dozens of our projects, as well as content about community, how Apache works, business models around Apache software, the legal aspects of open source, and many other topics. Full details about the event, and registration, is available at https://apachecon.com/acah2020 Due to the confusion around how and where this event was going to be held, and in order to open up to presenters from around the world who may previously have been unable or unwilling to travel, we’ve reopened the Call For Presentations until July 13th. Submit your talks today at https://acna2020.jamhosted.net/ We hope to see you at the event! Rich Bowen, VP Conferences, The Apache Software Foundation - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org