Skip to content
This repository was archived by the owner on Aug 4, 2026. It is now read-only.
This repository was archived by the owner on Aug 4, 2026. It is now read-only.

How to manage native dep Question #23

Description

@fbalicchia

Tring to use a dependency that has platform-dependent dep resolver throw an NPE exception.
Excluding dependency that has classifier or adding the os-maven-plugin extension seems
that not resolve the problem.

This sounds like a bug but I'd like to know you could suggest a wa

to reproduce the problem please use testResolvePom and change the target pom to

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven</artifactId>
        <version>3.0.4</version>
    </parent>

    <artifactId>maven-core</artifactId>

    <name>Maven Core</name>
    <description>Maven Core classes.</description>

    <dependencies>
        <!--  Maven -->

        <dependency>
            <groupId>org.apache.arrow</groupId>
            <artifactId>flight-core</artifactId>
            <version>7.0.0</version>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-metadata</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.modello</groupId>
                <artifactId>modello-maven-plugin</artifactId>
                <configuration>
                    <version>1.0.0</version>
                    <models>
                        <model>src/main/mdo/toolchains.mdo</model>
                    </models>
                </configuration>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.5.0.Final</version>
            </extension>
        </extensions>
    </build>

    <profiles>
        <profile>
            <id>svn-buildnumber</id>
            <activation>
                <file>
                    <exists>.svn</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>buildnumber-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>create</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <doCheck>false</doCheck>
                            <doUpdate>false</doUpdate>
                            <providerImplementations>
                                <svn>javasvn</svn>
                            </providerImplementations>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>non-canonical-buildnumber</id>
            <activation>
                <file>
                    <missing>.svn</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>buildnumber-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>create</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <doCheck>false</doCheck>
                            <doUpdate>false</doUpdate>
                            <format>NON-CANONICAL_{0,date,yyyy-MM-dd_HH-mm}_{1}</format>
                            <items>
                                <item>timestamp</item>
                                <item>${user.name}</item>
                            </items>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

Thanks for help

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions