Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] order of configuration

Does the end result work for the users like it should, i.e. everything
is configured properly right after a project is imported?

I've opened bug 349391 to track poor error message.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=349391


--
Regards,
Igor

On 11-06-15 6:24 AM, Benson Margulies wrote:
Here's the situation. The PMD eclipse plugin looks to see if the
project has 'java nature'. if it doesn't, it throws. When it throws,
m2e does a series of unhelpful things culminating in a totally
mysterious dialog box. The problem is that the M2EErrorDialog.java
class doesn't render any information from the exceptions, so one ends
up with a bland 'something went wrong' that doesn't even point to a
particular plugin, let alone an explanation.

I was able to work around this by checking for java nature and just
returning false from the PMD configurator. The result seems to be that
m2e says to itself, 'OK, let's try this later.' and it does, and it
succeeds.

Is this all intended? Or should I go ahead with the secondary business?


On Tue, Jun 14, 2011 at 1:59 PM, Igor Fedorenko<igor@xxxxxxxxxxxxxx>  wrote:
How much java configuration does PMD configurator need to work? If it's
just java nature, it is fairly trivial to add it from your code and m2e
jdt configuration should be able to setup classpath and make any other
configuration changes later on.

If pmd configurator requires complete java project settings, then there
is no nice way to do this in m2e 1.0.0. Less nice way is to define your
project configurator as secondary for maven-compiler-plugin and match
pmd-configuration manually in your code. Secondary mapping is guaranteed
to run after jdt configurator, when java project is fully configured
already.

--
Regards,
Igor

On 11-06-08 10:04 PM, Benson Margulies wrote:

My mystery of the day unfolds as follows.

m2e-core calls my PMD configurator when there is no java nature present.

It explodes because it requires a java nature.

The whole process stops.

Is there something I'm supposed to do to get the order right?



13:59:52.314 [Worker-13] ERROR o.e.m.c.i.p.ProjectConfigurationManager
- Problems encountered while setting project description.
org.eclipse.core.runtime.CoreException: Problems encountered while
setting project description.
        at
org.eclipse.core.internal.resources.Project.setDescription(Project.java:1349)
~[org.eclipse.core.resources_3.7.100.v20110510-0712.jar:na]
        at
org.eclipse.core.internal.resources.Project.setDescription(Project.java:1376)
~[org.eclipse.core.resources_3.7.100.v20110510-0712.jar:na]
        at
net.sourceforge.pmd.eclipse.runtime.builder.PMDNature.addPMDNature(Unknown
Source) ~[na:na]
        at
com.basistech.m2e.code.quality.pmd.EclipsePmdProjectConfigurator.addPMDNature(EclipsePmdProjectConfigurator.java:103)
~[na:na]
        at
com.basistech.m2e.code.quality.pmd.EclipsePmdProjectConfigurator.handleProjectConfigurationChange(EclipsePmdProjectConfigurator.java:99)
~[na:na]
        at
com.basistech.m2e.code.quality.shared.AbstractMavenPluginProjectConfigurator.mavenProjectChanged(AbstractMavenPluginProjectConfigurator.java:145)
~[na:na]
        at
org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.mavenProjectChanged(ProjectConfigurationManager.java:753)
[org.eclipse.m2e.core/:na]
        at
org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.notifyProjectChangeListeners(ProjectRegistryManager.java:724)
[org.eclipse.m2e.core/:na]
        at
org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.applyMutableProjectRegistry(ProjectRegistryManager.java:847)
[org.eclipse.m2e.core/:na]
        at
org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:280)
[org.eclipse.m2e.core/:na]
        at
org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:280)
[org.eclipse.m2e.core/:na]
        at
org.eclipse.m2e.core.ui.internal.UpdateConfigurationJob.runInWorkspace(UpdateConfigurationJob.java:87)
[org.eclipse.m2e.core.ui/:na]
        at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
[org.eclipse.core.resources_3.7.100.v20110510-0712.jar:na]
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
[org.eclipse.core.jobs_3.5.100.v20110404.jar:na]


Back to the top