maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Fedorenko (JIRA)" <j...@codehaus.org>
Subject [jira] Updated: (MNG-4041) embedder returns stale maven project state
Date Fri, 05 Jun 2009 02:40:42 GMT

     [ http://jira.codehaus.org/browse/MNG-4041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Igor Fedorenko updated MNG-4041:
--------------------------------

    Attachment: MNG-4041.diff

Attached replaces MavenProject cache with two simpler (relatively speaking) caches -- maven
metadata source and pluginDescriptor/pluginRealm. It also defers plugin dependency resolution,
plugin realm construction and component discovery until mojo execution. This eliminates unnecessary
artifact resolution and classloading overhead for plugins that are never used (site plugin
during clean/install build, for example). The patch is against maven trunk.

> embedder returns stale maven project state
> ------------------------------------------
>
>                 Key: MNG-4041
>                 URL: http://jira.codehaus.org/browse/MNG-4041
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Embedding
>    Affects Versions: 3.0-alpha-2
>            Reporter: Igor Fedorenko
>             Fix For: 3.0-alpha-3
>
>         Attachments: MNG-4041.diff, staleproject.zip
>
>
> Embedder returns stale maven project state after project's pom.xml changed and re-read.
This is extremely common scenario when using embedder in IDE like m2e. See attached sample
project that demonstrates one of many possible ways to trigger this problem.
> The problem appears to be related to static (!) MavenProject cache in DefaultMavenProjectBuilder,
which means that even recreating embedder instance is not going to purge state cache entries.
> Also note that using artifact#getId does not provide enough context to uniquely identify
cached MavenProject instances. This is particularly true for IDEs where the same embedder
instance is likely to be used to process unrelated projects. Cached MavenProject instances
should be identified at least by the following attributes
> * project artifact id
> * values of all properties
> * all active profiles
> * content of all pom.xml files directly and indirectly involved in construction of maven
project instance
> * IDE specific state, like m2e "enable workspace dependency resolution"
> * likely more...

-- 
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

        

Mime
View raw message