0

Ubuntu 12.04 で NetBeans を使用して gradle Java EE プロジェクトを実行したいと考えています。エラー - プロジェクト出力:

Build failure: gradle run
org.gradle.tooling.BuildException: Could not execute build using Gradle distribution   'http://services.gradle.org/distributions/gradle-1.7-bin.zip'

私の gradle -version 出力:

------------------------------------------------------------
Gradle 1.7
------------------------------------------------------------

Build time:   2013-08-06 11:19:56 UTC
Build number: none
Revision:     9a7199efaf72c620b33f9767874f0ebced135d83

Groovy:       1.8.6
Ant:          Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy:          2.2.0
JVM:          1.6.0_27 (Sun Microsystems Inc. 20.0-b12)
OS:           Linux 3.2.0-52-generic-pae i386

そして私のbuild.gradleファイル:

apply plugin: 'java'
apply plugin: 'war'
mainClass = "main.Main"

sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
if (!hasProperty('mainClass')) {
    ext.mainClass = 'main.Main'
}

repositories {
    mavenCentral()
}

dependencies {
    compile group: 'org.hibernate', name: 'hibernate-core', version: '3.6.7.Final'
    compile group: 'org.hibernate', name: 'hibernate-entitymanager', version: '3.6.7.Final'
    compile "javax.ws.rs:jsr311-api:1.1.1"
    compile 'com.sun.jersey:jersey-server:1.13'
    compile 'com.sun.jersey:jersey-core:1.13'
    compile 'com.sun.jersey:jersey-servlet:1.13'
    testCompile group: 'junit', name: 'junit', version: '4.10'
}

このエラーは、Hibernate (EntityManager の作成) を使用しようとすると発生します: NetBeans ログ:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named WebSISMSPUpgsql
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:69)
at jpa.EntityManagerFactory.reinit(EntityManagerFactory.java:69)
at jpa.EntityManagerFactory.<init>(EntityManagerFactory.java:61)
at jpa.EntityManagerFactory.<init>(EntityManagerFactory.java:56)
at jpa.EntityManagerFactory.getInstance(EntityManagerFactory.java:43)
at main.Main.main(Main.java:18)
:run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/jdk1.7.0_25/bin/java'' finished with non-zero exit value 1

私はそれについて何をすべきですか?

4

0 に答える 0