简体   繁体   English

netbeans:c3p0和hibernate的依赖项

[英]netbeans: dependencies for c3p0 and hibernate

Are these the correct dependencies for a hibernate and c3p0 JavaSE application? 这些对于休眠和c3p0 JavaSE应用程序是否正确依赖? My pom.xml currently: 我的pom.xml当前:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mycompany</groupId>
    <artifactId>crud</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <repositories>
        <repository>
            <id>unknown-jars-temp-repo</id>
            <name>A temporary repository created by NetBeans for libraries and jars it could not identify. Please replace the dependencies in this repository with correct ones and delete this repository.</name>
            <url>file:${project.basedir}/lib</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.1.8.Final</version>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>hibernate-jpa-2.0-api-1.0.1.Final</artifactId>
            <version>SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>mysql-connector-java-5.1.23-bin</artifactId>
            <version>SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>c3p0</groupId>
            <artifactId>c3p0</artifactId>
            <version>0.9.1.2</version>
        </dependency>
    </dependencies>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>
</project>

This is from netbeans, and I'm not quite clear on what to click on, even after referencing the Netbeans guide on maven. 这是来自netbeans,即使参考了maven上的Netbeans指南,我也不清楚要单击的内容。

Does this meet the hibernate and c3p0 requirements? 这是否满足休眠和c3p0要求?

these dependencies were added by the IDE via the Library mechanism (Tools/Library Manager) and proper Maven GAV (GroupID-ArtifactID-version) could not be recognized (there are several strategies but apparently all failed). 这些依赖关系是由IDE通过库机制(工具/库管理器)添加的,并且无法识别正确的Maven GAV(GroupID-ArtifactID版本)(有几种策略,但显然都失败了)。 The generated pom snippet is the fallback that tries to make it all work for you locally. 生成的pom代码段是一个后备,试图使它在本地对您都有效。 Ideally you would manually replace that with the proper GAV from a public repository. 理想情况下,您可以使用公共存储库中的适当GAV手动替换它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM