Weird. I think we only ever test true/false existence in jelly and so we may 
not have realised there is a bug in that :)

What about ${dep.getProperties().get('multidoc-jnr')} ?

- Brett

On 9/7/05, Henri Yandell <[EMAIL PROTECTED]> wrote:
> 
> Nope, no luck.
> 
> It's bizarre. If I put the following inside the forEach I get a series
> of trues and falses, but if I try to print the value itself out I get
> an empty string.
> 
> <ant:echo message="DEP: '${dep.getProperty('multidoc.url') != null}'"/>
> <ant:echo message="DEP: '${dep.getProperty('multidoc.url')}'"/>
> 
> Gives:
> 
> maven-javadoc-plugin:report:
> [echo] DEP: 'true'
> [echo] DEP: ''
> [echo] DEP: 'true'
> [echo] DEP: ''
> [echo] DEP: 'false'
> [echo] DEP: ''
> [echo] DEP: 'false'
> [echo] DEP: ''
> [echo] DEP: 'false'
> [echo] DEP: ''
> [echo] DEP: 'false'
> [echo] DEP: ''
> [echo] DEP: 'true'
> [echo] DEP: ''
> [echo] DEP: 'true'
> [echo] DEP: ''
> [echo] DEP: 'true'
> [echo] DEP: ''
> 
> Thus my assumption that I'm missing something.
> 
> On 9/6/05, Brett Porter <[EMAIL PROTECTED]> wrote:
> > Try...
> >
> > <j:forEach var="lib" items="${pom.artifacts}">
> > <j:set var="dep" value="${lib.dependency}"/>
> >
> > Off the top of my head I'm not sure why this particular case it isn't
> > working, but the above is the standard practice.
> >
> > - Brett
> >
> > On 9/7/05, Henri Yandell <[EMAIL PROTECTED]> wrote:
> > >
> > > Having some problems using dependencies/dependency/properties in the
> > > maven.xml file. Obviously I'm missing something basic :) Using maven
> > > 1.0.1.
> > >
> > > In my POM, I have the following custom property set for a dependency:
> > >
> > > <dependency>
> > > <id>oscube</id>
> > > <version>0.2</version>
> > > <url>http://www.osjava.org/oscube/</url>
> > > <properties>
> > > <multidoc.url>http://dist.osjava.org/releases/multidoc-jnr
> </multidoc.url
> > > >
> > > </properties>
> > > </dependency>
> > >
> > > My custom maven.xml file then attempts to get this variable out. The
> > > bad bit being that it doesn't get anything out, just finds an empty
> > > string. The if statement is effectively working correctly, if the
> > > property is not set then it isn't entered etc.
> > >
> > > <?xml version="1.0"?>
> > > <project xmlns:j="jelly:core" xmlns:ant="jelly:ant">
> > >
> > > <preGoal name="maven-javadoc-plugin:report">
> > >
> > > <!-- for-each dependency -->
> > > <j:forEach var="dep" items="${pom.dependencies}">
> > > <j:if test="${dep.getProperty('multidoc.url') != null}">
> > > <j:set var="maven.javadoc.links"
> > > value="${maven.javadoc.links},${dep.getProperty('multidoc.url')}/${
> > > dep.getArtifactId()}/${dep.getVersion()}/"/>
> > > </j:if>
> > > </j:forEach>
> > >
> > > </preGoal>
> > >
> > > </project>
> > >
> > > Anyway, could anyone let me know what I've done wrong?
> > >
> > > Thanks,
> > >
> > > Hen
> > >
> > > ---------------------------------------------------------------------
> > > 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]
> 
>

Reply via email to