web中 依赖repository 报错!

来源:4-7 多项目构建实战

春生啊

2018-08-06 14:39

14:37:44: Executing task 'build'...



FAILURE: Build failed with an exception.


* Where:

Build file 'E:\imooc-code\todolist\repository\build.gradle' line: 10


* What went wrong:

A problem occurred evaluating project ':repository'.

> Project with path ':model' could not be found in project ':repository'.


* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.


* Get more help at https://help.gradle.org


BUILD FAILED in 0s

Project with path ':model' could not be found in project ':repository'.

Open File

14:37:44: Task execution finished 'build'.


写回答 关注

2回答

  • zhxiong
    2018-08-19 17:18:46
    已采纳

    > Project with path ':model' could not be found in project ':repository'. 这个不是说出来了吗?

    最好把你的配置贴出来

    春生啊 回复春生啊

    我明天把这个gradle项目配置贴出来

    2018-09-02 15:53:06

    共 2 条回复 >

  • 春生啊
    2018-09-03 09:13:00
    buildscript {
        ext {
            springBootVersion = '1.5.4.RELEASE'
    //        springBootVersion = '2.0.4.RELEASE'
            projectJdk = '1.8'
            projectGroup = 'com.security'
            projectVersion = '0.0.1'
            projectName = 'securitydemo'
            mavenUrl = "http://192.168.0.14/nexus/repository/maven-public/";
        }
        repositories {
            mavenLocal()
            maven { url = mavenUrl }
            mavenCentral();
    
            maven { url "http://repo.spring.io/milestone" }
        }
        dependencies {
            classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        }
    }
    apply plugin: 'java'
    apply plugin: 'idea'
    apply plugin: 'war'
    apply plugin: 'org.springframework.boot'
    apply plugin: 'io.spring.dependency-management'
    apply plugin: 'maven-publish'
    
    group = projectGroup
    version = projectVersion
    sourceCompatibility = projectJdk
    repositories {
        mavenLocal()
        maven { url = mavenUrl }
        maven { url "http://repo.spring.io/milestone" }
    }
    dependencies {
        compile('org.springframework.boot:spring-boot-starter-web')
        compile('org.springframework.boot:spring-boot-starter-aop')
        compile("org.apache.tomcat.embed:tomcat-embed-jasper")
        compile('org.springframework.boot:spring-boot-starter-thymeleaf')
        testCompile('org.springframework.boot:spring-boot-starter-test')
    
        // 导入spring security的依赖
        compile('org.springframework.boot:spring-boot-starter-security')
        compile group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity4', version: '3.0.2.RELEASE'
    
    
        compile('com.alibaba:druid-spring-boot-starter:1.1.10')
        compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2")
        compile("mysql:mysql-connector-java:8.0.11")
        compile("com.github.pagehelper:pagehelper-spring-boot-starter:1.2.5")
        compile("org.springframework.boot:spring-boot-devtools")
        compile("tk.mybatis:mapper-spring-boot-starter:2.0.3")
        compile("org.mybatis.generator:mybatis-generator-core:1.3.7")
        compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
        compile group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.3'
        compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
        compile 'com.github.joschi.jackson:jackson-datatype-threetenbp:2.6.4'
        compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6'
        compile('org.springframework.social:spring-social-web:1.1.0.RELEASE')
    
    //    compile 'org.springframework.social:spring-social-config:1.1.6.RELEASE'  //    compile 'org.springframework.social:spring-social-facebook:2.0.3.RELEASE'
    
    //    compile 'org.springframework.social:spring-social-security:1.1.6.RELEASE'
        compile 'org.springframework.social:spring-social-security:1.1.4.RELEASE'
    
        /*security */
        compile 'org.springframework.social:spring-social-config:1.1.6.RELEASE'
        compile 'org.springframework.social:spring-social-security:1.1.6.RELEASE'
        compile 'org.springframework.social:spring-social-core:1.1.6.RELEASE'
        compile 'org.springframework.social:spring-social-web:1.1.6.RELEASE'
    
    
    }


新一代构建工具gradle

gradle轻松入门教程,学习本课对gradle进行初步了解

39540 学习 · 98 问题

查看课程

相似问题