- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个Ubuntu Studio 16.10
。我有一个IntelliJ IDEA 2016.3.2
内部版本 #IC-163.10154.41,构建于 2016 年 12 月 21 日
JRE: 1.8.0_112-release-408-b6 amd64
JVM: OpenJDK 64-Bit
服务器 VM 由 JetBrains s.r.o 提供我用Apache Maven 3.3.9
我在我的 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>
<repositories>
<repository>
<id>jcenter</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
<groupId>test</groupId>
<artifactId>myproject</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceencoding>UTF-8</project.build.sourceencoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
我转到我的项目目录并运行 mvn clean install
我还检查了另一篇文章,其中建议右键单击项目文件夹并选择 Maven-> 重新导入,但该选项不可用。我有一个BUILD Success
。尽管外部库显示 junit 的存在。我从来没有见过 TestNG。在日志中它说..下载testng-6.9.12.jar
当我使用locate testng-6.9.12.jar
时我所得到的只是返回到命令提示符。在编辑器中,我尝试导入 org.testng.*;我一写完导入语句就被删除了。我在 Intellij
上使用了 vim 的安排。 Ubuntu 16.10
我也尝试过从 jcentral 和 maven 存储库下载,但没有成功。
我只能在外部库中看到 TestNG junit
和Java 1.8
最佳答案
可能是因为Maven找不到6.9.12
在 Maven 中心(由于你的 pom 文件没有任何 <repository>
标签,maven 将尝试仅在 repo1.maven.org/maven2/
中寻找你的 Artifact )。
我尝试搜索它here并且找不到版本 6.9.12
TestNG最新发布的版本是6.10
。所以请更换您的 <version>
标签在你的 <dependency>
至6.10
然后再试一次。应该可以解决这个问题。
<scope>test</scope>
只是告诉 Maven 的一种便捷方式,仅当您运行测试时才需要解析 TestNG。默认范围compile
告诉 TestNG 在编译代码本身时将提供一个 Artifact (通常为 src/main/java
)。它与您在这里面临的问题没有任何关系(至少据我所知)
关于java - 在 IntelliJ 中找不到 TestNG,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41921992/
例如,我有一个父类Author: class Author { String name static hasMany = [ fiction: Book,
代码如下: dojo.query(subNav.navClass).forEach(function(node, index, arr){ if(dojo.style(node, 'd
我有一个带有 Id 和姓名的学生表和一个带有 Id 和 friend Id 的 Friends 表。我想加入这两个表并找到学生的 friend 。 例如,Ashley 的 friend 是 Saman
我通过互联网浏览,但仍未找到问题的答案。应该很容易: class Parent { String name Child child } 当我有一个 child 对象时,如何获得它的 paren
我正在尝试创建一个以 Firebase 作为我的后端的社交应用。现在我正面临如何(在哪里?)找到 friend 功能的问题。 我有每个用户的邮件地址。 我可以访问用户的电话也预订。 在传统的后端中,我
我主要想澄清以下几点: 1。有人告诉我,在 iOS 5 及以下版本中,如果您使用 Game Center 设置多人游戏,则“查找 Facebook 好友”(如与好友争夺战)的功能不是内置的,因此您需要
关于redis docker镜像ENTRYPOINT脚本 docker-entrypoint.sh : #!/bin/sh set -e # first arg is `-f` or `--some-
我是一名优秀的程序员,十分优秀!