maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Tran" <dant...@gmail.com>
Subject Re: properties in plugins vs. pom
Date Fri, 13 Oct 2006 02:58:42 GMT
inconsistency i guess, I suggest to always start with ${project....}

-D


On 10/12/06, pjungwir <maven@9stmaryrd.com> wrote:
>
>
> Hello,
>
> I'm developing a plugin in maven 2.0.4. My plugin has a property annotated
> like this:
>
> /**
> * @parameter default-value="${artifactId}.exe"
> */
> private File outfile;
>
> When I use the plugin, outfile is set to
> "/home/pjungwir/src/encc/null.exe."
>
> But suppose I use this javadoc instead:
>
> /**
> * @parameter default-value="${project.artifactId}.exe"
> */
> private File outfile;
>
> Now outfile is set correctly, to "/home/pjungwir/src/encc/encc.exe."
>
> I thought this was strange, because when I use the antrun plugin, both of
> these produce the correct result:
>
> <execution>
> <id>blah</id>
> <phase>generate-sources</phase>
> <goals><goal>run</goal></goals>
> <configuration>
>    <tasks>
>      <echo message="${artifactId}"/>
>      <echo message="${project.artifactId}"/>
>    </tasks>
> </configuration>
> </execution>
>
> When I run this, I see:
>
> [INFO] Executing tasks
>    [echo] encc
>    [echo] encc
>
> So why does ${artifactId} work in the pom, but not in the plugin javadoc?
> Do
> maven variables have different names depending on context?
>
> Thanks,
> Paul
> --
> View this message in context:
> http://www.nabble.com/properties-in-plugins-vs.-pom-tf2434529.html#a6788751
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message