user1429419
user1429419

Reputation: 127

add external plugin to intellij maven project

I'd like to add a plugin to my maven project in Intellij, but I'm not sure where I should download from and where I should put the jar files. For example, I want to use

<plugin>
    <groupId>funambol</groupId>
    <artifactId>rhinounit-maven-plugin</artifactId>
    ...

or

<plugin>
    <groupId>com.github.searls</groupId>
    <artifactId>jasmine-maven-plugin</artifactId>
    ...

in my pom.xml, but the text between the tags is red.

Upvotes: 2

Views: 2652

Answers (1)

maba
maba

Reputation: 48105

The rhineunit-maven-plugin does not seem to be found in any central repository. You will have to download the plugin sources yourself from here and then build them by running mvn install where the pom file is located. This will install the plugin in your local repository and the version will be 1.0.

Regarding the jasmin-maven-plugin it can be found here and as you can see the latest stable version is 1.1.0. That means that you will only have to add the version 1.1.0 to your plugin statement and the plugin will be downloaded when you run mvn install (actually in an earlier maven phase but don't bother about that).

Here seems to be a good article on how to use rhinounit-maven-plugin so you should go ahead and study it.

Regarding the tags being red that is caused by IntelliJ not being able to find the jar files in the local repo, especially if you don't set the version for the plugins. Normally IntelliJ shows a little green growl-like thing in the upper right corner that states "Maven projects need to be imported" when you change your pom files from within IntelliJ. If you select "Import Changes" it will try to download your dependencies. Another way to solve it is to run mvn install on your own project from the command line.

Upvotes: 3

Related Questions