Home  >  Q&A  >  body text

java - svn maven项目的依赖不起作用

当我引用一个svn的maven项目时,我么maven projects下没有maven依赖,项目中也没有对应的jar。

pom.xml文件代码

<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/maven-v4_0_0.xsd">
    <parent>
        <artifactId>meetmecarv2</artifactId>
        <groupId>com.meetmecar</groupId>
        <version>1.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>meetmecar_test</artifactId>
    <packaging>war</packaging>
    <version>0.0.1-SNAPSHOT</version>
    <name>meetmecar_test Maven Webapp</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.meetmecar</groupId>
            <artifactId>meetmecar-service</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
        </dependency>
    </dependencies>
    <build>
        <finalName>meetmecar_test</finalName>
    </build>
</project>
请问我改怎么修改?
大家讲道理大家讲道理2742 days ago633

reply all(4)I'll reply

  • PHPz

    PHPz2017-04-18 10:58:18

    It may be that your parent project has not been imported into idea. Idea will go to .m2/repository to find the parent's pom. If you have not installed the parent
    into the local warehouse, the parent's pom will not be found, so it will not be found. The jar package you depend on

    reply
    0
  • 阿神

    阿神2017-04-18 10:58:18

    There is no version number in the package

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>6.0.0.Alpha2</version>
    </dependency>

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 10:58:18

    version is not written

    reply
    0
  • 迷茫

    迷茫2017-04-18 10:58:18

    First fill in the version number, and then click the first button on the left under "Maven Projects" to refresh the dependencies.

    reply
    0
  • Cancelreply