Can I use the new plugin DSL with a Nexus proxy repository?

(Ryan Jaeb) #1

The docs aren’t really clear on whether or not the incubating plugin DSL can be used with a proxied repository in Artifactory, Nexus, etc…

I’m try to proxy as described in this thread, but all I get are 404 errors for the marker artifacts.

This comment says to use the old style plugin config, but it’s over a year old. Do I still need to use the old style?

(Nova Terata) #2

I would also like to know this, I suspect we have to use the old buildscript closure instead or maybe we can use the buildscript closure to set the repository then the new plugins closure will use it. I don’t know yet, I should know soon though.

(Stefan Oehme) #3

There are no marker artifacts in that repository yet, so you currently can’t proxy the plugin portal for use with the new DSL. The old answer to use the buildscript block is unfortunately still valid.

(Nova Terata) #4
buildscript {
    repositories {
        maven {
            url 'http://nexus3-host:8081/repository/maven-public/'

plugins {
    id 'net.ltgt.apt' version '0.9'
    id 'com.github.hierynomus.license' version '0.13.1'
    id 'com.github.ben-manes.versions' version '0.13.0'

I confirmed this hybrid works with a nexus3 proxy

(Nova Terata) #5

And honestly this makes the most sense, even if they were to put it inside the plugins block it wouldn’t buy much

(Stefan Oehme) #6

@novaterata what you showed will still query for the plugin metadata and will not work if that url is blocked. As I said before, mirroring the plugin portal is not yet possible.

(Nova Terata) #7

Ah ok, I misunderstood, I was only concerned with whether it pulled from
Nexus or not.