Re: Jelly: ${empty(pom.repository.url)} doesn't work
Alexey Krasnoriadtsev wrote: Yes for my own scripting I won't use dot in the var names. But, maven uses dots extensibly, i.e. pom.foo.foo And here is the line in xdoc-plugin/site.jsl: 195 j:if test=${!empty(pom.repository.url)} that doesn't work, and it always adds a link in the navigation, even though the page doesn't exists. Dots in this context work, because pom.repository.url is not a name of a variable - it is an expression! The original variable is 'pom', then 'repository' property is read from it bean-ways, and then 'url' property is read from the previous result. The other thing is why empty() returns false even if the actual value of the expression is null? I don't know why. I wasn't able to find any reference of the jexl syntax... R. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jelly: ${empty(pom.repository.url)} doesn't work
I've often found it useful to overtest on those kinds of things. test=${!empty(pom.repository.url == 'true' and !pom.repository.url.trim().equals('true')} I discovered that if you set a goal on the command line, as in -Dgoal but forget to give it anything (-Dgoal=something) the variable goal will exist and yet somehow fail the !empty test. the extra trim().equals('true') business seems to work for that. - Original Message - From: Rafal Krzewski [EMAIL PROTECTED] To: Maven Users List [EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 11:54 PM Subject: Re: Jelly: ${empty(pom.repository.url)} doesn't work Alexey Krasnoriadtsev wrote: Yes for my own scripting I won't use dot in the var names. But, maven uses dots extensibly, i.e. pom.foo.foo And here is the line in xdoc-plugin/site.jsl: 195 j:if test=${!empty(pom.repository.url)} that doesn't work, and it always adds a link in the navigation, even though the page doesn't exists. Dots in this context work, because pom.repository.url is not a name of a variable - it is an expression! The original variable is 'pom', then 'repository' property is read from it bean-ways, and then 'url' property is read from the previous result. The other thing is why empty() returns false even if the actual value of the expression is null? I don't know why. I wasn't able to find any reference of the jexl syntax... R. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jelly: ${empty(pom.repository.url)} doesn't work
Rafal Krzewski wrote: The other thing is why empty() returns false even if the actual value of the expression is null? I don't know why. I wasn't able to find any reference of the jexl syntax... OK, I've found the ultimate jexl syntax reference, at least for those who can read JavaCC grammars: http://cvs.apache.org/viewcvs/jakarta-commons/jexl/src/java/org/apache/commons/jexl/parser/Parser.jjt?rev=HEAD For the details how things get evaluated, see the AST*.java files in the parser package, the actual logic is in the execute() / value() methods. Hope that helps a bit... R. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Jelly: ${empty(pom.repository.url)} doesn't work
Sorry for incomplete info: here is the complete path: maven-xdoc-plugin-XXX/plugin-resources/site.jsl line :195. to test, in project.xml you can omit repository completely, or create a nested empty tag url / Thank you. -Original Message- From: matt [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 4:31 PM To: Maven Users List Subject: Re: Jelly: ${empty(pom.repository.url)} doesn't work It's in plugin-resources/navigation.jelly. I haven't checked the behaviour myself, though, so I can't warrant the rest. [EMAIL PROTECTED] wrote: That's not in my xdoc/plugin.jelly... -- dIon Gillard, Multitask Consulting Blog: http://blogs.codehaus.org/people/dion/ Alexey Krasnoriadtsev [EMAIL PROTECTED] wrote on 02/10/2003 01:37:58 AM: Yes for my own scripting I won't use dot in the var names. But, maven uses dots extensibly, i.e. pom.foo.foo And here is the line in xdoc-plugin/site.jsl: 195 j:if test=${!empty(pom.repository.url)} that doesn't work, and it always adds a link in the navigation, even though the page doesn't exists. Thank you. -Original Message- From: Norbert Pabis [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 12:15 AM To: Maven Users List Subject: Re: Jelly: ${empty(pom.repository.url)} doesn't work It was already mentioned on Maven-User-List. Jelly interprets dots. Try using underscores in your variables names. http://www.mail-archive.com/[EMAIL PROTECTED]/msg02729.html Alexey Krasnoriadtsev wrote: Jelly does not resolve complex variable names (with dots in the var name) when executing methods, i.e empty() or length() I have created a Issue in Jira, but there is no activity on that. http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-848 -- Norbert Pabi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jelly: ${empty(pom.repository.url)} doesn't work
I wish I understaood javacc :-( -- dIon Gillard, Multitask Consulting Blog: http://blogs.codehaus.org/people/dion/ Rafal Krzewski [EMAIL PROTECTED] wrote on 02/10/2003 10:38:01 PM: Rafal Krzewski wrote: The other thing is why empty() returns false even if the actual value of the expression is null? I don't know why. I wasn't able to find any reference of the jexl syntax... OK, I've found the ultimate jexl syntax reference, at least for those who can read JavaCC grammars: http://cvs.apache.org/viewcvs/jakarta- commons/jexl/src/java/org/apache/commons/jexl/parser/Parser.jjt?rev=HEAD For the details how things get evaluated, see the AST*.java files in the parser package, the actual logic is in the execute() / value() methods. Hope that helps a bit... R. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jelly: ${empty(pom.repository.url)} doesn't work
khote [EMAIL PROTECTED] wrote on 02/10/2003 07:49:13 PM: I've often found it useful to overtest on those kinds of things. test=${!empty(pom.repository.url == 'true' and !pom.repository.url.trim().equals('true')} I discovered that if you set a goal on the command line, as in -Dgoal but forget to give it anything (-Dgoal=something) the variable goal will exist and yet somehow fail the !empty test. the extra trim().equals('true') business seems to work for that. That's because of line 442 of org.apache.maven.cli.App.java, where it checks for an '=' in the -D args, and if one's not found, sets the variable to true. -- dIon Gillard, Multitask Consulting Blog: http://blogs.codehaus.org/people/dion/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jelly: ${empty(pom.repository.url)} doesn't work
It was already mentioned on Maven-User-List. Jelly interprets dots. Try using underscores in your variables names. http://www.mail-archive.com/[EMAIL PROTECTED]/msg02729.html Alexey Krasnoriadtsev wrote: Jelly does not resolve complex variable names (with dots in the var name) when executing methods, i.e empty() or length() I have created a Issue in Jira, but there is no activity on that. http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-848 -- Norbert Pabi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Jelly: ${empty(pom.repository.url)} doesn't work
Yes for my own scripting I won't use dot in the var names. But, maven uses dots extensibly, i.e. pom.foo.foo And here is the line in xdoc-plugin/site.jsl: 195 j:if test=${!empty(pom.repository.url)} that doesn't work, and it always adds a link in the navigation, even though the page doesn't exists. Thank you. -Original Message- From: Norbert Pabis [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 12:15 AM To: Maven Users List Subject: Re: Jelly: ${empty(pom.repository.url)} doesn't work It was already mentioned on Maven-User-List. Jelly interprets dots. Try using underscores in your variables names. http://www.mail-archive.com/[EMAIL PROTECTED]/msg02729.html Alexey Krasnoriadtsev wrote: Jelly does not resolve complex variable names (with dots in the var name) when executing methods, i.e empty() or length() I have created a Issue in Jira, but there is no activity on that. http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-848 -- Norbert Pabi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jelly: ${empty(pom.repository.url)} doesn't work
Alexey Krasnoriadtsev wrote: Yes for my own scripting I won't use dot in the var names. But, maven uses dots extensibly, i.e. pom.foo.foo And here is the line in xdoc-plugin/site.jsl: 195 j:if test=${!empty(pom.repository.url)} that doesn't work, and it always adds a link in the navigation, even though the page doesn't exists. You're right. I doesn't work. I dunno why. -- Norbert Pabi Nobody expects the Debian Inquisition! Our two weapons are fear and surprise... and ruthless efficiency! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Jelly: ${empty(pom.repository.url)} doesn't work
That's not in my xdoc/plugin.jelly... -- dIon Gillard, Multitask Consulting Blog: http://blogs.codehaus.org/people/dion/ Alexey Krasnoriadtsev [EMAIL PROTECTED] wrote on 02/10/2003 01:37:58 AM: Yes for my own scripting I won't use dot in the var names. But, maven uses dots extensibly, i.e. pom.foo.foo And here is the line in xdoc-plugin/site.jsl: 195 j:if test=${!empty(pom.repository.url)} that doesn't work, and it always adds a link in the navigation, even though the page doesn't exists. Thank you. -Original Message- From: Norbert Pabis [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 12:15 AM To: Maven Users List Subject: Re: Jelly: ${empty(pom.repository.url)} doesn't work It was already mentioned on Maven-User-List. Jelly interprets dots. Try using underscores in your variables names. http://www.mail-archive.com/[EMAIL PROTECTED]/msg02729.html Alexey Krasnoriadtsev wrote: Jelly does not resolve complex variable names (with dots in the var name) when executing methods, i.e empty() or length() I have created a Issue in Jira, but there is no activity on that. http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-848 -- Norbert Pabi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jelly: ${empty(pom.repository.url)} doesn't work
It's in plugin-resources/navigation.jelly. I haven't checked the behaviour myself, though, so I can't warrant the rest. [EMAIL PROTECTED] wrote: That's not in my xdoc/plugin.jelly... -- dIon Gillard, Multitask Consulting Blog: http://blogs.codehaus.org/people/dion/ Alexey Krasnoriadtsev [EMAIL PROTECTED] wrote on 02/10/2003 01:37:58 AM: Yes for my own scripting I won't use dot in the var names. But, maven uses dots extensibly, i.e. pom.foo.foo And here is the line in xdoc-plugin/site.jsl: 195 j:if test=${!empty(pom.repository.url)} that doesn't work, and it always adds a link in the navigation, even though the page doesn't exists. Thank you. -Original Message- From: Norbert Pabis [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 12:15 AM To: Maven Users List Subject: Re: Jelly: ${empty(pom.repository.url)} doesn't work It was already mentioned on Maven-User-List. Jelly interprets dots. Try using underscores in your variables names. http://www.mail-archive.com/[EMAIL PROTECTED]/msg02729.html Alexey Krasnoriadtsev wrote: Jelly does not resolve complex variable names (with dots in the var name) when executing methods, i.e empty() or length() I have created a Issue in Jira, but there is no activity on that. http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-848 -- Norbert Pabi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jelly: ${empty(pom.repository.url)} doesn't work
Ok, will test it by removing the elements and running site for one of my projects. Fixed. -- dIon Gillard, Multitask Consulting Blog: http://blogs.codehaus.org/people/dion/ matt [EMAIL PROTECTED] wrote on 02/10/2003 09:31:21 AM: It's in plugin-resources/navigation.jelly. I haven't checked the behaviour myself, though, so I can't warrant the rest. [EMAIL PROTECTED] wrote: That's not in my xdoc/plugin.jelly... -- dIon Gillard, Multitask Consulting Blog: http://blogs.codehaus.org/people/dion/ Alexey Krasnoriadtsev [EMAIL PROTECTED] wrote on 02/10/2003 01:37:58 AM: Yes for my own scripting I won't use dot in the var names. But, maven uses dots extensibly, i.e. pom.foo.foo And here is the line in xdoc-plugin/site.jsl: 195 j:if test=${!empty(pom.repository.url)} that doesn't work, and it always adds a link in the navigation, even though the page doesn't exists. Thank you. -Original Message- From: Norbert Pabis [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 12:15 AM To: Maven Users List Subject: Re: Jelly: ${empty(pom.repository.url)} doesn't work It was already mentioned on Maven-User-List. Jelly interprets dots. Try using underscores in your variables names. http://www.mail-archive.com/[EMAIL PROTECTED]/msg02729.html Alexey Krasnoriadtsev wrote: Jelly does not resolve complex variable names (with dots in the var name) when executing methods, i.e empty() or length() I have created a Issue in Jira, but there is no activity on that. http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-848 -- Norbert Pabi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jelly: ${empty(pom.repository.url)} doesn't work
Jelly does not resolve complex variable names (with dots in the var name) when executing methods, i.e empty() or length() I have created a Issue in Jira, but there is no activity on that. http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-848 Here is the example: [EMAIL PROTECTED]:test]$ cat maven.xml ?xml version=1.0 encoding=ISO-8859-1? project default=mytest xmlns:j=jelly:core xmlns:u=jelly:util xmlns:maven=jelly:maven xmlns:ant=jelly:ant xmlns:i=jelly:interaction goal name=mytest echopom.repository.url: ${pom.repository.url}/echo j:set var=pom.repository.url value= / echoafter setting to empty string ${pom.repository.url}/echo echois empty? ${empty(pom.repository.url)} /echo echolength ${pom.repository.url.length()} /echo echo / j:set var=pom.custom.name value=test here / echopom.cutom.namE: ${pom.custom.name}/echo echois empty? :${empty(pom.custom.name)} /echo echolength ${pom.custom.name.length()} /echo echo / j:set var=customname value=test / echocutomname: ${customname}/echo echois empty? :${empty(customname)} /echo echolength ${customname.length()} /echo echo / j:set var=customname value= / echocutomname: ${customname}/echo echois empty? :${empty(customname)} /echo echolength ${customname.length()} /echo /goal /project [EMAIL PROTECTED]:test]$ maven -X __ __ | \/ |__ _Apache__ ___ | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ |_| |_\__,_|\_/\___|_||_| v. 1.0-beta-10 [DEBUG] Adding reference: maven.dependency.classpath - /export/tools/maven-1.0-beta-10/repository/ant/jars/ant-1.5.3-1.jar:/exp ort/tools/maven-1.0-beta-10/repository/oracle/jars/classes12-9.2.0.3-1.2 .zip [DEBUG] Adding reference: maven-classpath - mytest: [echo] pom.repository.url: [echo] after setting to empty string [echo] is empty? false [echo] length [echo] [echo] pom.cutom.namE: test here [echo] is empty? :false [echo] length [echo] [echo] cutomname: test [echo] is empty? :false [echo] length 4 [echo] [echo] cutomname: [echo] is empty? :true [echo] length 0 BUILD SUCCESSFUL Total time: 7 seconds - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]