Hi Andreas and Philipp,

> Have a look at <http://jira.codehaus.org/browse/PLXUTILS-37>. While it
> is marked as fixed, apparently things like
> ${project.licenses.0.license.name} did not (and still do not; I just
> checked) work. :-(

The following works for me:

    ${project.licenses[0].name}

Alternately, as a workaround (at least for some use cases), you could do:

  <properties>
    <licenseName>GNU General Public License 3</licenseName>
  </properties>
  ...
  <licenses>
    <license>
      <name>${licenseName}</name>
      <url>http://www.gnu.org/licenses/gpl-3.0.en.html</url>
    </license>
  </licenses>

And then reuse the ${licenseName} elsewhere as needed, too.

Regards,
Curtis

On Thu, Feb 19, 2015 at 9:14 AM, Andreas Sewe <
[email protected]> wrote:

> Hello,
>
> > I’m using Maven 3.2 with the pom definition
> >
> > <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="
> http://maven.apache.org/POM/4.0.0";
> >          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> >     <modelVersion>4.0.0</modelVersion>
> >
> >
> > I have added this items to my pom
> >
> > <licenses>
> >     <license>
> >         <name>GNU General Public License 3</name>
> >         <url>http://www.gnu.org/licenses/gpl-3.0.en.html</url>
> >     </license>
> > </licenses>
> >
> > and I would like to reference to the items with
> >
> > ${project.licenses.license.url}
> > ${project.licenses.license.name}
> >
> > but these lines does not work - empty result, so I would like to reread
> the items of my license node, how can I do this?
>
> Have a look at <http://jira.codehaus.org/browse/PLXUTILS-37>. While it
> is marked as fixed, apparently things like
> ${project.licenses.0.license.name} did not (and still do not; I just
> checked) work. :-(
>
> Best wishes,
>
> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to