Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 463440 - eclipse shows error that building workspace has error while saving a file - file is saved
Summary: eclipse shows error that building workspace has error while saving a file - f...
Status: CLOSED DUPLICATE of bug 445122
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-30 08:16 EDT by Manoj MA CLA
Modified: 2021-04-19 13:25 EDT (History)
5 users (show)

See Also:


Attachments
.log file (178.97 KB, application/octet-stream)
2015-03-31 05:06 EDT, Manoj MA CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manoj MA CLA 2015-03-30 08:16:56 EDT
I am using Eclipse luna. version 4.4.1.While trying to save any modification in any java files i am getting workspace save error.Here is the error message i am getting:

Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'AutomationMtt'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Comment 1 Sarika Sinha CLA 2015-03-31 04:56:49 EDT
This looks like a bug in Maven Project builder but should not fail the save.

Can you provide the detailed steps to reproduce this failure ?
Attaching the .log file generated during this failure will help.
Comment 2 Manoj MA CLA 2015-03-31 05:06:31 EDT
Created attachment 252028 [details]
.log file

I could not remember the exact steps.May be the below description will be give you some insights.

Installed the mentioned  eclipse version on my machine.Added external lib files uiautomator.jar and android jar files. (Please note that my intention was that to use eclipse as a java script dev tool and google uiAutomator for automating my mobile apps. and finally use jsystem and integrate it with eclipse and then run my script.).

When i try to save my workspace i am getting the error,Attaching.log file for your reference
Comment 3 Sarika Sinha CLA 2015-03-31 05:17:10 EDT
Are the files getting saved after this exception ? The problem is with only java files or any/all file in the project/workspace?
Comment 4 Manoj MA CLA 2015-03-31 05:20:14 EDT
Yes, files are getting saved.And problem happens with any files in workspace.Not specific to java files.
Comment 5 Dani Megert CLA 2015-03-31 06:41:14 EDT
> org.eclipse.core.runtime.CoreException: Could not calculate build plan: Plugin > org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies > could not be resolved: Failed to read artifact descriptor for 
> org.apache.maven.plugins:maven-resources-plugin:jar:2.6
>	at 
> org.eclipse.m2e.core.internal.embedder.MavenImpl.setupMojoExecution(MavenImpl.java:407)

The m2e Maven Builder throws the exception during build.
Comment 6 Igor Fedorenko CLA 2015-03-31 07:23:55 EDT
Can you confirm you are getting this behaviour for non-m2e projects?

From the log, it appears your system is not able to connect to internet for some reason so m2e is not able to download artifacts necessary to perform workspace build. This is expected behaviour in offline mode for projects with m2e nature and builder, but obviously should not happen for non-m2e projects.
Comment 7 Manoj MA CLA 2015-03-31 07:41:45 EDT
My eclipse knowledge is limited. If u mean to say disabling maven nature for a project  as non m2e,then  i am getting a different error after that.please find it below:

Errors occurred during the build.
Errors running builder 'Integrated External Tool Builder' on project 'AutomationMtt'.
The builder launch configuration could not be found.
The builder launch configuration could not be found.




Also please let me know the work around required so that the artifacts will be downloaded properly. Note that my machine is always connected to internet via proxy. Do i need to change my settings.xml file with the proxy details ?.If so i already made changes to it.
Comment 8 Igor Fedorenko CLA 2015-03-31 07:56:59 EDT
If you import projects into Eclipse workspace as "existing maven projects" or related "maven" import wizards, you are using m2e and observed behaviour is expected when m2e is not able to connect to remote artifact repositories.

You most likely need to change your user settings.xml. Generally, if you are able to build your projects on command line, m2e is expected to work too, so I suggest you make command line build work first (and ask on maven users mailing list if you have questions). 

If command line build works but m2e does not, then I will need to know your network environment details to help you troubleshoot this. Please note that m2e does not currently work with NTLM proxies and there are no immediate plans to support such environments unless a quality patch is provided.
Comment 9 Manoj MA CLA 2015-03-31 08:14:17 EDT
Thanks Igor for that info.I tried running eclipsec command for running command line version.i see the below output after running it.

C:\eclipse\eclipse>eclipsec.exe -noSplash "C:\eclipse\workspace\AutomationMtt" -
application org.eclipse.jdt.apt.core.aptBuild
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration
 bundle was activated before the state location was initialized.  Will retry aft
er the state location is initialized.
org.eclipse.m2e.logback.configuration: Logback config file: C:\Users\testuser\wo
rkspace\.metadata\.plugins\org.eclipse.m2e.logback.configuration\logback.1.5.0.2
0140606-0033.xml
org.eclipse.m2e.logback.configuration: Initializing logback
java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfigu
ration$1 cannot be cast to java.lang.String
        at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(Log
Helper.java:26)
        at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(Log
Plugin.java:189)
        at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogP
lugin.java:144)
        at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.ja
va:107)
        at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:
62)
        at java.util.TimerThread.mainLoop(Unknown Source)
        at java.util.TimerThread.run(Unknown Source)
Building workspace
Building '/TestProject'
Invoking 'Java Builder' on '/TestProject'.
Cleaning output folder for TestProject
Build done
Building workspace
Building '/TestProject'
Invoking 'Java Builder' on '/TestProject'.
Preparing to build TestProject
Cleaning output folder for TestProject
Copying resources to the output folder
Analyzing sources
Compiling TestProject/src
Build done

C:\eclipse\eclipse>



Let me know am i doing anything wrong here. I got the reference after searching in web.
And how can i identify that my internet service is using an NTLM proxy?
Comment 10 Igor Fedorenko CLA 2015-03-31 08:21:34 EDT
By "command line build" I meant build the project with command line maven (i.e. 'mvn' command).

Please ask you network administrator or internet service provide to find type of network proxy used in your environment.
Comment 11 Fred Bricon CLA 2015-03-31 08:56:07 EDT
This is a known issue (bug #445122) that was fixed in Eclipse 4.4.2 (Luna SR2). 

You can find the latest release https://www.eclipse.org/downloads/

*** This bug has been marked as a duplicate of bug 445122 ***
Comment 12 Denis Roy CLA 2021-04-19 13:25:52 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/