Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MavenDownloadingExceptions for netty-transport-native-* through artemis-core-client 2.16.0 #478

Open
timtebeek opened this issue Jan 18, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@timtebeek
Copy link
Contributor

Discovered through openrewrite/rewrite#3167 for @magicwerk. Given this minimal pom.xml

<?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>

    <groupId>org.example</groupId>
    <artifactId>magic</artifactId>
    <version>1.0-SNAPSHOT</version>
    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>artemis-jms-client</artifactId>
            <version>2.16.0</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.openrewrite.maven</groupId>
                <artifactId>rewrite-maven-plugin</artifactId>
                <version>4.38.2</version>
                <configuration>
                    <activeRecipes>
                        <recipe>com.yourorg.ChangePackageExample</recipe>
                    </activeRecipes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

When I run mvn rewrite:run.
Then I I get MavenDownloadingExceptions

[ERROR] Failed to execute goal org.openrewrite.maven:rewrite-maven-plugin:4.38.2:run (default-cli) on project magic: Execution default-cli of goal org.openrewrite.maven:rewrite-maven-plugin:4.38.2:run failed: Failed to download dependencies for pom.xml:
[ERROR] <?xml version="1.0" encoding="UTF-8"?>
[ERROR] <project xmlns="http://maven.apache.org/POM/4.0.0"
[ERROR]          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
[ERROR]          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
[ERROR]     <modelVersion>4.0.0</modelVersion>
[ERROR] 
[ERROR]     <groupId>org.example</groupId>
[ERROR]     <artifactId>magic</artifactId>
[ERROR]     <version>1.0-SNAPSHOT</version>
[ERROR]     <properties>
[ERROR]         <maven.compiler.source>17</maven.compiler.source>
[ERROR]         <maven.compiler.target>17</maven.compiler.target>
[ERROR]         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
[ERROR]     </properties>
[ERROR]     <dependencies>
[ERROR]         <!--~~(io.netty:netty-transport-native-epoll failed. No version provided)~~>--><!--~~(io.netty:netty-transport-native-kqueue failed. No version provided)~~>--><dependency>
[ERROR]             <groupId>org.apache.activemq</groupId>
[ERROR]             <artifactId>artemis-jms-client</artifactId>
[ERROR]             <version>2.16.0</version>
[ERROR]         </dependency>
[ERROR]     </dependencies>
[ERROR]     <build>
[ERROR]         <plugins>
[ERROR]             <plugin>
[ERROR]                 <groupId>org.openrewrite.maven</groupId>
[ERROR]                 <artifactId>rewrite-maven-plugin</artifactId>
[ERROR]                 <version>4.38.2</version>
[ERROR]                 <configuration>
[ERROR]                     <activeRecipes>
[ERROR]                         <recipe>com.yourorg.ChangePackageExample</recipe>
[ERROR]                     </activeRecipes>
[ERROR]                 </configuration>
[ERROR]             </plugin>
[ERROR]         </plugins>
[ERROR]     </build>
[ERROR] </project>: MavenDownloadingExceptions

Both dependencies netty-transport-native-epoll and netty-transport-native-kqueue are declared in artemis-core-client-2.16.0.pom as

<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-transport-native-epoll</artifactId>
  <classifier>${netty-transport-native-epoll-classifier}</classifier>
</dependency>
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-transport-native-kqueue</artifactId>
  <classifier>${netty-transport-native-kqueue-classifier}</classifier>
</dependency>

With the classifiers defined in artemis-pom-2.16.0.pom as

<netty-transport-native-epoll-classifier>linux-x86_64</netty-transport-native-epoll-classifier>
<netty-transport-native-kqueue-classifier>osx-x86_64</netty-transport-native-kqueue-classifier>

There might be something going on with how we resolve those classifiers, but that needs to be explored.

@timtebeek
Copy link
Contributor Author

Just tried this one again; no improvement yet with Rewrite Maven plugin 4.39.0.

@timtebeek
Copy link
Contributor Author

Similar to #522 ; re-evaluate once that is closed.

knutwannheden added a commit that referenced this issue Mar 20, 2023
The commit eece2d4 intended to do this already, but ended up using the wrong overload of the `SourceFile#printAll()` method.

Fixes #522
Related: #478, openrewrite/rewrite#2982
@knutwannheden
Copy link
Contributor

@timtebeek Can you reevaluate this using org.openrewrite.maven:rewrite-maven-plugin:4.43.0-SNAPSHOT?

@timtebeek
Copy link
Contributor Author

Tried just now; the markers do not appear in the source file (👍🏻), but the download error stays the same (👎🏻).

@knutwannheden
Copy link
Contributor

I haven't look into this one in detail, but let's keep it open then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants