[ http://jira.codehaus.org/browse/MNGECLIPSE-129?page=comments#action_67382 
] 

Marek Bieganski commented on MNGECLIPSE-129:
--------------------------------------------

I found out, that maven2 does not obtain type from parent. It uses "jar" as 
default value.
When dependency type in child project (default "jar" in my case) is different 
from depency type in parent pom (in my case "ejb"), dependency is not matched 
so child dependency version is null and child pom is invalid.

Maven 2.x Extension for Eclipse is not a source of problem. 
It seems, that dependency types different than "jar" have to be redeclared in 
child projects.

Question is why handleProjectBuildingException method completely ignores 
information from validationResult?

Shouldn't it contain:

      } else if( cause instanceof InvalidProjectModelException) {
        InvalidProjectModelException pex = ( InvalidProjectModelException ) 
cause;
        String msg = Messages.getString("plugin.markerBuildError") + 
pex.getMessage() + ": " + pex.getValidationResult().toString();
        Maven2Plugin.getDefault().addMarker(this.file, msg, 1, 
IMarker.SEVERITY_ERROR); //$NON-NLS-1$
        Maven2Plugin.getDefault().getConsole().logError( msg);
      } else {





> dependency type from parent pom
> -------------------------------
>
>          Key: MNGECLIPSE-129
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-129
>      Project: Maven 2.x Extension for Eclipse
>         Type: Bug

>   Components: Dependency Resolver
>     Versions: 0.0.9
>  Environment: Eclipse: 3.1.1
>     Reporter: Marek Bieganski
>     Assignee: Eugene Kuleshov
>     Priority: Minor

>
>
> My pom contains dependencies like:
> <parent>
>   <artifactId>xxx-parent</artifactId>
>   <groupId>com.xxx</groupId>
>   <version>HEAD-SNAPSHOT</version>
> </parent>
> ...
> <dependency>
>   <groupId>com.xxx</groupId>
>   <artifactId>yyy</artifactId>
> </dependency>
> xxx-parent pom contains full yyy dependency info:
> <dependency>
>   <groupId>com.xxx</groupId>
>   <artifactId>yyy</artifactId>
>   <version>HEAD-SNAPSHOT</version>
>   <type>ejb</type>
> </dependency> 
> Problem occurs when <type>ejb</type> is declared in parent pom, and no <type> 
> is declared in child pom.
> Only error message i got is:
> 06-05-30 15:32:49 CEST: Project build error Failed to validate POM
> Workaround is to redeclare <type>ejb</type> in child pom, but AFAIK if no 
> type is declared, it should be inherited from parent

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to