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 49106 Details for
Bug 154251
[modulecore] Maven2 Integration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Makes the M2Eclipse plugin add the deployable classpath attribute
m2eclipse-patch.txt (text/plain), 3.50 KB, created by
Robert Elliot
on 2006-08-30 17:13:59 EDT
(
hide
)
Description:
Makes the M2Eclipse plugin add the deployable classpath attribute
Filename:
MIME Type:
Creator:
Robert Elliot
Created:
2006-08-30 17:13:59 EDT
Size:
3.50 KB
patch
obsolete
>Index: C:/Documents and Settings/Rob/Eclipse Workspaces/Maven2 Plugin Workspace/org.maven.ide.eclipse/src/org/maven/ide/eclipse/Maven2Plugin.java >=================================================================== >--- C:/Documents and Settings/Rob/Eclipse Workspaces/Maven2 Plugin Workspace/org.maven.ide.eclipse/src/org/maven/ide/eclipse/Maven2Plugin.java (revision 145) >+++ C:/Documents and Settings/Rob/Eclipse Workspaces/Maven2 Plugin Workspace/org.maven.ide.eclipse/src/org/maven/ide/eclipse/Maven2Plugin.java (working copy) >@@ -5,6 +5,7 @@ > import java.io.File; > import java.io.StringWriter; > import java.net.URL; >+import java.util.ArrayList; > import java.util.Collections; > import java.util.Iterator; > import java.util.List; >@@ -361,6 +362,11 @@ > } > > final Artifact a = ( Artifact) it.next(); >+ >+ IClasspathAttribute deployableAttr = null; >+ if (!a.getScope().equalsIgnoreCase("provided") && !a.getScope().equalsIgnoreCase("test")) { >+ deployableAttr = JavaCore.newClasspathAttribute("org.eclipse.jst.j2ee.deployableArtifact", "true"); >+ } > > monitor.subTask( "Processing " + a.getId() ); > String artifactLocation = a.getFile().getAbsolutePath(); >@@ -382,13 +388,19 @@ > continue; > } > >- libraryEntries.add(JavaCore.newProjectEntry(artifactProject.getFullPath(), false)); >+ libraryEntries.add( >+ JavaCore.newProjectEntry( >+ artifactProject.getFullPath(), >+ new IAccessRule[0], >+ true, >+ deployableAttr != null ? new IClasspathAttribute[]{deployableAttr} : new IClasspathAttribute[0], >+ false)); > continue; > } > > Path srcPath = materializeArtifactPath(mavenProject, a, "java-source", "sources", downloadSources, monitor); > >- IClasspathAttribute[] attributes = new IClasspathAttribute[0]; >+ IClasspathAttribute javadocAttr = null; > if(srcPath==null) { // no need to search for javadoc if we have source code > Path javadocPath = materializeArtifactPath(mavenProject, a, "java-doc", "javadoc", downloadJavadoc, monitor); > String javaDocUrl = null; >@@ -398,13 +410,22 @@ > javaDocUrl = getJavaDocUrl(artifactLocation, monitor); > } > if(javaDocUrl!=null) { >- attributes = new IClasspathAttribute[] { >- JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, javaDocUrl)}; >+ javadocAttr = >+ JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, javaDocUrl); > } > } > >- libraryEntries.add(JavaCore.newLibraryEntry(new Path(artifactLocation), srcPath, null, >- new IAccessRule[0], attributes, false /*not exported*/)); >+ List attributes = new ArrayList(); >+ if (javadocAttr != null) attributes.add(javadocAttr); >+ if (deployableAttr != null) attributes.add(deployableAttr); >+ IClasspathAttribute[] attrs = (IClasspathAttribute[]) attributes.toArray(new IClasspathAttribute[attributes.size()]); >+ >+ libraryEntries.add( >+ JavaCore.newLibraryEntry( >+ new Path(artifactLocation), srcPath, null, >+ new IAccessRule[0], >+ attrs, >+ false /*not exported*/)); > } > } >
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