Re: ant task equivalent to -D<property>=<value>?
Oliver Burn <[email protected]> Thu, 6 Sep 2012 21:47:19 +1000
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <CAHZftdWCgc23mOwq=KFTN6pDUkq3H-Tjvh0oJ=BXeKoTsSH7YQ@mail.gmail.com> |
--===============0220874900635322949== Content-Type: multipart/alternative; boundary=f46d042e0089bbcd5004c9070d04 --f46d042e0089bbcd5004c9070d04 Content-Type: text/plain; charset=ISO-8859-1 Look at http://checkstyle.hg.sourceforge.net/hgweb/checkstyle/checkstyle/file/e67b3c4c6345/ant-phase-verify.xmlfor an example of how to do it with ant. See lines 27 to 30. On Fri, Aug 31, 2012 at 3:34 AM, mvad <[email protected]> wrote: > I am attempting to pass a system property to one of my custom modules. > This > works as expected when running checkstyle from the command with the usage > provided on this page: > http://checkstyle.sourceforge.net/cmdline.html > specifically using the java argument "-Dmyvariable=mystring" > > > However, I have been unable to find an ant task equivalent to passing in > these system properties: > > > Things that I have tried (none of which worked): > > 1) adding "-Dmyvariable=mystring" as an argument to the ant call > > 2) http://checkstyle.sourceforge.net/anttask.html > Unless I am misunderstanding, the URL above suggests that adding > <property key="myvariable" value="mystring"/> under <cs:checkstyle> > should have the same effect? > > 3) <sysproperty>? Though none of the checkstyle xml elements recognize it, > so I am unsure where it could be added. > > > Any help is appreciated, > Michael > > > > -- > View this message in context: > http://checkstyle.2069334.n4.nabble.com/ant-task-equivalent-to-D-property-value-tp4654115.html > Sent from the CheckStyle - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Checkstyle-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/checkstyle-user > --f46d042e0089bbcd5004c9070d04 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Look at <a href=3D"http://checkstyle.hg.sourceforge.net/hgweb/checkstyle/ch= eckstyle/file/e67b3c4c6345/ant-phase-verify.xml">http://checkstyle.hg.sourc= eforge.net/hgweb/checkstyle/checkstyle/file/e67b3c4c6345/ant-phase-verify.x= ml</a> for an example of how to do it with ant. See lines 27 to 30.<br> <br><div class=3D"gmail_quote">On Fri, Aug 31, 2012 at 3:34 AM, mvad <span = dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">m= [email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_quo= te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"= > I am attempting to pass a system property to one of my custom modules. =A0T= his<br> works as expected when running checkstyle from the command with the usage<b= r> provided on this page:<br> <a href=3D"http://checkstyle.sourceforge.net/cmdline.html" target=3D"_blank= ">http://checkstyle.sourceforge.net/cmdline.html</a><br> specifically using the java argument "-Dmyvariable=3Dmystring"<br= > <br> <br> However, I have been unable to find an ant task equivalent to passing in<br= > these system properties:<br> <br> <br> Things that I have tried (none of which worked):<br> <br> 1) adding "-Dmyvariable=3Dmystring" as an argument to the ant cal= l<br> <br> 2) <a href=3D"http://checkstyle.sourceforge.net/anttask.html" target=3D"_bl= ank">http://checkstyle.sourceforge.net/anttask.html</a><br> Unless I am misunderstanding, the URL above suggests that adding<br> <property key=3D"myvariable" value=3D"mystring"/>= under <cs:checkstyle><br> should have the same effect?<br> <br> 3) <sysproperty>? =A0Though none of the checkstyle xml elements recog= nize it,<br> so I am unsure where it could be added.<br> <br> <br> Any help is appreciated,<br> Michael<br> <br> <br> <br> --<br> View this message in context: <a href=3D"http://checkstyle.2069334.n4.nabbl= e.com/ant-task-equivalent-to-D-property-value-tp4654115.html" target=3D"_bl= ank">http://checkstyle.2069334.n4.nabble.com/ant-task-equivalent-to-D-prope= rty-value-tp4654115.html</a><br> Sent from the CheckStyle - User mailing list archive at Nabble.com.<br> <br> ---------------------------------------------------------------------------= ---<br> Live Security Virtual Conference<br> Exclusive live event will cover all the ways today's security and<br> threat landscape has changed and how IT managers can respond. Discussions<b= r> will include endpoint security, mobile security and the latest in malware<b= r> threats. <a href=3D"http://www.accelacomm.com/jaw/sfrnl04242012/114/5012226= 3/" target=3D"_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122= 263/</a><br> _______________________________________________<br> Checkstyle-user mailing list<br> <a href=3D"mailto:[email protected]">Checkstyle-user@li= sts.sourceforge.net</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/checkstyle-user" ta= rget=3D"_blank">https://lists.sourceforge.net/lists/listinfo/checkstyle-use= r</a><br> </blockquote></div><br> --f46d042e0089bbcd5004c9070d04-- --===============0220874900635322949== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ --===============0220874900635322949== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user --===============0220874900635322949==--