0

Isn’t the artifact name under below URL wrong?

http://repo1.maven.org/maven2/org/powermock/powermock-mockito-release-full/1.5.1/

As per above URL, The name of the artifact should have been powermock-mockito-release-full-1.5.1.jar but what I see is powermock-mockito-release-full-1.5.1*-full*.jar. The additional –full is breaking my maven build (unable to find resource). Below is my dependency declaration and how different I should declare the POM dependency than below one.

<dependency> <groupId>org.powermock</groupId> <artifactId>powermock-mockito-release-full</artifactId> <version>1.5.1</version> <scope>test</scope> </dependency> 

Am I missing something?

Thanks

2 Answers 2

2

The last full in this repository is another dependency coordinate called classifier.

Try adding the classifier and you should download the dependency:

<dependency> <groupId>org.powermock</groupId> <artifactId>powermock-mockito-release-full</artifactId> <version>1.5.1</version> <classifier>full</classifier> <scope>test</scope> </dependency> 

I suggest to avoid classifier because their values are not standard and therefore their meaning and the way to use them is not always so clear.

Sign up to request clarification or add additional context in comments.

Comments

0

Looking at the mockito site you should include the dependency like so:

http://code.google.com/p/powermock/wiki/Mockito_maven

<properties> <powermock.version>1.5.4</powermock.version> </properties> <dependencies> <dependency> <groupId>org.powermock</groupId> <artifactId>powermock-module-junit4</artifactId> <version>${powermock.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.powermock</groupId> <artifactId>powermock-api-mockito</artifactId> <version>${powermock.version}</version> <scope>test</scope> </dependency> </dependencies> 

1 Comment

+1 for specifying dependencies like this instead of using a jar with '-full' or '-all' in the name. Those jars often package some of the libraries they use (like Hamcrest) inside the jar where the dependency resolution process can't get at them. Then, if you need to use another version of Hamcrest for some reason, you can run into classpath problems. Another Stackoverflow post gives an example.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.