Maven依赖项引用非现有库jboss-transaction-api_1.1_spec-1.0.1.Final.jar

时间:2015-01-01 21:39:52

标签: hibernate maven pom.xml

我有关于maven的问题。在我目前的eclipse项目中,我使用maven进行依赖管理,直到现在它都运行良好。

该项目不再有效,它声明:

  

容器'Maven Dependencies'引用非现有库'C:\ Users \ RSone.m2 \ repository \ org \ jboss \ spec \ javax \ transaction \ jboss-transaction api_1.1_spec \ 1.0.1.Final \ jboss-事务api_1.1_spec-1.0.1.Final.jar'

我尝试了maven clean和maven更新,但没有用。我的pom.xml中的行标记为红色,并指出:

  

缺少工件org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final pom.xml / GestionVirment

     

缺少工件org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.1.Final pom.xml / GestionVirment

这是我的pom.xml的内容:

<?xml version="1.0" encoding="UTF-8"?>
<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.rsone.virement</groupId>
    <artifactId>GestionVirment</artifactId>
    <packaging>war</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>GestionVirment Maven Webapp</name>

    <developers>
        <developer>
            <id>rsone</id>
            <name>roussi abdelghani</name>
            <email>roussi.abdelghani@gmail.com</email>
        </developer>
    </developers>

    <properties>
        <jdk.version>1.8</jdk.version>
        <spring-version>3.2.8.RELEASE</spring-version>
        <spring-security-version>3.2.3.RELEASE</spring-security-version>
        <hibernate-version>4.2.11.Final</hibernate-version>
        <mysql-version>5.1.30</mysql-version>
        <spring-security>3.2.5.RELEASE</spring-security>
        <apache-connection-pooling-version>1.4</apache-connection-pooling-version>
        <slf4j-version>1.7.6</slf4j-version>
    </properties>


    <dependencies>
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring-version}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${spring-version}</version>
        </dependency>

        <!-- Hibernate -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>${hibernate-version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>${hibernate-version}</version>
        </dependency>


        <!-- Apache's Database Connection Pooling -->
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>${apache-connection-pooling-version}</version>
        </dependency>
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <version>${apache-connection-pooling-version}</version>
        </dependency>

        <!-- Spring Security Dependency -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>${spring-security}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>${spring-security}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-taglibs</artifactId>
            <version>${spring-security}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>${spring-security}</version>
        </dependency>

        <!-- logging, slf4j -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j-version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${slf4j-version}</version>
        </dependency>

        <!-- MySQL -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysql-version}</version>
        </dependency>

        <!-- Servlet -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

        <!-- junit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency> 

    </dependencies>
    <build>
        <finalName>GestionVirment</finalName>
                <plugins>

                <plugin>

                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <version>2.9</version>
                    <configuration>
                        <downloadSources>true</downloadSources>
                        <downloadJavadocs>false</downloadJavadocs>
                        <wtpversion>2.0</wtpversion>
                    </configuration>
                </plugin>

            </plugins>
    </build>
</project>
  • 我正在使用 Tomcat 而不是jboss

这是导致此问题的块:

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>${hibernate-version}</version>
 </dependency>
 <dependency>
     <groupId>org.hibernate</groupId>
     <artifactId>hibernate-entitymanager</artifactId>
     <version>${hibernate-version}</version>
 </dependency>

0 个答案:

没有答案