Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 50576 Details for
Bug 154251
[modulecore] Maven2 Integration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
A patch for the trunk of the M2Eclipse plugin that is needed for the org.maven.eclipse.ide.wtp plugin
m2eclipse-wtp.patch (text/plain), 67.67 KB, created by
Philip Dodds
on 2006-09-20 12:43:47 EDT
(
hide
)
Description:
A patch for the trunk of the M2Eclipse plugin that is needed for the org.maven.eclipse.ide.wtp plugin
Filename:
MIME Type:
Creator:
Philip Dodds
Created:
2006-09-20 12:43:47 EDT
Size:
67.67 KB
patch
obsolete
>Index: C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/actions/DisableNatureAction.java >=================================================================== >--- C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/actions/DisableNatureAction.java (revision 146) >+++ C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/actions/DisableNatureAction.java (working copy) >@@ -1,24 +1,16 @@ > > package org.maven.ide.eclipse.actions; > >-import java.util.ArrayList; > import java.util.Iterator; > > import org.eclipse.core.resources.IProject; >-import org.eclipse.core.resources.IProjectDescription; >-import org.eclipse.core.resources.IResource; >-import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IAdaptable; >-import org.eclipse.jdt.core.IClasspathEntry; >-import org.eclipse.jdt.core.IJavaProject; >-import org.eclipse.jdt.core.JavaCore; > import org.eclipse.jface.action.IAction; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.ui.IObjectActionDelegate; > import org.eclipse.ui.IWorkbenchPart; >-import org.maven.ide.eclipse.Maven2Plugin; >-import org.maven.ide.eclipse.container.Maven2ClasspathContainer; >+import org.maven.ide.eclipse.project.MavenEclipseProject; > > > public class DisableNatureAction implements IObjectActionDelegate { >@@ -42,7 +34,7 @@ > project = (IProject) ((IAdaptable) element).getAdapter(IProject.class); > } > if(project != null) { >- disableNature(project, structuredSelection.size() == 1); >+ MavenEclipseProject.enableNature(project); > } > } > } >@@ -66,39 +58,4 @@ > this.targetPart = targetPart; > } > >- private void disableNature(IProject project, boolean isSingle) { >- try { >- project.deleteMarkers(Maven2Plugin.MARKER_ID, true, IResource.DEPTH_INFINITE); >- >- IProjectDescription description = project.getDescription(); >- String[] natures = description.getNatureIds(); >- ArrayList newNatures = new ArrayList(); >- for(int i = 0; i < natures.length; ++i) { >- if(!Maven2Plugin.NATURE_ID.equals(natures[i])) { >- newNatures.add(natures[i]); >- } >- } >- description.setNatureIds((String[]) newNatures.toArray(new String[newNatures.size()])); >- project.setDescription(description, null); >- >- IJavaProject javaProject = JavaCore.create(project); >- if(javaProject != null) { >- // remove classpatch container from JavaProject >- IClasspathEntry[] entries = javaProject.getRawClasspath(); >- ArrayList newEntries = new ArrayList(); >- for(int i = 0; i < entries.length; i++ ) { >- if(!Maven2ClasspathContainer.isMaven2ClasspathContainer(entries[i].getPath())) { >- newEntries.add(entries[i]); >- } >- } >- javaProject.setRawClasspath((IClasspathEntry[]) newEntries.toArray(new IClasspathEntry[newEntries.size()]), null); >- } >- >- } catch(CoreException ex) { >- Maven2Plugin.getDefault().getConsole().logError("Can't disable nature " + ex.toString()); >- Maven2Plugin.log(ex); >- >- } >- } >- > } >Index: C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/actions/EnableNatureAction.java >=================================================================== >--- C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/actions/EnableNatureAction.java (revision 146) >+++ C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/actions/EnableNatureAction.java (working copy) >@@ -1,20 +1,11 @@ > > package org.maven.ide.eclipse.actions; > >-import java.util.ArrayList; >-import java.util.HashSet; > import java.util.Iterator; > > import org.eclipse.core.resources.IFile; > import org.eclipse.core.resources.IProject; >-import org.eclipse.core.resources.IProjectDescription; >-import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IAdaptable; >-import org.eclipse.core.runtime.Path; >-import org.eclipse.jdt.core.IClasspathContainer; >-import org.eclipse.jdt.core.IClasspathEntry; >-import org.eclipse.jdt.core.IJavaProject; >-import org.eclipse.jdt.core.JavaCore; > import org.eclipse.jface.action.IAction; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.IStructuredSelection; >@@ -25,8 +16,7 @@ > import org.eclipse.ui.IWorkbench; > import org.eclipse.ui.IWorkbenchPart; > import org.maven.ide.eclipse.Maven2Plugin; >-import org.maven.ide.eclipse.container.Maven2ClasspathContainer; >-import org.maven.ide.eclipse.container.Maven2ClasspathContainerInitializer; >+import org.maven.ide.eclipse.project.MavenEclipseProject; > import org.maven.ide.eclipse.wizards.Maven2PomWizard; > > >@@ -37,19 +27,19 @@ > * (non-Javadoc) > * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) > */ >- public void run( IAction action) { >- if( selection instanceof IStructuredSelection) { >- IStructuredSelection structuredSelection = ( IStructuredSelection) selection; >- for( Iterator it = structuredSelection.iterator(); it.hasNext();) { >+ public void run(IAction action) { >+ if(selection instanceof IStructuredSelection) { >+ IStructuredSelection structuredSelection = (IStructuredSelection) selection; >+ for(Iterator it = structuredSelection.iterator(); it.hasNext();) { > Object element = it.next(); > IProject project = null; >- if( element instanceof IProject) { >- project = ( IProject) element; >- } else if( element instanceof IAdaptable) { >- project = ( IProject) (( IAdaptable) element).getAdapter( IProject.class); >+ if(element instanceof IProject) { >+ project = (IProject) element; >+ } else if(element instanceof IAdaptable) { >+ project = (IProject) ((IAdaptable) element).getAdapter(IProject.class); > } >- if( project != null) { >- enableNature( project, structuredSelection.size()==1); >+ if(project != null) { >+ enableNature(project, structuredSelection.size() == 1); > } > } > } >@@ -60,7 +50,7 @@ > * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, > * org.eclipse.jface.viewers.ISelection) > */ >- public void selectionChanged( IAction action, ISelection selection) { >+ public void selectionChanged(IAction action, ISelection selection) { > this.selection = selection; > } > >@@ -69,75 +59,28 @@ > * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, > * org.eclipse.ui.IWorkbenchPart) > */ >- public void setActivePart( IAction action, IWorkbenchPart targetPart) { >+ public void setActivePart(IAction action, IWorkbenchPart targetPart) { > } > >- private void enableNature( IProject project, boolean isSingle) { >- try { >- IFile pom = project.getFile( Maven2Plugin.POM_FILE_NAME); >- if( isSingle && !pom.exists()) { >- Maven2PomWizard wizard = new Maven2PomWizard(); >- >- Maven2Plugin plugin = Maven2Plugin.getDefault(); >- IWorkbench workbench = plugin.getWorkbench(); >- wizard.init(workbench, (IStructuredSelection) selection); >- >- Shell shell = workbench.getActiveWorkbenchWindow().getShell(); >- WizardDialog wizardDialog = new WizardDialog( shell, wizard); >- wizardDialog.create(); >- wizardDialog.getShell().setText("Create new POM"); >- if(wizardDialog.open()==Window.CANCEL) { >- return; >- } >- } >+ private void enableNature(IProject project, boolean isSingle) { >+ IFile pom = project.getFile(Maven2Plugin.POM_FILE_NAME); >+ if(isSingle && !pom.exists()) { >+ Maven2PomWizard wizard = new Maven2PomWizard(); > >- >- >- ArrayList newNatures = new ArrayList(); >- newNatures.add(JavaCore.NATURE_ID); >- newNatures.add(Maven2Plugin.NATURE_ID); >- >- IProjectDescription description = project.getDescription(); >- String[] natures = description.getNatureIds(); >- for(int i = 0; i < natures.length; ++i) { >- String id = natures[i]; >- if(!Maven2Plugin.NATURE_ID.equals(id) && !JavaCore.NATURE_ID.equals(natures[i])) { >- newNatures.add(natures[i]); >- } >- } >- description.setNatureIds((String[]) newNatures.toArray(new String[newNatures.size()])); >- project.setDescription(description, null); >- >- IJavaProject javaProject = JavaCore.create(project); >- if(javaProject!=null) { >- IClasspathContainer maven2ClasspathContainer = Maven2ClasspathContainerInitializer.getMaven2ClasspathContainer(javaProject); >- IClasspathEntry[] containerEntries = maven2ClasspathContainer.getClasspathEntries(); >- HashSet containerEntrySet = new HashSet(); >- for(int i = 0; i < containerEntries.length; i++ ) { >- containerEntrySet.add(containerEntries[i].getPath().toString()); >- } >- >- // remove classpath container from JavaProject >- IClasspathEntry[] entries = javaProject.getRawClasspath(); >- ArrayList newEntries = new ArrayList(); >- for( int i = 0; i < entries.length; i++) { >- IClasspathEntry entry = entries[i]; >- if(!Maven2ClasspathContainer.isMaven2ClasspathContainer(entry.getPath()) && >- !containerEntrySet.contains(entry.getPath().toString())) { >- newEntries.add(entry); >- } >- } >- newEntries.add(JavaCore.newContainerEntry(new Path(Maven2Plugin.CONTAINER_ID))); >+ Maven2Plugin plugin = Maven2Plugin.getDefault(); >+ IWorkbench workbench = plugin.getWorkbench(); >+ wizard.init(workbench, (IStructuredSelection) selection); > >- javaProject.setRawClasspath((IClasspathEntry[]) newEntries.toArray(new IClasspathEntry[newEntries.size()]), null); >+ Shell shell = workbench.getActiveWorkbenchWindow().getShell(); >+ WizardDialog wizardDialog = new WizardDialog(shell, wizard); >+ wizardDialog.create(); >+ wizardDialog.getShell().setText("Create new POM"); >+ if(wizardDialog.open() == Window.CANCEL) { >+ return; > } >- >- } catch( CoreException ex) { >- Maven2Plugin.getDefault().getConsole().logError( "Can't enable nature "+ex.toString() ); >- Maven2Plugin.log(ex); >- > } >+ >+ MavenEclipseProject.enableNature(project); > } > > } >- >Index: C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/actions/UpdateSourcesAction.java >=================================================================== >--- C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/actions/UpdateSourcesAction.java (revision 146) >+++ C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/actions/UpdateSourcesAction.java (working copy) >@@ -1,434 +1,47 @@ > > package org.maven.ide.eclipse.actions; > >-import java.io.File; >-import java.util.ArrayList; >-import java.util.Arrays; >-import java.util.HashMap; >-import java.util.HashSet; > import java.util.Iterator; >-import java.util.List; >-import java.util.Map; >-import java.util.Properties; >-import java.util.Set; >-import java.util.jar.Attributes; >-import java.util.jar.JarFile; >-import java.util.jar.Manifest; > >-import org.apache.maven.SettingsConfigurationException; >-import org.apache.maven.embedder.MavenEmbedder; >-import org.apache.maven.execution.DefaultMavenExecutionRequest; >-import org.apache.maven.execution.MavenExecutionRequest; >-import org.apache.maven.model.Plugin; >-import org.apache.maven.model.Resource; >-import org.apache.maven.project.MavenProject; >-import org.apache.maven.settings.Settings; >- >-import org.codehaus.plexus.util.xml.Xpp3Dom; >-import org.eclipse.core.resources.IContainer; >-import org.eclipse.core.resources.IFile; > import org.eclipse.core.resources.IProject; >-import org.eclipse.core.resources.IResource; > import org.eclipse.core.runtime.IAdaptable; >-import org.eclipse.core.runtime.IPath; >-import org.eclipse.core.runtime.IProgressMonitor; >-import org.eclipse.core.runtime.IStatus; >-import org.eclipse.core.runtime.OperationCanceledException; >-import org.eclipse.core.runtime.Path; >-import org.eclipse.core.runtime.Status; >-import org.eclipse.core.runtime.SubProgressMonitor; >-import org.eclipse.core.runtime.jobs.Job; >-import org.eclipse.jdt.core.IClasspathEntry; >-import org.eclipse.jdt.core.IJavaProject; >-import org.eclipse.jdt.core.JavaCore; >-import org.eclipse.jdt.launching.IVMInstall; >-import org.eclipse.jdt.launching.IVMInstallType; >-import org.eclipse.jdt.launching.JavaRuntime; >-import org.eclipse.jdt.launching.LibraryLocation; > import org.eclipse.jface.action.IAction; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.ui.IObjectActionDelegate; > import org.eclipse.ui.IWorkbenchPart; >-import org.maven.ide.eclipse.Maven2Plugin; >-import org.maven.ide.eclipse.MavenEmbedderCallback; >-import org.maven.ide.eclipse.PluginConsoleEventMonitor; >-import org.maven.ide.eclipse.TransferListenerAdapter; >-import org.maven.ide.eclipse.preferences.Maven2PreferenceConstants; >+import org.maven.ide.eclipse.project.MavenEclipseProject; > > > public class UpdateSourcesAction implements IObjectActionDelegate { > // private IAction action; > // private IWorkbenchPart targetPart; > private ISelection selection; >- > >- public void setActivePart( IAction action, IWorkbenchPart targetPart ) { >+ public void setActivePart(IAction action, IWorkbenchPart targetPart) { > // this.action = action; > // this.targetPart = targetPart; > } > >- public void selectionChanged( IAction action, ISelection selection ) { >+ public void selectionChanged(IAction action, ISelection selection) { > // this.action = action; > this.selection = selection; > } > >- >- public void run( IAction action ) { >- IStructuredSelection structuredSelection = ( IStructuredSelection ) selection; >- for( Iterator it = structuredSelection.iterator(); it.hasNext(); ) { >+ public void run(IAction action) { >+ IStructuredSelection structuredSelection = (IStructuredSelection) selection; >+ for(Iterator it = structuredSelection.iterator(); it.hasNext();) { > Object element = it.next(); > IProject project = null; >- if( element instanceof IProject ) { >- project = ( IProject ) element; >- } else if( element instanceof IAdaptable ) { >- project = ( IProject ) ( ( IAdaptable ) element ).getAdapter( IProject.class ); >+ if(element instanceof IProject) { >+ project = (IProject) element; >+ } else if(element instanceof IAdaptable) { >+ project = (IProject) ((IAdaptable) element).getAdapter(IProject.class); > } >- if( project != null ) { >- new UpdateSourcesJob( project).schedule(); >+ if(project != null) { >+ MavenEclipseProject.scheduleUpdateSources(project); > } > } > } > >- >- private static final class UpdateSourcesJob extends Job implements MavenEmbedderCallback { >- private final IProject project; >- >- private Set sources = new HashSet(); >- private List sourceEntries = new ArrayList(); >- private Map options = new HashMap(); >- >- UpdateSourcesJob( IProject project) { >- super( "Updating "+project.getName()+" Sources"); >- this.project = project; >- } >- >- protected IStatus run( IProgressMonitor monitor ) { >- IFile pom = project.getFile(Maven2Plugin.POM_FILE_NAME); >- if( !pom.exists()) { >- return Status.OK_STATUS; >- } >- >- monitor.beginTask( "Updating sources "+project.getName(), IProgressMonitor.UNKNOWN ); >- try { >- Maven2Plugin.getDefault().executeInEmbedder(this, monitor); >- >- // TODO optimize project refresh >- monitor.subTask( "Refreshing" ); >- project.refreshLocal( IResource.DEPTH_INFINITE, new SubProgressMonitor( monitor, 1) ); >- >- monitor.subTask( "Configuring Build Path" ); >- IJavaProject javaProject = JavaCore.create(project); >- >- setOption( javaProject, options, JavaCore.COMPILER_COMPLIANCE ); >- setOption( javaProject, options, JavaCore.COMPILER_SOURCE); >- setOption( javaProject, options, JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM); >- >- String source = ( String ) options.get( JavaCore.COMPILER_SOURCE ); >- if(source==null) { >- sourceEntries.add( JavaRuntime.getDefaultJREContainerEntry() ); >- } else { >- sourceEntries.add( getJREContainer( source ) ); >- } >- >- IClasspathEntry[] currentClasspath = javaProject.getRawClasspath(); >- for( int i = 0; i < currentClasspath.length; i++ ) { >- // Delete all non container (e.g. JRE library) entries. See MNGECLIPSE-9 >- IClasspathEntry entry = currentClasspath[i]; >- if( entry.getEntryKind()==IClasspathEntry.CPE_CONTAINER ) { >- if( !JavaRuntime.JRE_CONTAINER.equals( entry.getPath().segment( 0 ) )) { >- sourceEntries.add( entry); >- } >- } >- } >- >- IClasspathEntry[] entries = ( IClasspathEntry[] ) sourceEntries.toArray( new IClasspathEntry[ sourceEntries.size()]); >- javaProject.setRawClasspath(entries, monitor); >- >- Maven2Plugin.getDefault().getConsole().logMessage("Updated source folders for project "+project.getName()); >- >- } catch( Exception ex ) { >- String msg = "Unable to update source folders "+project.getName()+"; " +ex.toString(); >- Maven2Plugin.getDefault().getConsole().logMessage( msg ); >- // Maven2Plugin.log( msg, ex); >- } finally { >- monitor.done(); >- } >- >- return Status.OK_STATUS; >- } >- >- private void setOption( IJavaProject javaProject, Map options, String name ) { >- String newValue = ( String ) options.get( name ); >- if(newValue==null) { >- return; >- } >- String currentValue = javaProject.getOption( name, false ); >- if(!newValue.equals( currentValue )) { >- javaProject.setOption( name, newValue ); >- } >- } >- >- private IClasspathEntry getJREContainer( String version ) { >- int n = VERSIONS.indexOf( version ); >- if(n>-1) { >- Map jreContainers = getJREContainers(); >- for( int i = n; i < VERSIONS.size(); i++ ) { >- IClasspathEntry entry = ( IClasspathEntry ) jreContainers.get( version ); >- if(entry!=null) { >- Maven2Plugin.getDefault().getConsole().logMessage( "JRE compliant to "+version+". "+entry ); >- return entry; >- } >- } >- } >- IClasspathEntry entry = JavaRuntime.getDefaultJREContainerEntry(); >- Maven2Plugin.getDefault().getConsole().logMessage( "No JRE compliant to "+version+". Using default JRE container "+entry ); >- return entry; >- } >- >- private Map getJREContainers() { >- Map jreContainers = new HashMap(); >- >- jreContainers.put( getJREVersion( JavaRuntime.getDefaultVMInstall() ), JavaRuntime.getDefaultJREContainerEntry()); >- >- IVMInstallType[] installTypes = JavaRuntime.getVMInstallTypes(); >- for( int i = 0; i < installTypes.length; i++ ) { >- IVMInstall[] installs = installTypes[i].getVMInstalls(); >- for( int j = 0; j < installs.length; j++ ) { >- IVMInstall install = installs[j]; >- String version = getJREVersion(install); >- if(!jreContainers.containsKey( version )) { >- // in Eclipse 3.2 one could use JavaRuntime.newJREContainerPath(install) >- IPath jreContainerPath = new Path(JavaRuntime.JRE_CONTAINER) >- .append(install.getVMInstallType().getId()) >- .append(install.getName()); >- jreContainers.put(version, JavaCore.newContainerEntry( jreContainerPath )); >- } >- } >- } >- >- return jreContainers; >- } >- >- private String getJREVersion( IVMInstall install ) { >- LibraryLocation[] libraryLocations = JavaRuntime.getLibraryLocations( install ); >- if( libraryLocations != null ) { >- for( int k = 0; k < libraryLocations.length; k++ ) { >- IPath path = libraryLocations[k].getSystemLibraryPath(); >- String jarName = path.lastSegment(); >- if( "rt.jar".equals( jarName ) ) { >- try { >- JarFile jarFile = new JarFile( path.toFile() ); >- Manifest manifest = jarFile.getManifest(); >- Attributes attributes = manifest.getMainAttributes(); >- return attributes.getValue( Attributes.Name.SPECIFICATION_VERSION ); >- } catch( Exception ex ) { >- Maven2Plugin.getDefault().getConsole().logError( "Unable to read "+path+" "+ex.getMessage() ); >- } >- } >- } >- } >- return null; >- } >- >- /** >- * @see MavenEmbedderCallback#run(MavenEmbedder, IProgressMonitor) >- */ >- public Object run( MavenEmbedder mavenEmbedder, IProgressMonitor monitor ) { >- resolve( project.getFile(Maven2Plugin.POM_FILE_NAME), mavenEmbedder, monitor ); >- return null; >- } >- >- private void resolve( IResource pomResource, MavenEmbedder mavenEmbedder, IProgressMonitor monitor ) { >- if(monitor.isCanceled()) { >- throw new OperationCanceledException(); >- } >- >- Maven2Plugin plugin = Maven2Plugin.getDefault(); >- >- String msg = "Reading "+pomResource.getFullPath(); >- plugin.getConsole().logMessage( msg); >- >- monitor.subTask( "Reading "+pomResource.getFullPath() ); >- File pomFile = pomResource.getLocation().toFile(); >- >- MavenProject mavenProject; >- try { >- mavenProject = mavenEmbedder.readProject(pomFile); >- } catch( Exception ex) { >- plugin.getConsole().logError("Unable to read project "+pomResource.getFullPath()+"; "+ex.toString()); >- return; >- } >- >- String source = getBuildOption( mavenProject, "maven-compiler-plugin", "source" ); >- if(source!=null) { >- plugin.getConsole().logMessage( "Setting source compatibility: "+source ); >- setVersion( options, JavaCore.COMPILER_SOURCE, source); >- setVersion( options, JavaCore.COMPILER_COMPLIANCE, source ); >- } >- >- String target = getBuildOption( mavenProject, "maven-compiler-plugin", "target" ); >- if(target!=null) { >- plugin.getConsole().logMessage( "Setting target compatibility: "+source ); >- setVersion( options, JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, target ); >- } >- >- monitor.subTask( "Generating Sources "+pomResource.getFullPath() ); >- try { >- plugin.getConsole().logMessage("Generating sources "+pomResource.getFullPath()); >- >- mavenEmbedder.execute( getExecutionRequest(pomFile, monitor, mavenEmbedder) ); >- // TODO hook up console view >- // EventMonitor eventMonitor = new PluginConsoleEventMonitor(); >- // mavenEmbedder.execute(mavenProject, goals, eventMonitor, transferListener, properties, f.getParentFile()); >- >- } catch( Exception ex ) { >- plugin.getConsole().logError("Failed to run generate source goals "+pomResource.getFullPath()+" "+ex.getMessage()); >- } >- >- File basedir = pomResource.getLocation().toFile().getParentFile(); >- File projectBaseDir = project.getLocation().toFile(); >- >- extractSourceDirs(project, mavenProject.getCompileSourceRoots(), basedir, projectBaseDir); >- extractSourceDirs(project, mavenProject.getTestCompileSourceRoots(), basedir, projectBaseDir); >- >- extractResourceDirs(project, mavenProject.getBuild().getResources(), basedir, projectBaseDir); >- extractResourceDirs(project, mavenProject.getBuild().getTestResources(), basedir, projectBaseDir); >- >- IContainer parent = pomResource.getParent(); >- List modules = mavenProject.getModules(); >- for( Iterator it = modules.iterator(); it.hasNext() && !monitor.isCanceled(); ) { >- if(monitor.isCanceled()) { >- throw new OperationCanceledException(); >- } >- String module = ( String ) it.next(); >- IResource memberPom = parent.findMember( module+"/"+Maven2Plugin.POM_FILE_NAME); //$NON-NLS-1$ >- if(memberPom!=null) { >- resolve(memberPom, mavenEmbedder, monitor); >- } >- } >- } >- >- >- private MavenExecutionRequest getExecutionRequest(File pomFile, IProgressMonitor monitor, MavenEmbedder embedder) throws SettingsConfigurationException { >- List goals = Arrays.asList( "generate-sources,generate-resources,generate-test-sources,generate-test-resources".split(",")); >- >- Properties properties = new Properties(); >- >- File userSettingsPath = embedder.getUserSettingsPath( null ); >- File globalSettingsFile = embedder.getGlobalSettingsPath(); >- >- Settings settings = embedder.buildSettings( >- userSettingsPath, >- globalSettingsFile, >- false, // interactive >- false, // offline, >- false, // usePluginRegistry, >- Boolean.FALSE); // pluginUpdateOverride ); >- >- String localRepositoryPath = System.getProperty(Maven2PreferenceConstants.P_LOCAL_REPOSITORY_DIR); >- if(localRepositoryPath==null || localRepositoryPath.trim().length()==0) { >- localRepositoryPath = embedder.getLocalRepositoryPath( settings ); >- } >- >- MavenExecutionRequest executionRequest = new DefaultMavenExecutionRequest() >- .setPomFile( pomFile.getAbsolutePath() ) >- .setBasedir( pomFile.getParentFile() ) >- .setGoals( goals ) >- .setSettings( settings ) // TODO >- .setProperties( properties ) >- .setLocalRepositoryPath( localRepositoryPath ) >- .setReactorActive( false ) >- .setRecursive( true ) >- .setShowErrors( true ) // TODO >- .setInteractive( false ) >- .setLoggingLevel( MavenExecutionRequest.LOGGING_LEVEL_INFO ) >- .activateDefaultEventMonitor() >- .addEventMonitor( new PluginConsoleEventMonitor() ) >- .setTransferListener( new TransferListenerAdapter( monitor ) ) >- .setFailureBehavior( MavenExecutionRequest.REACTOR_FAIL_AT_END ) >- // .addActiveProfiles( activeProfiles ) >- // .addInactiveProfiles( inactiveProfiles ) >- .setOffline(Boolean.getBoolean(Maven2PreferenceConstants.P_OFFLINE)) >- .setGlobalChecksumPolicy(System.getProperty(Maven2PreferenceConstants.P_GLOBAL_CHECKSUM_POLICY)); >- // .setUpdateSnapshots( updateSnapshots ) // TODO >- ; >- >- return executionRequest; >- } >- >- >- public static final List VERSIONS = Arrays.asList( "1.1,1.2,1.3,1.4,1.5,1.6,1.7".split( "," ) ); >- >- static void setVersion( Map options, String name, String value ) { >- if(value==null) { >- return; >- } >- String current = ( String ) options.get( name ); >- if(current==null) { >- options.put( name, value ); >- } else { >- int oldIndex = VERSIONS.indexOf( current ); >- int newIndex = VERSIONS.indexOf( value.trim() ); >- if(newIndex>oldIndex) { >- options.put( name, value ); >- } >- } >- } >- >- void extractSourceDirs( IProject project, List sourceRoots, File basedir, File projectBaseDir ) { >- for( Iterator it = sourceRoots.iterator(); it.hasNext(); ) { >- String sourceRoot = ( String ) it.next(); >- if( new File( sourceRoot ).isDirectory() ) { >- IResource r = project.findMember(toRelativeAndFixSeparator( projectBaseDir, sourceRoot )); >- if(r!=null && sources.add( r.getFullPath().toString())) { >- sourceEntries.add( JavaCore.newSourceEntry( r.getFullPath() /*, new IPath[] { new Path( "**"+"/.svn/"+"**")} */) ); >- Maven2Plugin.getDefault().getConsole().logMessage( "Adding source folder " + r.getFullPath() ); >- } >- } >- } >- } >- >- void extractResourceDirs(IProject project, List resources, File basedir, File projectBaseDir ) { >- for( Iterator it = resources.iterator(); it.hasNext(); ) { >- Resource resource = ( Resource ) it.next(); >- File resourceDirectory = new File( resource.getDirectory() ); >- if( resourceDirectory.exists() && resourceDirectory.isDirectory() ) { >- IResource r = project.findMember(toRelativeAndFixSeparator( projectBaseDir, resource.getDirectory() )); >- if(r!=null && sources.add( r.getFullPath().toString())) { >- sourceEntries.add( JavaCore.newSourceEntry( r.getFullPath(), new IPath[] { new Path("**") }, r.getFullPath())); //, new IPath[] { new Path( "**"+"/.svn/"+"**")} ) ); >- Maven2Plugin.getDefault().getConsole().logMessage( "Adding resource folder " + r.getFullPath() ); >- } >- } >- } >- } >- >- private String toRelativeAndFixSeparator( File basedir, String absolutePath ) { >- String relative; >- if( absolutePath.equals( basedir.getAbsolutePath() ) ) { >- relative = "."; >- } else if( absolutePath.startsWith( basedir.getAbsolutePath() ) ) { >- relative = absolutePath.substring( basedir.getAbsolutePath().length() + 1 ); >- } else { >- relative = absolutePath; >- } >- return relative.replace( '\\', '/' ); //$NON-NLS-1$ //$NON-NLS-2$ >- } >- >- public static String getBuildOption( MavenProject project, String artifactId, String optionName ) { >- for( Iterator it = project.getModel().getBuild().getPlugins().iterator(); it.hasNext(); ) { >- Plugin plugin = ( Plugin ) it.next(); >- if( artifactId.equals( plugin.getArtifactId() ) ) { >- Xpp3Dom o = ( Xpp3Dom ) plugin.getConfiguration(); >- if( o != null && o.getChild( optionName ) != null ) { >- return o.getChild( optionName ).getValue(); >- } >- } >- } >- return null; >- } >- >- } >- > } >- >Index: C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/project/MavenEclipseProject.java >=================================================================== >--- C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/project/MavenEclipseProject.java (revision 0) >+++ C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/src/org/maven/ide/eclipse/project/MavenEclipseProject.java (revision 0) >@@ -0,0 +1,496 @@ >+ >+package org.maven.ide.eclipse.project; >+ >+import java.io.File; >+import java.util.ArrayList; >+import java.util.Arrays; >+import java.util.HashMap; >+import java.util.HashSet; >+import java.util.Iterator; >+import java.util.List; >+import java.util.Map; >+import java.util.Properties; >+import java.util.Set; >+import java.util.jar.Attributes; >+import java.util.jar.JarFile; >+import java.util.jar.Manifest; >+ >+import org.apache.maven.SettingsConfigurationException; >+import org.apache.maven.embedder.MavenEmbedder; >+import org.apache.maven.execution.DefaultMavenExecutionRequest; >+import org.apache.maven.execution.MavenExecutionRequest; >+import org.apache.maven.model.Plugin; >+import org.apache.maven.model.Resource; >+import org.apache.maven.project.MavenProject; >+import org.apache.maven.settings.Settings; >+ >+import org.codehaus.plexus.util.xml.Xpp3Dom; >+import org.eclipse.core.resources.IContainer; >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.resources.IProjectDescription; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.OperationCanceledException; >+import org.eclipse.core.runtime.Path; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.core.runtime.SubProgressMonitor; >+import org.eclipse.core.runtime.jobs.Job; >+import org.eclipse.jdt.core.IClasspathContainer; >+import org.eclipse.jdt.core.IClasspathEntry; >+import org.eclipse.jdt.core.IJavaProject; >+import org.eclipse.jdt.core.JavaCore; >+import org.eclipse.jdt.launching.IVMInstall; >+import org.eclipse.jdt.launching.IVMInstallType; >+import org.eclipse.jdt.launching.JavaRuntime; >+import org.eclipse.jdt.launching.LibraryLocation; >+import org.maven.ide.eclipse.Maven2Plugin; >+import org.maven.ide.eclipse.MavenEmbedderCallback; >+import org.maven.ide.eclipse.PluginConsoleEventMonitor; >+import org.maven.ide.eclipse.TransferListenerAdapter; >+import org.maven.ide.eclipse.container.Maven2ClasspathContainer; >+import org.maven.ide.eclipse.container.Maven2ClasspathContainerInitializer; >+import org.maven.ide.eclipse.preferences.Maven2PreferenceConstants; >+ >+ >+/** >+ * Basic helper class that can be used to enable the Maven tooling on a project and also programatically >+ * update the source folders for the projects >+ * >+ * @author Philip Dodds >+ */ >+public class MavenEclipseProject { >+ >+ private static final class UpdateSourcesJob extends Job implements MavenEmbedderCallback { >+ >+ private final IProject project; >+ >+ private Set sources = new HashSet(); >+ >+ private List sourceEntries = new ArrayList(); >+ >+ private Map options = new HashMap(); >+ >+ UpdateSourcesJob(IProject project) { >+ super("Updating " + project.getName() + " Sources"); >+ this.project = project; >+ } >+ >+ protected IStatus run(IProgressMonitor monitor) { >+ IFile pom = project.getFile(Maven2Plugin.POM_FILE_NAME); >+ if(!pom.exists()) { >+ return Status.OK_STATUS; >+ } >+ >+ monitor.beginTask("Updating sources " + project.getName(), IProgressMonitor.UNKNOWN); >+ try { >+ Maven2Plugin.getDefault().executeInEmbedder(this, monitor); >+ >+ // TODO optimize project refresh >+ monitor.subTask("Refreshing"); >+ project.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, 1)); >+ >+ monitor.subTask("Configuring Build Path"); >+ IJavaProject javaProject = JavaCore.create(project); >+ >+ setOption(javaProject, options, JavaCore.COMPILER_COMPLIANCE); >+ setOption(javaProject, options, JavaCore.COMPILER_SOURCE); >+ setOption(javaProject, options, JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM); >+ >+ String source = (String) options.get(JavaCore.COMPILER_SOURCE); >+ if(source == null) { >+ sourceEntries.add(JavaRuntime.getDefaultJREContainerEntry()); >+ } else { >+ sourceEntries.add(getJREContainer(source)); >+ } >+ >+ IClasspathEntry[] currentClasspath = javaProject.getRawClasspath(); >+ for(int i = 0; i < currentClasspath.length; i++ ) { >+ // Delete all non container (e.g. JRE library) entries. See MNGECLIPSE-9 >+ IClasspathEntry entry = currentClasspath[i]; >+ if(entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) { >+ if(!JavaRuntime.JRE_CONTAINER.equals(entry.getPath().segment(0))) { >+ sourceEntries.add(entry); >+ } >+ } >+ } >+ >+ IClasspathEntry[] entries = (IClasspathEntry[]) sourceEntries >+ .toArray(new IClasspathEntry[sourceEntries.size()]); >+ javaProject.setRawClasspath(entries, monitor); >+ >+ Maven2Plugin.getDefault().getConsole().logMessage("Updated source folders for project " + project.getName()); >+ >+ } catch(Exception ex) { >+ String msg = "Unable to update source folders " + project.getName() + "; " + ex.toString(); >+ Maven2Plugin.getDefault().getConsole().logMessage(msg); >+ // Maven2Plugin.log( msg, ex); >+ } finally { >+ monitor.done(); >+ } >+ >+ return Status.OK_STATUS; >+ } >+ >+ private void setOption(IJavaProject javaProject, Map options, String name) { >+ String newValue = (String) options.get(name); >+ if(newValue == null) { >+ return; >+ } >+ String currentValue = javaProject.getOption(name, false); >+ if(!newValue.equals(currentValue)) { >+ javaProject.setOption(name, newValue); >+ } >+ } >+ >+ private IClasspathEntry getJREContainer(String version) { >+ int n = VERSIONS.indexOf(version); >+ if(n > -1) { >+ Map jreContainers = getJREContainers(); >+ for(int i = n; i < VERSIONS.size(); i++ ) { >+ IClasspathEntry entry = (IClasspathEntry) jreContainers.get(version); >+ if(entry != null) { >+ Maven2Plugin.getDefault().getConsole().logMessage("JRE compliant to " + version + ". " + entry); >+ return entry; >+ } >+ } >+ } >+ IClasspathEntry entry = JavaRuntime.getDefaultJREContainerEntry(); >+ Maven2Plugin.getDefault().getConsole().logMessage( >+ "No JRE compliant to " + version + ". Using default JRE container " + entry); >+ return entry; >+ } >+ >+ private Map getJREContainers() { >+ Map jreContainers = new HashMap(); >+ >+ jreContainers.put(getJREVersion(JavaRuntime.getDefaultVMInstall()), JavaRuntime.getDefaultJREContainerEntry()); >+ >+ IVMInstallType[] installTypes = JavaRuntime.getVMInstallTypes(); >+ for(int i = 0; i < installTypes.length; i++ ) { >+ IVMInstall[] installs = installTypes[i].getVMInstalls(); >+ for(int j = 0; j < installs.length; j++ ) { >+ IVMInstall install = installs[j]; >+ String version = getJREVersion(install); >+ if(!jreContainers.containsKey(version)) { >+ // in Eclipse 3.2 one could use JavaRuntime.newJREContainerPath(install) >+ IPath jreContainerPath = new Path(JavaRuntime.JRE_CONTAINER).append(install.getVMInstallType().getId()) >+ .append(install.getName()); >+ jreContainers.put(version, JavaCore.newContainerEntry(jreContainerPath)); >+ } >+ } >+ } >+ >+ return jreContainers; >+ } >+ >+ private String getJREVersion(IVMInstall install) { >+ LibraryLocation[] libraryLocations = JavaRuntime.getLibraryLocations(install); >+ if(libraryLocations != null) { >+ for(int k = 0; k < libraryLocations.length; k++ ) { >+ IPath path = libraryLocations[k].getSystemLibraryPath(); >+ String jarName = path.lastSegment(); >+ if("rt.jar".equals(jarName)) { >+ try { >+ JarFile jarFile = new JarFile(path.toFile()); >+ Manifest manifest = jarFile.getManifest(); >+ Attributes attributes = manifest.getMainAttributes(); >+ return attributes.getValue(Attributes.Name.SPECIFICATION_VERSION); >+ } catch(Exception ex) { >+ Maven2Plugin.getDefault().getConsole().logError("Unable to read " + path + " " + ex.getMessage()); >+ } >+ } >+ } >+ } >+ return null; >+ } >+ >+ /** >+ * @see MavenEmbedderCallback#run(MavenEmbedder, IProgressMonitor) >+ */ >+ public Object run(MavenEmbedder mavenEmbedder, IProgressMonitor monitor) { >+ resolve(project.getFile(Maven2Plugin.POM_FILE_NAME), mavenEmbedder, monitor); >+ return null; >+ } >+ >+ private void resolve(IResource pomResource, MavenEmbedder mavenEmbedder, IProgressMonitor monitor) { >+ if(monitor.isCanceled()) { >+ throw new OperationCanceledException(); >+ } >+ >+ Maven2Plugin plugin = Maven2Plugin.getDefault(); >+ >+ String msg = "Reading " + pomResource.getFullPath(); >+ plugin.getConsole().logMessage(msg); >+ >+ monitor.subTask("Reading " + pomResource.getFullPath()); >+ File pomFile = pomResource.getLocation().toFile(); >+ >+ MavenProject mavenProject; >+ try { >+ mavenProject = mavenEmbedder.readProject(pomFile); >+ } catch(Exception ex) { >+ plugin.getConsole().logError("Unable to read project " + pomResource.getFullPath() + "; " + ex.toString()); >+ return; >+ } >+ >+ String source = getBuildOption(mavenProject, "maven-compiler-plugin", "source"); >+ if(source != null) { >+ plugin.getConsole().logMessage("Setting source compatibility: " + source); >+ setVersion(options, JavaCore.COMPILER_SOURCE, source); >+ setVersion(options, JavaCore.COMPILER_COMPLIANCE, source); >+ } >+ >+ String target = getBuildOption(mavenProject, "maven-compiler-plugin", "target"); >+ if(target != null) { >+ plugin.getConsole().logMessage("Setting target compatibility: " + source); >+ setVersion(options, JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, target); >+ } >+ >+ monitor.subTask("Generating Sources " + pomResource.getFullPath()); >+ try { >+ plugin.getConsole().logMessage("Generating sources " + pomResource.getFullPath()); >+ >+ mavenEmbedder.execute(getExecutionRequest(pomFile, monitor, mavenEmbedder)); >+ // TODO hook up console view >+ // EventMonitor eventMonitor = new PluginConsoleEventMonitor(); >+ // mavenEmbedder.execute(mavenProject, goals, eventMonitor, transferListener, properties, f.getParentFile()); >+ >+ } catch(Exception ex) { >+ plugin.getConsole().logError( >+ "Failed to run generate source goals " + pomResource.getFullPath() + " " + ex.getMessage()); >+ } >+ >+ File basedir = pomResource.getLocation().toFile().getParentFile(); >+ File projectBaseDir = project.getLocation().toFile(); >+ >+ extractSourceDirs(project, mavenProject.getCompileSourceRoots(), basedir, projectBaseDir); >+ extractSourceDirs(project, mavenProject.getTestCompileSourceRoots(), basedir, projectBaseDir); >+ >+ extractResourceDirs(project, mavenProject.getBuild().getResources(), basedir, projectBaseDir); >+ extractResourceDirs(project, mavenProject.getBuild().getTestResources(), basedir, projectBaseDir); >+ >+ IContainer parent = pomResource.getParent(); >+ List modules = mavenProject.getModules(); >+ for(Iterator it = modules.iterator(); it.hasNext() && !monitor.isCanceled();) { >+ if(monitor.isCanceled()) { >+ throw new OperationCanceledException(); >+ } >+ String module = (String) it.next(); >+ IResource memberPom = parent.findMember(module + "/" + Maven2Plugin.POM_FILE_NAME); //$NON-NLS-1$ >+ if(memberPom != null) { >+ resolve(memberPom, mavenEmbedder, monitor); >+ } >+ } >+ } >+ >+ private MavenExecutionRequest getExecutionRequest(File pomFile, IProgressMonitor monitor, MavenEmbedder embedder) >+ throws SettingsConfigurationException { >+ List goals = Arrays.asList("generate-sources,generate-resources,generate-test-sources,generate-test-resources" >+ .split(",")); >+ >+ Properties properties = new Properties(); >+ >+ File userSettingsPath = embedder.getUserSettingsPath(null); >+ File globalSettingsFile = embedder.getGlobalSettingsPath(); >+ >+ Settings settings = embedder.buildSettings(userSettingsPath, globalSettingsFile, false, // interactive >+ false, // offline, >+ false, // usePluginRegistry, >+ Boolean.FALSE); // pluginUpdateOverride ); >+ >+ String localRepositoryPath = System.getProperty(Maven2PreferenceConstants.P_LOCAL_REPOSITORY_DIR); >+ if(localRepositoryPath == null || localRepositoryPath.trim().length() == 0) { >+ localRepositoryPath = embedder.getLocalRepositoryPath(settings); >+ } >+ >+ MavenExecutionRequest executionRequest = new DefaultMavenExecutionRequest().setPomFile(pomFile.getAbsolutePath()) >+ .setBasedir(pomFile.getParentFile()).setGoals(goals).setSettings(settings) >+ // TODO >+ .setProperties(properties).setLocalRepositoryPath(localRepositoryPath).setReactorActive(false).setRecursive( >+ true).setShowErrors(true) >+ // TODO >+ .setInteractive(false).setLoggingLevel(MavenExecutionRequest.LOGGING_LEVEL_INFO) >+ .activateDefaultEventMonitor().addEventMonitor(new PluginConsoleEventMonitor()).setTransferListener( >+ new TransferListenerAdapter(monitor)).setFailureBehavior(MavenExecutionRequest.REACTOR_FAIL_AT_END) >+ // .addActiveProfiles( activeProfiles ) >+ // .addInactiveProfiles( inactiveProfiles ) >+ .setOffline(Boolean.getBoolean(Maven2PreferenceConstants.P_OFFLINE)).setGlobalChecksumPolicy( >+ System.getProperty(Maven2PreferenceConstants.P_GLOBAL_CHECKSUM_POLICY)); >+ // .setUpdateSnapshots( updateSnapshots ) // TODO >+ ; >+ >+ return executionRequest; >+ } >+ >+ public static final List VERSIONS = Arrays.asList("1.1,1.2,1.3,1.4,1.5,1.6,1.7".split(",")); >+ >+ static void setVersion(Map options, String name, String value) { >+ if(value == null) { >+ return; >+ } >+ String current = (String) options.get(name); >+ if(current == null) { >+ options.put(name, value); >+ } else { >+ int oldIndex = VERSIONS.indexOf(current); >+ int newIndex = VERSIONS.indexOf(value.trim()); >+ if(newIndex > oldIndex) { >+ options.put(name, value); >+ } >+ } >+ } >+ >+ void extractSourceDirs(IProject project, List sourceRoots, File basedir, File projectBaseDir) { >+ for(Iterator it = sourceRoots.iterator(); it.hasNext();) { >+ String sourceRoot = (String) it.next(); >+ if(new File(sourceRoot).isDirectory()) { >+ IResource r = project.findMember(toRelativeAndFixSeparator(projectBaseDir, sourceRoot)); >+ if(r != null && sources.add(r.getFullPath().toString())) { >+ sourceEntries.add(JavaCore >+ .newSourceEntry(r.getFullPath() /*, new IPath[] { new Path( "**"+"/.svn/"+"**")} */)); >+ Maven2Plugin.getDefault().getConsole().logMessage("Adding source folder " + r.getFullPath()); >+ } >+ } >+ } >+ } >+ >+ void extractResourceDirs(IProject project, List resources, File basedir, File projectBaseDir) { >+ for(Iterator it = resources.iterator(); it.hasNext();) { >+ Resource resource = (Resource) it.next(); >+ File resourceDirectory = new File(resource.getDirectory()); >+ if(resourceDirectory.exists() && resourceDirectory.isDirectory()) { >+ IResource r = project.findMember(toRelativeAndFixSeparator(projectBaseDir, resource.getDirectory())); >+ if(r != null && sources.add(r.getFullPath().toString())) { >+ sourceEntries.add(JavaCore.newSourceEntry(r.getFullPath(), new IPath[] {new Path("**")}, r.getFullPath())); //, new IPath[] { new Path( "**"+"/.svn/"+"**")} ) ); >+ Maven2Plugin.getDefault().getConsole().logMessage("Adding resource folder " + r.getFullPath()); >+ } >+ } >+ } >+ } >+ >+ private String toRelativeAndFixSeparator(File basedir, String absolutePath) { >+ String relative; >+ if(absolutePath.equals(basedir.getAbsolutePath())) { >+ relative = "."; >+ } else if(absolutePath.startsWith(basedir.getAbsolutePath())) { >+ relative = absolutePath.substring(basedir.getAbsolutePath().length() + 1); >+ } else { >+ relative = absolutePath; >+ } >+ return relative.replace('\\', '/'); //$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ >+ public static String getBuildOption(MavenProject project, String artifactId, String optionName) { >+ for(Iterator it = project.getModel().getBuild().getPlugins().iterator(); it.hasNext();) { >+ Plugin plugin = (Plugin) it.next(); >+ if(artifactId.equals(plugin.getArtifactId())) { >+ Xpp3Dom o = (Xpp3Dom) plugin.getConfiguration(); >+ if(o != null && o.getChild(optionName) != null) { >+ return o.getChild(optionName).getValue(); >+ } >+ } >+ } >+ return null; >+ } >+ >+ } >+ >+ public static void scheduleUpdateSources(IProject project) { >+ new UpdateSourcesJob(project).schedule(); >+ } >+ >+ public static void updateSources(IProject project) throws InterruptedException { >+ UpdateSourcesJob job = new UpdateSourcesJob(project); >+ job.schedule(); >+ job.join(); >+ } >+ >+ public static void enableNature(IProject project) { >+ try { >+ ArrayList newNatures = new ArrayList(); >+ newNatures.add(JavaCore.NATURE_ID); >+ newNatures.add(Maven2Plugin.NATURE_ID); >+ >+ IProjectDescription description = project.getDescription(); >+ String[] natures = description.getNatureIds(); >+ for(int i = 0; i < natures.length; ++i) { >+ String id = natures[i]; >+ if(!Maven2Plugin.NATURE_ID.equals(id) && !JavaCore.NATURE_ID.equals(natures[i])) { >+ newNatures.add(natures[i]); >+ } >+ } >+ description.setNatureIds((String[]) newNatures.toArray(new String[newNatures.size()])); >+ project.setDescription(description, null); >+ >+ IJavaProject javaProject = JavaCore.create(project); >+ if(javaProject != null) { >+ IClasspathContainer maven2ClasspathContainer = Maven2ClasspathContainerInitializer >+ .getMaven2ClasspathContainer(javaProject); >+ IClasspathEntry[] containerEntries = maven2ClasspathContainer.getClasspathEntries(); >+ HashSet containerEntrySet = new HashSet(); >+ for(int i = 0; i < containerEntries.length; i++ ) { >+ containerEntrySet.add(containerEntries[i].getPath().toString()); >+ } >+ >+ // remove classpath container from JavaProject >+ IClasspathEntry[] entries = javaProject.getRawClasspath(); >+ ArrayList newEntries = new ArrayList(); >+ for(int i = 0; i < entries.length; i++ ) { >+ IClasspathEntry entry = entries[i]; >+ if(!Maven2ClasspathContainer.isMaven2ClasspathContainer(entry.getPath()) >+ && !containerEntrySet.contains(entry.getPath().toString())) { >+ newEntries.add(entry); >+ } >+ } >+ newEntries.add(JavaCore.newContainerEntry(new Path(Maven2Plugin.CONTAINER_ID))); >+ >+ javaProject.setRawClasspath((IClasspathEntry[]) newEntries.toArray(new IClasspathEntry[newEntries.size()]), >+ null); >+ } >+ >+ } catch(CoreException ex) { >+ Maven2Plugin.getDefault().getConsole().logError("Can't enable nature " + ex.toString()); >+ Maven2Plugin.log(ex); >+ >+ } >+ } >+ >+ public static void disableNature(IProject project) { >+ try { >+ project.deleteMarkers(Maven2Plugin.MARKER_ID, true, IResource.DEPTH_INFINITE); >+ >+ IProjectDescription description = project.getDescription(); >+ String[] natures = description.getNatureIds(); >+ ArrayList newNatures = new ArrayList(); >+ for(int i = 0; i < natures.length; ++i) { >+ if(!Maven2Plugin.NATURE_ID.equals(natures[i])) { >+ newNatures.add(natures[i]); >+ } >+ } >+ description.setNatureIds((String[]) newNatures.toArray(new String[newNatures.size()])); >+ project.setDescription(description, null); >+ >+ IJavaProject javaProject = JavaCore.create(project); >+ if(javaProject != null) { >+ // remove classpatch container from JavaProject >+ IClasspathEntry[] entries = javaProject.getRawClasspath(); >+ ArrayList newEntries = new ArrayList(); >+ for(int i = 0; i < entries.length; i++ ) { >+ if(!Maven2ClasspathContainer.isMaven2ClasspathContainer(entries[i].getPath())) { >+ newEntries.add(entries[i]); >+ } >+ } >+ javaProject.setRawClasspath((IClasspathEntry[]) newEntries.toArray(new IClasspathEntry[newEntries.size()]), >+ null); >+ } >+ >+ } catch(CoreException ex) { >+ Maven2Plugin.getDefault().getConsole().logError("Can't disable nature " + ex.toString()); >+ Maven2Plugin.log(ex); >+ } >+ } >+} >Index: C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/build.xml >=================================================================== >--- C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/build.xml (revision 0) >+++ C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/build.xml (revision 0) >@@ -0,0 +1,218 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<project name="org.maven.ide.eclipse" default="build.jars" basedir="."> >+ >+ <property name="basews" value="${ws}"/> >+ <property name="baseos" value="${os}"/> >+ <property name="basearch" value="${arch}"/> >+ <property name="basenl" value="${nl}"/> >+ >+ <!-- Compiler settings. --> >+ <property name="javacFailOnError" value="false"/> >+ <property name="javacDebugInfo" value="on"/> >+ <property name="javacVerbose" value="false"/> >+ <property name="logExtension" value=".log"/> >+ <property name="compilerArg" value=""/> >+ <property name="javacSource" value="1.3"/> >+ <property name="javacTarget" value="1.2"/> >+ <path id="path_bootclasspath"> >+ <fileset dir="${java.home}/lib"> >+ <include name="*.jar"/> >+ </fileset> >+ </path> >+ <property name="bootclasspath" refid="path_bootclasspath"/> >+ <property name="bundleJavacSource" value="${javacSource}"/> >+ <property name="bundleJavacTarget" value="${javacTarget}"/> >+ <property name="bundleBootClasspath" value="${bootclasspath}"/> >+ >+ <target name="init" depends="properties"> >+ <condition property="pluginTemp" value="${buildTempFolder}/plugins"> >+ <isset property="buildTempFolder"/> >+ </condition> >+ <property name="pluginTemp" value="${basedir}"/> >+ <condition property="build.result.folder" value="${pluginTemp}/org.maven.ide.eclipse"> >+ <isset property="buildTempFolder"/> >+ </condition> >+ <property name="build.result.folder" value="${basedir}"/> >+ <property name="temp.folder" value="${basedir}/temp.folder"/> >+ <property name="plugin.destination" value="${basedir}"/> >+ </target> >+ >+ <target name="properties" if="eclipse.running"> >+ <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> >+ >+ </target> >+ >+ <target name="build.update.jar" depends="init" description="Build the plug-in: org.maven.ide.eclipse for an update site."> >+ <delete dir="${temp.folder}"/> >+ <mkdir dir="${temp.folder}"/> >+ <antcall target="build.jars"/> >+ <antcall target="gather.bin.parts"> >+ <param name="destination.temp.folder" value="${temp.folder}/"/> >+ </antcall> >+ <zip destfile="${plugin.destination}/org.maven.ide.eclipse_0.0.10.jar" basedir="${temp.folder}/org.maven.ide.eclipse_0.0.10" filesonly="false" whenempty="skip" update="false"/> >+ <delete dir="${temp.folder}"/> >+ </target> >+ >+ <target name="m2plugin.jar" depends="init" unless="m2plugin.jar" description="Create jar: org.maven.ide.eclipse m2plugin.jar."> >+ <delete dir="${temp.folder}/m2plugin.jar.bin"/> >+ <mkdir dir="${temp.folder}/m2plugin.jar.bin"/> >+ <path id="m2plugin.jar.classpath"> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.runtime_3.2.0.v20060603.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.osgi_3.2.0.v20060601.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.equinox.common_3.2.0.v20060603.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.jobs_3.2.0.v20060603.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.0.v20060603/runtime_registry_compatibility.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.0.v20060603/@dot"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.equinox.registry_3.2.0.v20060601.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.apache.xerces_2.8.0.v200606131651/resolver.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.apache.xerces_2.8.0.v200606131651/xercesImpl.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.apache.xerces_2.8.0.v200606131651/xml-apis.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.equinox.preferences_3.2.0.v20060601.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.contenttype_3.2.0.v20060603.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060601.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.resources_3.2.0.v20060603.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.resources.compatibility_3.2.0.v20060603.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.resources.win32_3.2.0.v20060603.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.runtime.compatibility_3.1.100.v20060603.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.update.configurator_3.2.0.v20060605.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ant.core_3.1.100.v20060531.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.variables_3.1.100.v20060605.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.expressions_3.2.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.filesystem_1.0.0.v20060603.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.filesystem.win32.x86_1.0.0.v20060603.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.jface.text_3.2.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/com.ibm.icu_3.4.4.1.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.text_3.2.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.commands_3.2.0.I20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.swt_3.2.0.v3232o.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.jface_3.2.0.I20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.jdt.core_3.2.0.v_671.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.team.core_3.2.0.I200606051140.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.jdt.ui_3.2.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui_3.2.0.I20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.workbench_3.2.0.I20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.workbench.compatibility_3.2.0.I20060605-1400/@dot"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.workbench.compatibility_3.2.0.I20060605-1400/compatibility.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.help_3.2.0.v20060602.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.console_3.1.100.v20060605.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.workbench.texteditor_3.2.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.search_3.2.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.core.filebuffers_3.2.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.ide_3.2.0.I20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.win32_3.2.0.I20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.views_3.2.0.I20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.update.core_3.2.0.v20060605.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.update.core.win32_3.2.0.v20060605.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.update.ui_3.2.0.v20060605.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.forms_3.2.0.v20060602.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.debug.core_3.2.0.v20060605.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.debug.ui_3.2.0.v20060605.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.editors_3.2.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.jdt.launching_3.2.0.v20060605.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.jdt.debug_3.2.0.v20060605/jdi.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.jdt.debug_3.2.0.v20060605/jdimodel.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.jdt.debug_3.2.0.v20060605/tools.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.compare_3.2.0.v20060605.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.team.ui_3.2.0.I200606051140.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.navigator_3.2.0.I20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.navigator.resources_3.2.0.I20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ui.views.properties.tabbed_3.2.0.I20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ltk.core.refactoring_3.2.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.ltk.ui.refactoring_3.2.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.jdt.core.manipulation_1.0.0.v20060605-1400.jar"/> >+ <pathelement path="../../../../devtools/eclipse-3.2/eclipse/plugins/org.eclipse.jdt.debug.ui_3.2.0.v20060605.jar"/> >+ <pathelement path="lib/lucene-core-2.0.0.jar"/> >+ <pathelement path="${build.result.folder}/../org.maven.ide.eclipse/lib/lucene-core-2.0.0.jar"/> >+ <pathelement path="lib/maven-embedder-2.1-20060530210557-dep.jar"/> >+ <pathelement path="${build.result.folder}/../org.maven.ide.eclipse/lib/maven-embedder-2.1-20060530210557-dep.jar"/> >+ </path> >+ <!-- compile the source code --> >+ <javac destdir="${temp.folder}/m2plugin.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" > >+ <compilerarg line="${compilerArg}" compiler="${build.compiler}"/> >+ <classpath refid="m2plugin.jar.classpath" /> >+ <src path="src/" /> >+ <compilerarg value="@${basedir}/javaCompiler.m2plugin.jar.args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/> >+ <compilerarg line="-log '${temp.folder}/m2plugin.jar.bin${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/> >+ </javac> >+ <!-- Copy necessary resources --> >+ <copy todir="${temp.folder}/m2plugin.jar.bin" failonerror="true" overwrite="false"> >+ <fileset dir="src/" excludes="**/*.java, **/package.htm*" /> >+ </copy> >+ <mkdir dir="${build.result.folder}"/> >+ <jar destfile="${build.result.folder}/m2plugin.jar" basedir="${temp.folder}/m2plugin.jar.bin"/> >+ <delete dir="${temp.folder}/m2plugin.jar.bin"/> >+ </target> >+ >+ <target name="m2pluginsrc.zip" depends="init" unless="m2pluginsrc.zip"> >+ <mkdir dir="${build.result.folder}"/> >+ <zip destfile="${build.result.folder}/m2pluginsrc.zip" filesonly="false" whenempty="skip" update="false"> >+ <fileset dir="src/" includes="**/*.java" /> >+ </zip> >+ </target> >+ >+ <target name="build.jars" depends="init" description="Build all the jars for the plug-in: org.maven.ide.eclipse."> >+ <available property="m2plugin.jar" file="${build.result.folder}/m2plugin.jar"/> >+ <antcall target="m2plugin.jar"/> >+ </target> >+ >+ <target name="build.sources" depends="init"> >+ <available property="m2pluginsrc.zip" file="${build.result.folder}/m2pluginsrc.zip"/> >+ <antcall target="m2pluginsrc.zip"/> >+ </target> >+ >+ <target name="gather.bin.parts" depends="init" if="destination.temp.folder"> >+ <mkdir dir="${destination.temp.folder}/org.maven.ide.eclipse_0.0.10"/> >+ <copy todir="${destination.temp.folder}/org.maven.ide.eclipse_0.0.10" failonerror="true" overwrite="false"> >+ <fileset dir="${build.result.folder}" includes="m2plugin.jar" /> >+ </copy> >+ <copy todir="${destination.temp.folder}/org.maven.ide.eclipse_0.0.10" failonerror="true" overwrite="false"> >+ <fileset dir="${basedir}" includes="plugin.xml,META-INF/,m2plugin.jar,central.zip,icons/,about.ini,about.properties,plugin.properties,.options,lib/lucene-core-2.0.0.jar,lib/maven-embedder-2.1-20060530210557-dep.jar" /> >+ </copy> >+ </target> >+ >+ <target name="build.zips" depends="init"> >+ </target> >+ >+ <target name="gather.sources" depends="init" if="destination.temp.folder"> >+ <mkdir dir="${destination.temp.folder}/org.maven.ide.eclipse_0.0.10"/> >+ <copy file="${build.result.folder}/m2pluginsrc.zip" todir="${destination.temp.folder}/org.maven.ide.eclipse_0.0.10" failonerror="false" overwrite="false"/> >+ </target> >+ >+ <target name="gather.logs" depends="init" if="destination.temp.folder"> >+ <mkdir dir="${destination.temp.folder}/org.maven.ide.eclipse_0.0.10"/> >+ <copy file="${temp.folder}/m2plugin.jar.bin${logExtension}" todir="${destination.temp.folder}/org.maven.ide.eclipse_0.0.10" failonerror="false" overwrite="false"/> >+ </target> >+ >+ <target name="clean" depends="init" description="Clean the plug-in: org.maven.ide.eclipse of all the zips, jars and logs created."> >+ <delete file="${build.result.folder}/m2plugin.jar"/> >+ <delete file="${build.result.folder}/m2pluginsrc.zip"/> >+ <delete file="${plugin.destination}/org.maven.ide.eclipse_0.0.10.jar"/> >+ <delete file="${plugin.destination}/org.maven.ide.eclipse_0.0.10.zip"/> >+ <delete dir="${temp.folder}"/> >+ </target> >+ >+ <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder."> >+ <eclipse.convertPath fileSystemPath="C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse" property="resourcePath"/> >+ <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/> >+ </target> >+ >+ <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: org.maven.ide.eclipse."> >+ <delete dir="${temp.folder}"/> >+ <mkdir dir="${temp.folder}"/> >+ <antcall target="build.jars"/> >+ <antcall target="build.sources"/> >+ <antcall target="gather.bin.parts"> >+ <param name="destination.temp.folder" value="${temp.folder}/"/> >+ </antcall> >+ <antcall target="gather.sources"> >+ <param name="destination.temp.folder" value="${temp.folder}/"/> >+ </antcall> >+ <delete> >+ <fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" /> >+ </delete> >+ <zip destfile="${plugin.destination}/org.maven.ide.eclipse_0.0.10.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/> >+ <delete dir="${temp.folder}"/> >+ </target> >+ >+</project> >Index: C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/META-INF/MANIFEST.MF >=================================================================== >--- C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/META-INF/MANIFEST.MF (revision 146) >+++ C:/dev/workspaces/fuse-tooling/org.maven.ide.eclipse/META-INF/MANIFEST.MF (working copy) >@@ -29,3 +29,6 @@ > Bundle-ClassPath: m2plugin.jar, > lib/lucene-core-2.0.0.jar, > lib/maven-embedder-2.1-20060530210557-dep.jar >+Export-Package: org.maven.ide.eclipse, >+ org.maven.ide.eclipse.launch, >+ org.maven.ide.eclipse.project
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 154251
:
49105
|
49106
|
50575
| 50576