有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

当我尝试在项目中使用JAR而无法在项目中使用JAR时

enter image description hereenter image description here我在eclipse中使用了maven插件,所以我看不到任何设置。甚至我也尝试手动添加xml设置。xml

我缺少什么,请在步骤中详细纠正我

My pom is

http://maven.apache.org/xsd/maven-4.0.0.xsd“>; 4.0.0

<groupId>demo</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>demo</name>
<url>http://maven.apache.org</url>
 <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
  <dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.project</groupId>
        <artifactId>SOA_API_Automation</artifactId>
        <scope>system</scope>
        <version>0.0.1-SNAPSHOT</version>
        <systemPath>{jar/path}</systemPath>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
    </plugins>
</build>


共 (1) 个答案

  1. # 1 楼答案

    如果您指的是设置。xml是Maven的用户特定配置,POM中不存在。它出现在~/。m2/设置。xml。有关更多详细信息,请参阅maven doc