在Maven中包括jMock 2.6.0

时间:2022-09-03 00:01:50

I am unable to include the new jMock release as Maven dependency. Here is what I tried including:

我无法将新的jMock版本包含为Maven依赖项。以下是我所尝试的:

<dependency>
    <groupId>org.jmock</groupId>
    <artifactId>jmock</artifactId>
    <version>2.6.0</version>
</dependency>

I have tried various combinations with the version and artifactId but it doesn't help.

我已经尝试了不同的组合与版本和artifactId,但它没有帮助。

Thanks, Julia.

谢谢你,茱莉亚。

4 个解决方案

#1


0  

Version 2.6.0-RC2 can't be found on public Maven repositories yet. You may want to download it manually from jMock.org download page. If your company uses local Maven repository you can deploy it there. If it's just for your own usage install it in your local Maven repo.

版本2.6.0-RC2还不能在公共Maven存储库中找到。您可能想要从jMock.org下载页面手动下载它。如果您的公司使用本地Maven存储库,您可以在那里部署它。如果只是为了您自己的使用,安装在您的本地Maven repo中。

#2


4  

Now superceded - see my other answer

看我的另一个回答

Just had to solve this problem myself, and I haven't found a simple way :-(

我必须自己解决这个问题,而且我还没有找到一个简单的办法

The complicated way is this:

复杂的方法是:

  1. Download jmock-2.6.0-RC2-jars.zip and unzip into a directory.
  2. 下载jmock-2.6.0-RC2-jars。压缩和解压到一个目录。
  3. Download http://www.oneeyedmen.com/misc/jmock-2.6.0-RC2.poms.zip and unzip into the same directory.
  4. 下载http://www.oneeyedmen.com/misc/jmock-2.6.0 rc2.poms.zip并解压到同一个目录。
  5. Issue the following commands in that directory to install into your local Maven repository
  6. 在该目录中发出以下命令,将其安装到本地Maven存储库中

mvn install:install-file -DpomFile=jmock-2.6.0-RC2.pom -Dfile=jmock-2.6.0-RC2.jar

mvn安装:安装文件-DpomFile = jmock-2.6.0-RC2。pom -Dfile = jmock-2.6.0-RC2.jar

mvn install:install-file -DpomFile=jmock-legacy-2.6.0-RC2.pom -Dfile=jmock-legacy-2.6.0-RC2.jar

mvn安装:安装文件-DpomFile = jmock-legacy-2.6.0-RC2。pom -Dfile = jmock-legacy-2.6.0-RC2.jar

mvn install:install-file -DpomFile=jmock-junit4-2.6.0-RC2.pom -Dfile=jmock-junit4-2.6.0-RC2.jar

mvn安装:安装文件-DpomFile = jmock-junit4-2.6.0-RC2。pom -Dfile = jmock-junit4-2.6.0-RC2.jar

mvn install:install-file -DgeneratePom -DgroupId=org.hamcrest -DartifactId=hamcrest-core -Dversion=1.3.0RC1 -Dpackaging=jar -Dfile=hamcrest-core-1.3.0RC1.jar

mvn安装:安装文件-DgeneratePom -DgroupId = org。hamcrest -DartifactId=hamcrest-core -Dversion=1.3.0RC1 -Dpackaging=jar -Dfile=hamcrest-core-1.3.0RC1.jar

mvn install:install-file -DgeneratePom -DgroupId=org.hamcrest -DartifactId=hamcrest-library -Dversion=1.3.0RC1 -Dpackaging=jar -Dfile=hamcrest-library-1.3.0RC1.jar

mvn安装:安装文件-DgeneratePom -DgroupId = org。hamcrest -DartifactId=hamcrest-library -Dversion=1.3.0RC1 -Dpackaging=jar -Dfile=hamcrest-library-1.3.0RC1.jar

mvn install:install-file -DgeneratePom -DgroupId=org.hamcrest -DartifactId=hamcrest-unit-test -Dversion=1.3.0RC1 -Dpackaging=jar -Dfile=hamcrest-unit-test-1.3.0RC1.jar

mvn安装:安装文件-DgeneratePom -DgroupId = org。mso - fareast - font - family:宋体;mso - bidi - font - family: " times new roman "; mso - bidi - theme - font:

Then you should be able to use jmock jmock-junit4 and jmock-legacy at version 2.6.0-RC2, with Junit 4.8.1

然后,您应该能够使用jmock jmock jmock jmock-junit4和jmock遗留版本2.6.0-RC2,并使用Junit 4.8.1

Caveats - this is entirely unofficial, may conflict horribly with any official jmock poms, may be completely the wrong way to solve this problem, but works for me.

警告——这是完全非官方的,可能会与任何官方的jmock规则发生严重的冲突,可能是完全错误的解决这个问题的方法,但对我来说是有效的。

#3


2  

JMock 2.6.0-RC2 is now in Maven Central

JMock 2.6.0-RC2现在位于Maven中心

#4


1  

JMock 2.6.0 is now on Maven Central: http://mvnrepository.com/artifact/org.jmock/jmock/2.6.0

JMock 2.6.0现在在Maven中心:http://mvnrepository.com/artifact/org.jmock/jmock/jmock/2.6.0上

#1


0  

Version 2.6.0-RC2 can't be found on public Maven repositories yet. You may want to download it manually from jMock.org download page. If your company uses local Maven repository you can deploy it there. If it's just for your own usage install it in your local Maven repo.

版本2.6.0-RC2还不能在公共Maven存储库中找到。您可能想要从jMock.org下载页面手动下载它。如果您的公司使用本地Maven存储库,您可以在那里部署它。如果只是为了您自己的使用,安装在您的本地Maven repo中。

#2


4  

Now superceded - see my other answer

看我的另一个回答

Just had to solve this problem myself, and I haven't found a simple way :-(

我必须自己解决这个问题,而且我还没有找到一个简单的办法

The complicated way is this:

复杂的方法是:

  1. Download jmock-2.6.0-RC2-jars.zip and unzip into a directory.
  2. 下载jmock-2.6.0-RC2-jars。压缩和解压到一个目录。
  3. Download http://www.oneeyedmen.com/misc/jmock-2.6.0-RC2.poms.zip and unzip into the same directory.
  4. 下载http://www.oneeyedmen.com/misc/jmock-2.6.0 rc2.poms.zip并解压到同一个目录。
  5. Issue the following commands in that directory to install into your local Maven repository
  6. 在该目录中发出以下命令,将其安装到本地Maven存储库中

mvn install:install-file -DpomFile=jmock-2.6.0-RC2.pom -Dfile=jmock-2.6.0-RC2.jar

mvn安装:安装文件-DpomFile = jmock-2.6.0-RC2。pom -Dfile = jmock-2.6.0-RC2.jar

mvn install:install-file -DpomFile=jmock-legacy-2.6.0-RC2.pom -Dfile=jmock-legacy-2.6.0-RC2.jar

mvn安装:安装文件-DpomFile = jmock-legacy-2.6.0-RC2。pom -Dfile = jmock-legacy-2.6.0-RC2.jar

mvn install:install-file -DpomFile=jmock-junit4-2.6.0-RC2.pom -Dfile=jmock-junit4-2.6.0-RC2.jar

mvn安装:安装文件-DpomFile = jmock-junit4-2.6.0-RC2。pom -Dfile = jmock-junit4-2.6.0-RC2.jar

mvn install:install-file -DgeneratePom -DgroupId=org.hamcrest -DartifactId=hamcrest-core -Dversion=1.3.0RC1 -Dpackaging=jar -Dfile=hamcrest-core-1.3.0RC1.jar

mvn安装:安装文件-DgeneratePom -DgroupId = org。hamcrest -DartifactId=hamcrest-core -Dversion=1.3.0RC1 -Dpackaging=jar -Dfile=hamcrest-core-1.3.0RC1.jar

mvn install:install-file -DgeneratePom -DgroupId=org.hamcrest -DartifactId=hamcrest-library -Dversion=1.3.0RC1 -Dpackaging=jar -Dfile=hamcrest-library-1.3.0RC1.jar

mvn安装:安装文件-DgeneratePom -DgroupId = org。hamcrest -DartifactId=hamcrest-library -Dversion=1.3.0RC1 -Dpackaging=jar -Dfile=hamcrest-library-1.3.0RC1.jar

mvn install:install-file -DgeneratePom -DgroupId=org.hamcrest -DartifactId=hamcrest-unit-test -Dversion=1.3.0RC1 -Dpackaging=jar -Dfile=hamcrest-unit-test-1.3.0RC1.jar

mvn安装:安装文件-DgeneratePom -DgroupId = org。mso - fareast - font - family:宋体;mso - bidi - font - family: " times new roman "; mso - bidi - theme - font:

Then you should be able to use jmock jmock-junit4 and jmock-legacy at version 2.6.0-RC2, with Junit 4.8.1

然后,您应该能够使用jmock jmock jmock jmock-junit4和jmock遗留版本2.6.0-RC2,并使用Junit 4.8.1

Caveats - this is entirely unofficial, may conflict horribly with any official jmock poms, may be completely the wrong way to solve this problem, but works for me.

警告——这是完全非官方的,可能会与任何官方的jmock规则发生严重的冲突,可能是完全错误的解决这个问题的方法,但对我来说是有效的。

#3


2  

JMock 2.6.0-RC2 is now in Maven Central

JMock 2.6.0-RC2现在位于Maven中心

#4


1  

JMock 2.6.0 is now on Maven Central: http://mvnrepository.com/artifact/org.jmock/jmock/2.6.0

JMock 2.6.0现在在Maven中心:http://mvnrepository.com/artifact/org.jmock/jmock/jmock/2.6.0上