Skip to content

${os.detected.classifier} cannot be resolved #795

Closed

Description

@Eskibear

From microsoft/vscode-maven#246 by @wensioness


${os.detected.classifier} cannot be resolved
at eclipse https://github.com/trustin/os-maven-plugin maybe available

project address: https://github.com/netty/netty.git

  • OS: [Windows 10]
  • VS Code version: [1.31.0]
  • Extension version [0.14.0]

Screenshots
image
image

Activity

  1. fbricon commented on Feb 13, 2019

    @fbricon
    Collaborator

    as mentioned in https://github.com/trustin/os-maven-plugin#issues-with-eclipse-m2e-or-other-ides, this extension is not loaded by m2e.
    It might be possible to load os-maven-plugin-1.6.1.jar as a java extension of jdt.ls though, but that'd require another vscode extension

  2. DachuanZhao commented on Jul 21, 2021

    @DachuanZhao

    Any progress ?

  3. pseudovector commented on Dec 3, 2021

    @pseudovector

    Got the same issue here

  4. jmhodges commented on Jan 16, 2022

    @jmhodges

    I think this is why some of the folks using protobuf-maven-plugin aren't having the protobuf generated resources added to vscode's understanding of the classpath. (And, so, they have to explicitly add it with builder-helper-maven-plugin.) Folks (like me) use <protocArtifact>com.google.protobuf:protoc:3.19.3:exe:${os.detected.classifier}</protocArtifact> to specify the protoc to use in the build. That causes vscode to bail even though it works correctly with

        <extensions>
          <extension>
            <groupId>kr.motd.maven</groupId>
            <artifactId>os-maven-plugin</artifactId>
            <version>1.7.0</version>
          </extension>
        </extensions>
    

    in the <build>.

    (This is also causing red squiggles in pom.xml, of course)

  5. jmhodges commented on Jan 16, 2022

    @jmhodges

    This seems to be a m2e bug, according to os-maven-plugin's README: https://github.com/trustin/os-maven-plugin#issues-with-eclipse-m2e-or-other-ides

  6. DachuanZhao commented on Jan 17, 2022

    @DachuanZhao

    According to https://stackoverflow.com/a/68660430/6862189 , you should add

    <profiles>
      <profile>
        <id>os-properties</id>
        <properties>
          <os.detected.name>linux</os.detected.name>
          <os.detected.arch>x86_64</os.detected.arch>
          <os.detected.classifier>linux-x86_64</os.detected.classifier>
        </properties>
      </profile>
    </profiles>
    
    <activeProfiles>
      <activeProfile>os-properties</activeProfile>
    </activeProfiles>
    

    to maven setting file .

  7. AkashKumarIT commented on Sep 7, 2025

    @AkashKumarIT

    adding this solved my problem

    <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-tcnative-boringssl-static</artifactId>
                <version>2.0.69.Final</version>
                <classifier>${os.detected.classifier}</classifier>
    </dependency>
    
  8. Nyagar-Abraham commented on Sep 22, 2025

    @Nyagar-Abraham

    I had the same issue trying to congire my webfux project with grpc and the solution was rather simple.
    For IntelliJ IDEA:
    - Click the Maven tab on the right side
    - Click the refresh icon (🔄)
    - The Reload all Maven projects
    That fixed my issue.

  9. fbricon commented on Oct 29, 2025

    @fbricon
    Collaborator

    os-maven-plugin properties have been resolved by default for some time.

    Image

    Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions