Where can I find org.apache.maven.wagon.providers.http.wagon.shared.AbstractHttpClientWagon class?

user1686407 :

I am studying how maven download dependency, I use mvn clean compile and use IDEA debug feature to trace code.

break point is org.apache.maven.wagon.StreamWagon L126

here is the stack after press F7

fillInputData:1094, AbstractHttpClientWagon (org.apache.maven.wagon.providers.http.wagon.shared)
getInputStream:126, StreamWagon (org.apache.maven.wagon)
getIfNewer:88, StreamWagon (org.apache.maven.wagon)
get:61, StreamWagon (org.apache.maven.wagon)
...

And I can't find the org.apache.maven.wagon.providers.http.wagon.shared.AbstractHttpClientWagon class anywhere.

here is my current dependency.

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <version>3.6.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>3.6.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-http</artifactId>
      <version>3.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-http-shared</artifactId>
      <version>3.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-http-lightweight</artifactId>
      <version>3.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-provider-api</artifactId>
      <version>3.3.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.8.0</version>
    </dependency>

I only find a same name org.apache.maven.wagon.shared.http.AbstractHttpClientWagon class from wagon-http-shared, but the package name is different.

EDIT: I use maven 3.6.1 IDEA 2019.3.3 bundled version

leopal :

The class you are searching for is included in maven's installation directory.

Full path is

MAVEN_INSTALLATION_DIR/lib/wagon-http-$VERSION-shaded.jar

Note that $VERSION depends on Maven's version you have installed.

Edit: Classes source code can be found here. You have stated in comments that source's and jar's class package differs. That's partially true, but this is explained by checking artifacts wagon-providers artifact's pom.xml.

Especially you should check configuration of Maven-shade-plugin.

Here artifact wagon-http-shared is included in the build process and here its package in the produced jar is changed.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=27065&siteId=1