Skip to content

Instantly share code, notes, and snippets.

@naartjie
Last active October 6, 2020 19:57
Show Gist options
  • Select an option

  • Save naartjie/75b05218284b2e4bea5e9b4841763322 to your computer and use it in GitHub Desktop.

Select an option

Save naartjie/75b05218284b2e4bea5e9b4841763322 to your computer and use it in GitHub Desktop.

Revisions

  1. naartjie revised this gist Oct 6, 2020. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions mirror.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    ### Adding a global mirror

    `~/.m2/settings.xml`:
    ```xml
    <settings>
    <mirrors>
    <mirror>
    <id>thanks-bob</id>
    <url>https://a-well-meaning-corpo.com/nexus/repository/public</url>
    <mirrorOf>*</mirrorOf>
    </mirror>
    </mirrors>
    </settings>
    ```
  2. naartjie revised this gist Oct 6, 2020. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion download a dependency.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,10 @@
    ### Download a dependency

    ```sh
    mvn dependency:get -Dartifact=org.springframework.cloud.stream.app:mongodb-sink-kafka-10:1.3.1.RELEASE:jar -Dtransitive=false -Ddest=gfy.jar
    mvn dependency:get \
    -Dartifact=org.springframework.cloud.stream.app:mongodb-sink-kafka-10:1.3.1.RELEASE:jar \
    -Dtransitive=false \
    -Ddest=gfy.jar
    ```

    This way you can "force" Nexus to download a dependency from upstream, for example.
  3. naartjie created this gist Oct 6, 2020.
    11 changes: 11 additions & 0 deletions download a dependency.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    ### Download a dependency

    ```sh
    mvn dependency:get -Dartifact=org.springframework.cloud.stream.app:mongodb-sink-kafka-10:1.3.1.RELEASE:jar -Dtransitive=false -Ddest=gfy.jar
    ```

    This way you can "force" Nexus to download a dependency from upstream, for example.

    If you're behind a corporate proxy, with TLS weirdness going on, add this for good measure:

    `-Dmaven.wagon.http.ssl.insecure=true`