stable dev build 0.9.6.20080731-1407 is published [message #13645] |
Thu, 31 July 2008 17:03  |
Eclipse User |
|
|
|
We have published stable development build 0.9.6.20080731-1407. You
can install it from the dev update site at
http://m2eclipse.sonatype.org/update-dev/
This build includes number of bug fixes for the Form-based POM editor.
See list of fixed issues in JIRA at http://tinyurl.com/6rhdwr
We made performance improvements for Eclipse startup. Now state of
resolved dependencies is persisted and then loaded on Eclipse startup,
which allowed to skip costly Maven dependency resolution. Note that if
you'll make changes in your projects while Eclipse were down, saved
state will be out of sync and you will need to manually force update for
Maven dependencies, either from project Maven menu for selected
projects, of globally for all projects using the "Update All Maven
dependencies" action from main Project menu.
There is also few new features, such as SCM handler and UI for Eclipse
Team CVS, filter in the Package Explorer view for Maven modules and
working set support in all wizards. You can see complete New and
Noteworthy features for this and previous builds on the wiki at
http://docs.codehaus.org/display/M2ECLIPSE/New+and+Noteworth y
As always, we would like to hear your feedback. Please don't hesitate
to share your thoughts in the news group and mailing lists, submit bug
reports to the project issue tracker [1] and contribute to project
documentation on the wiki [2].
Thanks
m2eclipse team
[1] http://jira.codehaus.org/browse/MNGECLIPSE
[2] http://docs.codehaus.org/display/M2ECLIPSE
|
|
|
|
|
Re: How to enable maven dependencies programmatically [message #13749 is a reply to message #13708] |
Fri, 01 August 2008 23:27  |
Eclipse User |
|
|
|
Originally posted by: chingyichan.tw.gmail.com
Igor Fedorenko 提到:
> Have a look at
>
> org.maven.ide.eclipse.project.IProjectConfigurationManager#e nableMavenNature
>
>
> The most basic way to use it is
>
> IProjectConfigurationManager configurationManager =
> MavenPlugin.getDefault().getProjectConfigurationManager();
> ResolverConfiguration configuration = new ResolverConfiguration();
> configurationManager.enableMavenNature(project, configuration, monitor);
>
> chingyichan wrote:
>> Hello,
>>
>> I create a plugin to create the java project which contains the
>> pom.xml file. User can make choice to enable maven dependencies.
>> How do I do to make it in programmatic way ?
>>
Thanks a lot. It work well !
I check out the source code, and extract some codes to make a method:
/**
* enable project maven dependency management
* @param project the project must has pom.xml
* @throws CoreException
*/
private void enableMavenDependencyManagement(IProject project)
throws CoreException {
ResolverConfiguration configuration = new ResolverConfiguration();
configuration.setIncludeModules(false);
configuration.setResolveWorkspaceProjects(true);
configuration.setActiveProfiles("");
boolean hasMavenNature = project.hasNature(IMavenConstants.NATURE_ID);
IProjectConfigurationManager configurationManager = MavenPlugin
.getDefault().getProjectConfigurationManager();
configurationManager.enableMavenNature(project, configuration,
UIUtilz.NULL_PROGRESS_MONITOR);
if (!hasMavenNature) {
configurationManager.updateProjectConfiguration(project,
configuration, MavenPlugin.getDefault()
.getMavenRuntimeManager().getGoalOnUpdate(),
new NullProgressMonitor());
}
}
|
|
|
Powered by
FUDForum. Page generated in 0.09740 seconds