ascendtech / gwt-gradle

Gradle GWT Plugin For Modern Web applications using NPM/Webpack
Apache License 2.0
22 stars 4 forks source link

How to change repo url to use artifactory instead of https://maven.ascend-tech.us #10

Open rakeshk6842 opened 3 years ago

rakeshk6842 commented 3 years ago

it's downloading package files from https://maven.ascend-tech.us instead of artifactory when I try to build Could not resolve core:packageFiles:3.2. 07:12:52 > Could not get resource 'https://maven.ascend-tech.us/repo/core/packageFiles/3.2/packageFiles-3.2.pom'. 07:12:52 > Could not GET 'https://maven.ascend-tech.us/repo/core/packageFiles/3.2/packageFiles-3.2.pom'. 07:12:52 > Connect to maven.ascend-tech.us:443 [maven.ascend-tech.us/54.157.153.72] failed: connect timed out i need to call https://artifactory.com/repo/core/packageFiles/3.2/packageFiles-3.2.pom instead of https://maven.ascend-tech.us/repo/core/packageFiles/3.2/packageFiles-3.2.pom

rakeshk6842 commented 3 years ago

and how to ignorre project.repositories { maven { url 'https://maven.ascend-tech.us/repo' } maven { //temp for vue beta-10 snapshot url 'https://oss.sonatype.org/content/repositories/snapshots' } } from this repo and use one we specified in the project repo

mdavis95 commented 3 years ago

Are you not able to just add https://artifactory.com/repo/?

mdavis95 commented 3 years ago

We could in theory allow not auto adding our repo through some option but maybe just adding the repo you need would be enough.

rakeshk6842 commented 3 years ago

i tried maven { url 'https://artifactory.com/repo' } but it didn't work

do we have any gradle examples with jdk11 and gwt 2.9 for reference

payammeyer commented 3 years ago

@rakeshk6842 you can see the plug-in in action in this project: https://github.com/ascendtech/gwt-examples

rakeshk6842 commented 3 years ago

it's still going to > Could not resolve core:packageFiles:3.2. 18:11:02 Required by: 18:11:02 project :epptool 18:11:02 > Could not resolve core:packageFiles:3.2. 18:11:02 > Could not get resource 'https://maven.ascend-tech.us/repo/core/packageFiles/3.2/packageFiles-3.2.pom'. 18:11:02 > Could not GET 'https://maven.ascend-tech.us/repo/core/packageFiles/3.2/packageFiles-3.2.pom'. 18:11:02 > Connect to maven.ascend-tech.us:443 [maven.ascend-tech.us/54.157.153.72] failed: connect timed out 18:11:02
even if i add repo url it's not going there is there any config option i can use

mdavis95 commented 3 years ago

can you paste a more complete build file? The https://artifactory.com/ site doesn't not look like a maven repo to me.

rakeshk6842 commented 3 years ago
import org.apache.tools.ant.filters.ReplaceTokens
import org.apache.tools.ant.filters.FixCrLfFilter

apply plugin: 'us.ascendtech.gwt.modern'
apply plugin: 'nebula.rpm'
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'rhel-package-plugin'
apply plugin: 'properties-plugin'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'eclipse-wtp'
// apply plugin: 'gwt'

compileJava {
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11
}

// Source set to include in jar.
sourceSets {
    main {
        java {
            // Common and Shared App are compile with different version of JDK and using different version of libraries like Spring.
            // So adding other project as source instead of project dependency.
            // Once CAM move to JDK 8, then this can be project base dependency.
            srcDirs "src/main/java"
        }
    }
}

customizeComponentPackaging {
    componentFlavor='web'
}

gwt {
    gwtVersion='2.9.0'
    modules=['com.verisign.epptool.EPPTool']
    sourceSets {
        main {
            java {
                srcDirs 'src/main/java'
            }
        }
    }

    logLevel = 'ERROR'

    // minHeapSize = "512M";
    // maxHeapSize = "1024M";

    // superDev {
    //     noPrecompile=true
    // }

    // The following is only needed if you don't use the Google Plugin for Eclipse.
    // eclipse{
    //     addGwtContainer=false // Default set to true
    // }

}

apply from: "libraries.gradle"

task clean { 
       doLast { delete distDir }
}

allprojects {

    repositories {
        maven { 
            url "https://artifactory.com/artifactory/repo/"
            metadataSources {
                artifact()
            }
        }
    }

    // task that checks for 'version' values in execution phase
    task checkVersion {
              doLast {
                      if (!hasVersion("version")) {
                      throw new GradleException ("Property 'version' is missing. Specify using '-Pversion=' command line option.")
              }
        }
    }

    // if in task graph, execute check first to shortcut any dependencies
    gradle.taskGraph.whenReady { taskGraph ->
        if ( taskGraph.hasTask(checkVersion) ){
            checkVersion.finalizedBy()
        }
    }

    project.ext.hasVersion = { prop ->
        return project.hasProperty("${prop}") && project[prop] && project[prop] != project.DEFAULT_VERSION
    }

}

subprojects  {
    // dependencies for plugins and repositories used by gradle
    buildscript {
        repositories {
            maven { 
                url "https://artifactory.com/artifactory/repo" 
            }
        }
        dependencies {
            classpath 'org.redline-rpm:redline:1.2.9'
            classpath 'com.google.collections:google-collections:1.0'
            classpath 'coverityplugin:coverityplugin:0.7.0'
            classpath 'com.netflix.nebula:gradle-ospackage-plugin:8.4.1'
            classpath 'core:packagePlugin:2.12'
            classpath 'gradle.plugin.us.ascendtech:gwt-gradle:0.5.4'
            // classpath 'org.wisepersist:gwt-gradle-plugin:1.1.9'
        }
    }

    apply plugin: 'java'

    configurations {
        packageFiles
    }

    dependencies {
            packageFiles 'core:packageFiles:3.2@zip'
    }

}