前提・実現したいこと
eclipseでGradle環境を構築中です。Gradleプロジェクト新規作成してからGroovyプロジェクトに変換し、build.gradleを編集するとライブラリの「Groovy Libraries」「Groovy DSL Support」が消えてしまった為、復活させたい。
発生している問題・エラーメッセージ
該当のソースコード
元のコード(「Groovy Libraries」「Groovy DSL Support」が有るとき)
/* * This build file was generated by the Gradle 'init' task. * * This generated file contains a sample Java Library project to get you started. * For more details take a look at the Java Libraries chapter in the Gradle * user guide available at https://docs.gradle.org/4.3/userguide/java_library_plugin.html */ // Apply the java-library plugin to add support for Java Library apply plugin: 'java-library' // In this section you declare where to find the dependencies of your project repositories { // Use jcenter for resolving your dependencies. // You can declare any Maven/Ivy/file repository here. jcenter() } dependencies { // This dependency is exported to consumers, that is to say found on their compile classpath. api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation 'com.google.guava:guava:23.0' // Use JUnit test framework testImplementation 'junit:junit:4.12' }
変更したコード(「Groovy Libraries」「Groovy DSL Support」が無くなったとき)
apply plugin: 'groovy' repositories { jcenter() } dependencies { compile 'org.seleniumhq.selenium:selenium-java:3.14.0' testCompile group: 'org.codehaus.groovy', name: 'groovy-all', version: '3.0.0-alpha-3', ext: 'pom' testCompile 'org.codehaus.groovy:groovy-all:2.5.2' testCompile 'junit:junit:4.12' testCompile 'org.seleniumhq.selenium:selenium-java:3.14.0' testCompile group: 'org.gebish', name: 'geb-core', version: '2.2' testCompile group: 'org.gebish', name: 'geb-junit4', version: '2.2' }
試したこと
該当プロジェクトで右クリックし[ビルド・パス]-[ライブラリの追加]-[Groovy Runtime Libraries]を実行すると「Groovy Libraries」は追加されたが、実行時に下記エラーが発生した。
下記エラーも無視していいのか分からず後々問題になるのであれば、エラーを解消しておきたいのですが、エラーの対処方法が分かりません。
補足情報(FW/ツールのバージョンなど)
OS:Windows10
Eclipse:Photon 4.8.0
groovy-all:2.5.2
geb-core:2.2
geb-junit4:2.2
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。