Maven property is not evaluated as expected (os-maven-plugin)

I have a parent project with modules. One of the modules declares the following in its pom file:

...
<build>
    <extensions>
        <extension>
            <groupId>kr.motd.maven</groupId>
            <artifactId>os-maven-plugin</artifactId>
            <version>1.2.3.Final</version>
        </extension>
    </extensions>
</build>
...
<dependencies>
    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-tcnative</artifactId>
        <version>${netty.tcnative.version}</version>
        <classifier>${os.detected.classifier}</classifier>
    </dependency>
</dependencies>    
...

This project will be successfully created when mvn packagelaunched from the parent project. Then I want to use this submodule project as a dependency in some other gradle project, so I install the parent project in my local maven repo and declare the dependency in the build.gradle file.

When creating a gradle project, I run this error:

Could not resolve all dependencies for configuration ':runtime'.
> Could not find netty-tcnative-${os.detected.classifier}.jar (io.netty:netty-tcnative:1.1.33.Fork2).
    Searched in the following locations: https://repo.grails.org/grails/core/io/netty/netty-tcnative/1.1.33.Fork2/netty-tcnative-1.1.33.Fork2-${os.detected.classifier}.jar

Why ${os.detected.classifier}not evaluated? It should be noted that it ${netty.tcnative.version}is evaluated as a property defined in the parent pom, as it appears in the jar path that is requested after.

Thank.

edit: , , gradle , maven os-maven-plugin, . .

+4

All Articles