You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Yegor Bugayenko (JIRA)" <ji...@codehaus.org> on 2012/07/22 15:16:21 UTC
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Yegor Bugayenko created MCOMPILER-178:
-----------------------------------------
Summary: can't specify -Xlint:-path option without violation of XML well-formness
Key: MCOMPILER-178
URL: https://jira.codehaus.org/browse/MCOMPILER-178
Project: Maven 2.x Compiler Plugin
Issue Type: Bug
Reporter: Yegor Bugayenko
This XML document is not valid:
{noformat}
<compilerArguments>
<Xlint:-path/>
</compilerArguments>
{noformat}
because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Yegor Bugayenko (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304311#comment-304311 ]
Yegor Bugayenko commented on MCOMPILER-178:
-------------------------------------------
see also some discussion here: http://stackoverflow.com/questions/11339056
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304340#comment-304340 ]
Dennis Lundberg commented on MCOMPILER-178:
-------------------------------------------
You can use the other syntax instead, like this:
{code:xml}
<compilerArgument>-Xlint:-path</compilerArgument>
{code}
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy updated MCOMPILER-178:
-----------------------------------
Fix Version/s: 3.1
Assignee: Olivier Lamy
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
> Assignee: Olivier Lamy
> Fix For: 3.1
>
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Yegor Bugayenko (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=312678#comment-312678 ]
Yegor Bugayenko commented on MCOMPILER-178:
-------------------------------------------
Would be convenient to introduce one more option - {{compilerArgumentsLine}} - that can specify any command line text to be passed to javac.
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304346#comment-304346 ]
Dennis Lundberg commented on MCOMPILER-178:
-------------------------------------------
Can you please put together a minimal buildable project that exhibits the problems you describe?
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy closed MCOMPILER-178.
----------------------------------
Resolution: Fixed
fixed http://svn.apache.org/r1444233
Thanks !
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
> Assignee: Olivier Lamy
> Fix For: 3.1
>
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Jan Sievers (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=318901#comment-318901 ]
Jan Sievers commented on MCOMPILER-178:
---------------------------------------
IMHO the existing mojo parameters String compilerArgument and Map compilerArguments can't be modified in a backwards-compatible way to support both multiple arguments and characters not allowed in XML element names.
At the same time there are all kinds of shortcomings with the current map-based approach (":" in arguments being interpreted as XML namespace separators, "+" not allowed in XML element names, fixed -key=value syntax, etc...) and these are real-world problems with compiler arguments of the eclipse JDT compiler[1].
Another recent example which shows that the current approach doesn't scale is the fix for MCOMPILER-135 : special handling had to be introduced for the "-Akey=value" syntax.
I propose to fix this by introducing a new List mojo parameter e.g. "compilerArgs" and deprecate the old Map compilerArguments.
Here is my pull request:
https://github.com/apache/maven-plugins/pull/4
BTW we fixed this for tycho in a similar way [2]
[1] http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_batch_compiler.htm
[2] https://git.eclipse.org/r/#/c/10254/
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313392#comment-313392 ]
Anders Hammar commented on MCOMPILER-178:
-----------------------------------------
Could this be fixed by better documentation?
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Yegor Bugayenko (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=312679#comment-312679 ]
Yegor Bugayenko commented on MCOMPILER-178:
-------------------------------------------
Another option would be to use values of elements of {{compilerArguments}}, if they are not empty. And use names (as it's done now) if values are empty:
{noformat}
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
<Xlint/> <!-- XML element name is used, since value is empty -->
<Werror/>
<arg>Xlint:-path</arg> <!-- XML element value is used, since it's not empty -->
<arg>Xlint:-options</arg>
</compilerArguments>
</configuration>
</plugin>
{noformat}
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Yegor Bugayenko (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304350#comment-304350 ]
Yegor Bugayenko commented on MCOMPILER-178:
-------------------------------------------
This is my configuration:
{noformat}
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
<Xlint/>
<Werror/>
<Xlint:-path/> <!-- invalid XML -->
<Xlint:-options/> <!-- invalid XML -->
</compilerArguments>
</configuration>
</plugin>
{noformat}
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MCOMPILER-178) can't specify -Xlint:-path option without
violation of XML well-formness
Posted by "Yegor Bugayenko (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCOMPILER-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304345#comment-304345 ]
Yegor Bugayenko commented on MCOMPILER-178:
-------------------------------------------
Yes, but only for a single argument
> can't specify -Xlint:-path option without violation of XML well-formness
> ------------------------------------------------------------------------
>
> Key: MCOMPILER-178
> URL: https://jira.codehaus.org/browse/MCOMPILER-178
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Reporter: Yegor Bugayenko
>
> This XML document is not valid:
> {noformat}
> <compilerArguments>
> <Xlint:-path/>
> </compilerArguments>
> {noformat}
> because {{Xlint}} is interpreted as a namespace, which is absent in the document
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira