Hi,

Seems like your property is interpreted by BASH, which I don't think is what 
you want.

${BLAH} is a BASH variable, mostly equivalent to $BASH. I think what you meant 
is '${BLAH}', i.e. not substituted by BASH, giving Maven a chance to 
substitute. FYI, you wouldn't want "${BLAH}" either (with double quotes BASH 
will still substitute).

${BLAH.BLAH} is an invalid BASH variable, due to the period, hence its balking.

Your ${groupId} probably "works" in the sense that BASH doesn't complain. I 
don't think that it works in the sense that Maven substitutes it for the actual 
groupId. I don't think that it'll get the chance for that, because likely BASH 
already substitutes it for an empty string (assuming it doesn't know a groupId 
variable in your environment; not entirely sure on basis of the limited 
information given).

Hope this helps.



Sander Verhagen
[  [email protected]  ]

NOTICE: my e-mail address has changed. You may still e-mail me at 
[email protected] but you will see me using [email protected] from 
now on. Feel free to update your address book.

> -----Original Message-----
> From: Dan Rollo [mailto:[email protected]]
> Sent: Friday, May 29, 2015 13:32
> To: [email protected]
> Subject: Dependency plugin: tree, CLI substitution error
> 
> I’m using the maven-dependency-plugin to search for SNAPSHOT
> dependencies in a multi-module project. I am filtering out dependencies
> having the same groupId as the maven project. Here’s the command I use:
> 
> mvn dependency:tree -Dincludes=:::*-SNAPSHOT -
> Dexcludes=${project.groupId}
> 
> Unfortunately, this command produces the error below:
> 
> -bash: -Dexcludes=${project.groupId}: bad substitution
> 
> 
> If I use the “old”, non-prefixed property name as shown below, the command
> works fine:
> 
> mvn dependency:tree -Dincludes=:::*-SNAPSHOT -Dexcludes=${groupId}
> 
> 
> Is this a known issue? I would expect the "${project.groupId}” to work (and I
> think this is the “preferred” property syntax, no?)
> 
> The effective pom shows maven-dependency-plugin version 2.8.
> 
> More info:
> mvn -version
> Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-
> 12-14T12:29:23-05:00) Maven home: /Users/bhamail/devtools/apache-
> maven-3.2.5
> Java version: 1.8.0_40, vendor: Oracle Corporation Java home:
> /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x",
> version: "10.10.3", arch: "x86_64", family: “mac"
> 
> Thanks!
> Dan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]

Reply via email to