java - svn maven项目的依赖不起作用
大家讲道理
大家讲道理 2017-04-18 10:56:18
0
4
678

当我引用一个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>
请问我改怎么修改?
大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(4)
PHPzhong

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

阿神

There is no version number in the package

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

version is not written

迷茫

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template