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

How to configure ossindex-maven to use a proxy ? #73

Closed
farnulfo opened this issue Apr 18, 2022 · 1 comment
Closed

How to configure ossindex-maven to use a proxy ? #73

farnulfo opened this issue Apr 18, 2022 · 1 comment

Comments

@farnulfo
Copy link

farnulfo commented Apr 18, 2022

I tried
`

      <groupId>org.sonatype.ossindex.maven</groupId>
      <artifactId>ossindex-maven-plugin</artifactId>
      <configuration>
        <clientConfiguration>
          <proxy>
            <host>localhost</host>
            <port>8080</port>
          </proxy>
        </clientConfiguration>
      </configuration>
      <executions>
        <execution>
          <id>audit-dependencies</id>
          <phase>validate</phase>
          <goals>
            <goal>audit</goal>
          </goals>
        </execution>
      </executions>
    </plugin>        

`
=>
Unable to parse configuration of mojo org.sonatype.ossindex.maven:ossindex-maven-plugin:3.2.0:audit for parameter proxy: Cannot find 'proxy' in class org.sonatype.ossindex.service.client.OssindexClientConfiguration

@farnulfo
Copy link
Author

I found the right configuration:

<plugin>
    <groupId>org.sonatype.ossindex.maven</groupId>
    <artifactId>ossindex-maven-plugin</artifactId>
    <configuration>
        <clientConfiguration>
            <proxyConfiguration>
                <host>host</host>
                <port>8080</port>
                <authConfiguration>
                    <username>xxxxxxxx</username>
                    <password>yyyyyyyyy</password>
                </authConfiguration>
            </proxyConfiguration>
        </clientConfiguration>
    </configuration>
    <executions>
        <execution>
            <id>audit-dependencies</id>
            <phase>validate</phase>
            <goals>
                <goal>audit</goal>
            </goals>
        </execution>
    </executions>
</plugin>

I started with https://sonatype.github.io/ossindex-maven/maven-plugin/ossindex-audit/#clientConfiguration
There is a 404 for the "client configuration" link https://sonatype.github.io/ossindex-public/maven/apidocs/org/sonatype/ossindex/service/client/OssindexClientConfiguration.html but I used it to search and find the source code:
https://github.com/sonatype/ossindex-public/blob/main/client/src/main/java/org/sonatype/ossindex/service/client/OssindexClientConfiguration.java .
With this source code I've found the right xml tag based on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant