Plugin does not exist or no valid version can be found error - maven-2

I have downloaded the complete source of hudson jira API plugins and am trying to build it by mvn install. The jira plugin gets build properly, but when it tries to build the hudson plugin, I am getting the error
[INFO] The plugin 'org.kohsuke:access-modifier-checker' does not exist or no valid version could be found. The access-modifier-checker jar file (1.0) is present in my local repository.
Tried this from multiple machines and I am getting the same error. Also I tried to google the issue, but to no avail. Is there anything I am missing?
edit: I have also tried deleting the contents of .m2/repository folder
edit2: pom.xml snippet
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>access-modifier-checker</artifactId>
<version>1.0</version>
</dependency>

The JIRA plugin jar file needs to be installed in {jira.home}/plugins/installed-plugins for version 2 plugins, or atlassian-jira/WEB-INF/lib for version 1 plugins.

Related

Spring cloud contract maven plugin is not installing jars to local .m2 folder

I have spring-cloud-contract-maven-plugin in my pom.xml of producer project. When I use the below plugin, it is not installing the jars to .m2 repository.
I have tried adding multiple versions of spring-cloud-contract and 2.0.2.RELEASE only seems stable to build successfully.
` <plugin>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
<version>2.0.2.RELEASE</version>
<!--<executions>-->
<!--<execution>-->
<!--<goals>-->
<!--<goal>convert</goal>-->
<!--<goal>generateStubs</goal>-->
<!--<goal>generateTests</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<extensions>true</extensions>
<configuration>
<packageWithBaseClasses>com.sam.fraud.fcm.fraudcase.gateway.test.contracts</packageWithBaseClasses>
</configuration>
</plugin>`
If the above plugin is added in pom, .m2 folder is not at all getting installed dependency jars locall, stubs are generated but in target folder, .m2 not updated
`[INFO] Installing com.sam.fraud.fcm:fraud-case-gateway-api:1.0.0-SNAPSHOT at end`
If I remove the plugin or comment it out, I get the below, which is installing & working fine, but the stubs are not generated in the target, which I need.
`[INFO] Installing C:\Users\sam\FCM-forks\fraud-case-gateway-contract-tests\api\pom.xml to C:\Users\sam\.m2\repositoryFCM2\com\sam\fraud\fcm\fraud-case-gateway-api\1.0.0-SNAPSHOT\fraud-case-gateway-api-1.0.0-SNAPSHOT.pom`
I need the correct plugin of this as, this is used with base class of tests and package. I have also tried with
`<baseClassForTests>
com.sam.fraud.fcm.fraudcase.gateway.test.contracts.RepreclientBase
</baseClassForTests>`
Thanks Marcin, but looks like I figured the issue, it was mvn-install plugin version which was not uploading jars locally, i reverted version to 2.4 from 2.5.4 so, it worked fine.
Alsom the infinite exception was related to wiremock-servlet issue with Spring Boot 2.
Using javax-servlet-api:4.0.1 version helped me build & run my application successfully.

DeepLearning4j examples maven project unable to be processed by Intellij

As shown in the screenshot there is a dependency of the dl4j-0.4-examples project that is unable to be loaded by intellij.
Unable to get dependency information: Unable to read the metadata file
for artifact 'com.github.jai-imageio-core.jar': Invalid JDK version in
profile "java8-and-higher': Unbounded range [1.8
A similar problem resolved in this question
https://github.com/google/gson/issues/596
as quick fix open the pom file at your local repository and add ')'
and should looks like
91 [1.8,)
save and execute again
But in this case there is no jdk tag: so that approach can not be used.
Has anyone found a workaround to load this project into intellij?
The owners of the project have recognized this as an issue. If you would like to follow along here is the bug tracker:
https://github.com/deeplearning4j/dl4j-0.4-examples/issues/76
Update 2/28/16: The resolution: I needed to do
brew switch maven 3.3.9
There were multiple versions of maven installed on my machine but I did not know about brew switch. So some ways maven was working without doing the switch - but for this project a completely clean maven installation was required.

Mule Maven tests throw ClassNotFoundException all of a sudden

All of a sudden all my Mule Maven projects are throwing this error when running mvn clean test:
java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException
at org.mule.tck.junit4.AbstractMuleTestCase.(AbstractMuleTestCase.java:71)
I can add a dependency for it, but I shoudln't really have to.
Nothings changed in my code. I am using Mule 3.4
You need commons-cli.jar in your classpath, add this Maven dependency to your pom
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.1</version>
</dependency>
Update: OP's code was fixed after adding commons-cli 1.1 dependency.
Issue description and how to fix it: http://ricston.com/blog/mule-classnotfoundexception-tests-commons-cli/
In a nutshell, you probably have an incorrect JAR named commons-cli-1.2. Delete that and rerun your maven build. You should be good after that.
If the follogin dependency in available in the POM. it should be working fine.
<dependency>
<groupId>org.mule.tests</groupId>
<artifactId>mule-tests-functional</artifactId>
<version>3.4.0</version>
<scope>test</scope>
</dependency>
Then use mvn clean compile to update the dependency.
mvn eclipse:clean eclipse:eclipse clean compile
Hope this helps.
Maven behaviour isn't reproducible from one run to the next: apart from generic network problems and repository corruption problems, anything might be updated automatically at any time, breaking any step of the execution, even if you don't change any of your files.
Your error message about a class in some Apache Commons library suggests a disagreement between the version of that library Mule should be using (one that has the ParseException class) and the library version it actually loads (without the class and causing the exception).
Plausible version mismatch scenarios include an update to a buggy new version of Mule (maybe only to a wrong or corrupted POM) which specifies an incompatible library version, or a random upgrade or downgrade of the latest library version in your repository as a consequence of adding or updating something unrelated to Mule.
Analysis suggestions:
What plugins in your Maven repository have a snapshot version? Which ones of these snapshots were updated around the time the error first appeared?
Which library jars, and which versions, include the ParseException class? What depends on specific versions or on the latest version of those jars?

EasyWSDL has missing dependencies

I am trying to add a WSDL module to my existing application, but I'm struggling to get the dependencies resolved.
According to their website, this is the correct dependency
<dependency>
<groupId>org.ow2.easywsdl</groupId>
<artifactId>easywsdl-wsdl</artifactId>
<version>2.1</version>
</dependency>
After a search (search.maven.org), I already changed the version to 2.3 and there are a bunch of files that are downloaded into my local repository, but when running the application (with the websites demo code), I bump into this error:
java.lang.ClassNotFoundException: com.ebmwebsourcing.easycommons.uri.UriManager
And I believe it has something to do with the missing artifacts :
com.ebmwebsourcing.easycommons:easycommons.uri:jar:1.1
com.ebmwebsourcing.easycommons:easycommons.logger:jar:1.1
In particular the first one. Now, I'm relatively new to using Maven... How would I go about solving this?
Thanks.
The solution is to add the petalslink repository. Appearantly the standard maven repository doesn't contain the easycommons dependency. The petalslink repository does.

Error while using JSFUnit/HtmlUnit/CSSParser

We've just recently converted our project to using Maven for builds and dependency management, and after the conversion I'm getting the following exception while trying to run any JSFUnit tests in my project.
Exception class=[java.lang.UnsupportedOperationException]
com.gargoylesoftware.htmlunit.ScriptException: CSSRule com.steadystate.css.dom.CSSCharsetRuleImpl is not yet supported.
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:527)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)
...
All the dependencies and JARs for JSFUnit were pulled with Maven using the JBoss repository (http://repository.jboss.com/maven2/).
We're using the following dependencies in the project:
jboss-jsfunit-core 1.2.0.Final
jboss-jsfunit-richfaces 1.2.0.Final
richfaces-ui 3.3.2.GA
openfaces 2.0
JSF 1.2_12
Facelets 1.1.14
Before the dependencies were being managed by Maven, we were able to run our JSFUnit tests just fine. I was able to semi-fix the issue by using a ss_css2.jar file that someone had tucked into our WEB-INF/lib directory (from before the Maven conversion). I'm hoping to find out if there's something else I can do to fix the dependencies in Maven rather than resorting to managing some of the dependencies myself.
You're very likely getting an "incompatible" version of HtmlUnit or another JAR (pulled transitively). Try with the version you were using previously and declare it under the dependencyManagement section, e.g.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.7</version><!-- put "your" version here -->
</dependency>
</dependencies>
</dependencyManagement>
Or, if you changed any version, try to revert to the exact previous state (by the way, could you clarify the differences between the previous versions and the one currently used?).
Update: It appears that the problem was related to the version of the cssparser artifact. I hadn't all the required elements to figure this out but the OP did :)