问题
i getting this error
% gradle build [ant:javac] Hello.java:2: error: package javax.persistence does not exist Hello.java:2: import javax.persistence.*;
what should i add to gradle.build to include
/opt/glassfish3/glassfish/modules/javax.persistence.jar
thx
回答1:
Try adding
compile group: 'javax.persistence', name: 'persistence-api', version: '1.0'
to your dependencies.
来源:https://stackoverflow.com/questions/9271849/add-glassfish-javax-persistence-to-gradle-project