I’m honestly unclear on your precise scenario.
1.  If you are expecting a dependency to have a pom with a variable in it, that 
then you would specify before using it, then Maven doesn’t work that way.  (And 
if you think about it, it creates a chicken-egg problem.)
2.  If you are expecting to use a pom property from a dependency, then you 
can’t do that either.  (And if you think about it, that could be dangerous 
because children properties could collide or interfere with your own.)

Note that you can declare a dependency/plugin and override a dependency — 
sometimes that is useful.

I highly recommend  `mvn help:effective-pom` to see exactly what a project’s 
pom results look like; it can be insightful.

You can also use  `mvn help:evaluate` to see the value of expressions.

This is also a good reference:  
https://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-properties.html
 
<https://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-properties.html>

Hope this helps,

Anthony


> On Feb 23, 2021, at 11:32 PM, Delany <delany.middle...@gmail.com> wrote:
> 
> Thanks I know how to use properties, but this plugin doesn't, it seems. It 
> has some special way of importing them:
> https://maven.apache.org/plugins/maven-remote-resources-plugin/process-mojo.html
>  
> <https://maven.apache.org/plugins/maven-remote-resources-plugin/process-mojo.html>
> 
> 
> 
> It can do this
> 
> <resourceBundle>org.test:shared-resources:${project.version}</resourceBundle>
> 
> But this is the version of this project, not the resource bundle 
> org.test:shared-resources. Why would I ever do that? The plugin is assuming 
> that all project modules in the reactor have the same version.
> 
> I need it to do this
> 
> <resourceBundle>org.test:shared-resources:${shared-resources.version}</resourceBundle>
> 
> It looks like if I make commondb a dependency, I can use the projects 
> property to access the version number. How do I do that?
> 
> Thanks,
> Delany
> 
> 
> On Tue, 23 Feb 2021 at 22:46, Anthony Whitford <anth...@whitford.com 
> <mailto:anth...@whitford.com>> wrote:
> The <properties> tag is documented here: 
> https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#properties
>  
> <https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#properties>
>  
> <https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#properties
>  
> <https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#properties>>
> 
> 
> > On Feb 23, 2021, at 3:34 AM, Delany <delany.middle...@gmail.com 
> > <mailto:delany.middle...@gmail.com>> wrote:
> > 
> > I don't want to hardcode the version number of the remote project into this
> > plugin config, so I've used a property made available in a parent pom.
> > But it's not being resolved. What am I doing wrong?
> > 
> >      <plugin>
> >        <artifactId>maven-remote-resources-plugin</artifactId>
> >        <executions>
> >          <execution>
> >            <id>process-remote-resources</id>
> >            <goals>
> >              <goal>process</goal>
> >            </goals>
> >            <configuration>
> >              <resourceBundles>
> > 
> > <resourceBundle>dbs:commondb:${dep.dbs.commondb}</resourceBundle>
> >              </resourceBundles>
> >            </configuration>
> >          </execution>
> >        </executions>
> >      </plugin>
> > 
> > There's a mention of including a <properties> tag that is a map, but Im not
> > sure what that should look like.
> > 
> > https://maven.apache.org/plugins/maven-remote-resources-plugin/usage.html 
> > <https://maven.apache.org/plugins/maven-remote-resources-plugin/usage.html>
> > 
> > Thanks,
> 

Reply via email to