【问题标题】:netbeans: dependencies for c3p0 and hibernatenetbeans:c3p0 和休眠的依赖项
【发布时间】:2014-10-26 02:31:33
【问题描述】:

这些是休眠和 c3p0 JavaSE 应用程序的正确依赖项吗?我的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>

这是来自 netbeans,我不太清楚要点击什么,即使在参考了 maven 上的 Netbeans 指南之后也是如此。

这是否符合 hibernate 和 c3p0 的要求?

【问题讨论】:

    标签: java hibernate maven netbeans dependencies


    【解决方案1】:

    这些依赖项是由 IDE 通过库机制(工具/库管理器)添加的,并且无法识别正确的 Maven GAV(GroupID-ArtifactID-version)(有几种策略,但显然都失败了)。生成的 pom sn-p 是尝试使其在本地为您工作的后备方案。理想情况下,您可以手动将其替换为来自公共存储库的正确 GAV。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-30
      • 2019-08-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-03
      • 1970-01-01
      • 2013-01-17
      相关资源
      最近更新 更多