Java exception: java.lang.UnsupportedOperationException - java

I'm trying to execute Maven -> Update project in Eclipse. Every time i do it i get the following error:
An internal error occurred during: "Updating Maven Project".
"java.lang.UnsupportedOperationException".
If i look in the code there aren't any files marked with errors, neither the pom.xml.
Other people working on the same project don't have this problem.
What could be causing this? What details do you need to get an idea about this?

it looks you have problem with one of artifacts you have in local repository try to delete .m2 and clean install project again but you have to be connected to internet, if this not solving your issue check the version of maven you are using and compare it with others.

Related

Failed to execute goal: com.github.eirslett:frontend-maven-plugin:0.0.27:npm

Someone have problem with failure to build an maven project when the fail is about this dependecie:com.github.eirslett:frontend-maven-plugin:0.0.27:npm ?
build Failure
I tried to build a maven project, but it always fails on this error. I already changed the maven version and deleted the m2 folder to start over, but the error persists. Does anyone have any tips, or has been through this and managed to resolve?
npm install returned with an error code. It looks like a Windows File system error code. So it's most likely that the hard drive is the point of failure here.
-1073741819 is 0xC0000005 which is ERROR_ACCESS_DENIED.

How to maven release:prepare issue and Plugin not found issue

Hello I am following along a Spring course and am currently trying to do multi-module maven builds. Most of it is working however it is sating my maven-release-plugin cannot be found. As well as this when i run release:prepare I am getting this error:
Maven Error
I am completely lost on ways to solve it, I have tried to delete and reimport the plugins. invalidate the cache and restart yet I cannot solve it. Any help would be great.
If you need any more code please let me know
You can only run the Maven release plugin if you commit your changes first.

Maven "Update Project" operation in Eclipse results in PMD "unable to find referenced rule" error

I have a Maven project imported into Eclipse via m2e. The project includes Spring and other dependencies, but for some reason they are not being recognized by Eclipse at all. When I attempt to use "Update Project..." (right click => Maven => Update Project) to rectify the issue, I get the following error:
An internal error occurred during: "Updating Maven Project".
Unable to find referenced rule EmptyIfStmt; perhaps the rule name is misspelled?
PMD and Checkstyle are not enabled for this project. Any ideas as to why I might be getting the error and/or how to address it?
The project builds fine via "mvn clean install," so I assume that this issue is Eclipse-specific.
I've tried disabling and re-enabling the Maven nature of the project but to no avail. I end up getting the same error upon converting the project back to a Maven one.
Go to your project folder and run mvn eclipse:eclipse before running Update Project. I hope it will resolve the issue.
The maven-eclipse-plugin (used in mvn eclipse:eclipse) is discontinued and shouldn't be used anymore. M2Eclipse replaces it for most, if not all, usage.

Error building Alfresco CE 5.0a in eclipse

I am trying to build Alfresco CE 5.0a in Eclipse.I followed steps according to this link. The checkout was successful.But while building the sourcecode using maven(using clean install) I am getting the following error.
[ERROR] Failed to execute goal on project alfresco-core: Could not resolve dependencies for project org.alfresco:alfresco-core:jar:5.0.a: The following artifacts could not be resolved: org.mybatis:mybatis:jar:3.0.4-alfresco-patched, org.springframework.extensions.surf:spring-surf-core-configservice:jar:1.2.1-M16, org.springframework.extensions.surf:spring-surf-core:jar:1.2.1-M16, org.springframework:spring-web:jar:3.0.5.RELEASE, javax.servlet:servlet-api:jar:2.4: Could not transfer artifact org.mybatis:mybatis:jar:3.0.4-alfresco-patched from/to alfresco-public (https ://artifacts.alfresco.com/nexus/content/groups/public): No response received after 60000 -> [Help 1]
I guess this is because of this jar file under the Alfresco Core 5.0.a
Downloaded: http ://repo.maven.apache.org/maven2/org/mockito/mockito-all/1.9.5/mockito-all-1.9.5.jar
I couldn't find that jar file in the specified URL.
So how can I solve this.Can I change the dependancy in pom.xml?
Help Needed.Thanks in Advance.
First Question Will be ,Why you would like to compile alfresco source code?Are you aware that We can do many customization without customizing alfresco source code.
Above was only for your information.
First try to compile it without using eclipse.Due to that you are facing error.
If still problem persist, remove dependencies from your .m2 directory of your maven and make maven download this dependencies again.If you face similar error again for different jar than remove it from .m2 and again fire clean install command.
This will definitely solve your problem.
It may be that , above mentioned error is listing your all corrupted jar files so remove first and try it again

Could not resolve dependencies while building in Maven

Hi I am trying to build a maven project.
After building initial projects successfully, its failing. The error shows that it failed to collect dependency from a particular location in the local repository.
When I went to that location the jar files are missing in it. So I guess it is supposed to download from the remote repository.
I am wondering whether it fails to download or I am getting anything wrong? Also a few posts suggest to delete the .m2 folder. Will that cause any problems or am I suppose to delete the few folders in it?
Thanks
Try to force update dependencies with the switch -U. At least you can be sure that it is not because of your local error in .m2.

Categories

Resources