Skip to content
Browse files

400005 : client and classes classifier classpath-providers

  • Loading branch information...
2 parents 6455ba9 + 320afb6 commit 06e82f59ec6ce0d66f8ba0057b3d9ad73de1596e @fbricon fbricon committed Jan 31, 2013
Showing with 867 additions and 1,530 deletions.
  1. +6 −0 org.eclipse.m2e.wtp.jaxrs.feature/.project
  2. 0 ...lipse.m2e.wtp.jpa → org.eclipse.m2e.wtp.jaxrs.feature}/.settings/org.eclipse.core.resources.prefs
  3. 0 {org.eclipse.m2e.wtp.jpa → org.eclipse.m2e.wtp.jaxrs.feature}/.settings/org.eclipse.m2e.core.prefs
  4. +2 −1 org.eclipse.m2e.wtp.jaxrs/META-INF/MANIFEST.MF
  5. +3 −1 org.eclipse.m2e.wtp.jaxrs/plugin.properties
  6. +10 −0 org.eclipse.m2e.wtp.jaxrs/plugin.xml
  7. +3 −5 ....m2e.wtp.jaxrs/src/org/eclipse/m2e/wtp/jaxrs/internal/configurators/JaxRsProjectConfigurator.java
  8. +0 −1 org.eclipse.m2e.wtp.jpa.feature/.gitignore
  9. +0 −17 org.eclipse.m2e.wtp.jpa.feature/.project
  10. +0 −4 org.eclipse.m2e.wtp.jpa.feature/build.properties
  11. +0 −172 org.eclipse.m2e.wtp.jpa.feature/feature.properties
  12. +0 −50 org.eclipse.m2e.wtp.jpa.feature/feature.xml
  13. +0 −116 org.eclipse.m2e.wtp.jpa.feature/license.html
  14. +0 −13 org.eclipse.m2e.wtp.jpa.feature/p2.inf
  15. +0 −17 org.eclipse.m2e.wtp.jpa.feature/pom.xml
  16. +0 −7 org.eclipse.m2e.wtp.jpa/.classpath
  17. +0 −1 org.eclipse.m2e.wtp.jpa/.gitignore
  18. +0 −34 org.eclipse.m2e.wtp.jpa/.project
  19. +0 −7 org.eclipse.m2e.wtp.jpa/.settings/org.eclipse.jdt.core.prefs
  20. +0 −28 org.eclipse.m2e.wtp.jpa/META-INF/MANIFEST.MF
  21. +0 −29 org.eclipse.m2e.wtp.jpa/about.html
  22. +0 −27 org.eclipse.m2e.wtp.jpa/about.ini
  23. +0 −5 org.eclipse.m2e.wtp.jpa/about.mappings
  24. +0 −2 org.eclipse.m2e.wtp.jpa/about.properties
  25. +0 −11 org.eclipse.m2e.wtp.jpa/build.properties
  26. +0 −52 org.eclipse.m2e.wtp.jpa/lifecycle-mapping-metadata.xml
  27. +0 −4 org.eclipse.m2e.wtp.jpa/plugin.properties
  28. +0 −22 org.eclipse.m2e.wtp.jpa/plugin.xml
  29. +0 −15 org.eclipse.m2e.wtp.jpa/pom.xml
  30. +0 −61 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/AbstractPlatformIdentifier.java
  31. +0 −30 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/IPlatformIdentifier.java
  32. +0 −73 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/PlatformIdentifierManager.java
  33. +0 −65 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/internal/MavenJpaActivator.java
  34. +0 −198 ...clipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/internal/configurators/JpaProjectConfigurator.java
  35. +0 −242 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/internal/configurators/MavenResourceLocator.java
  36. +0 −116 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/internal/util/JptUtils.java
  37. +6 −0 org.eclipse.m2e.wtp.jsf.feature/.project
  38. +2 −0 org.eclipse.m2e.wtp.jsf.feature/.settings/org.eclipse.core.resources.prefs
  39. +4 −0 org.eclipse.m2e.wtp.jsf.feature/.settings/org.eclipse.m2e.core.prefs
  40. +5 −3 org.eclipse.m2e.wtp.jsf/plugin.properties
  41. +9 −0 org.eclipse.m2e.wtp.jsf/plugin.xml
  42. +3 −6 ...clipse.m2e.wtp.jsf/src/org/eclipse/m2e/wtp/jsf/internal/configurators/JSFProjectConfigurator.java
  43. +18 −2 ....m2e.wtp.overlay/src/org/eclipse/m2e/wtp/overlay/internal/modulecore/OverlayVirtualComponent.java
  44. +2 −2 org.eclipse.m2e.wtp.sdk.feature/.project
  45. +3 −1 org.eclipse.m2e.wtp/META-INF/MANIFEST.MF
  46. +61 −29 org.eclipse.m2e.wtp/plugin.xml
  47. +136 −0 org.eclipse.m2e.wtp/schema/javaeeConfiguratorEnablers.exsd
  48. +0 −2 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/AbstractProjectConfiguratorDelegate.java
  49. +0 −2 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/ConnectorProjectConfiguratorDelegate.java
  50. +2 −2 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/EarPluginConfiguration.java
  51. +0 −2 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/ProjectUtils.java
  52. +6 −11 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/WebProjectConfiguratorDelegate.java
  53. +56 −0 ...se.m2e.wtp/src/org/eclipse/m2e/wtp/internal/conversion/AbstractProjectFacetConversionEnabler.java
  54. +36 −0 ...clipse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/conversion/AppClientProjectConversionEnabler.java
  55. +2 −7 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/conversion/AppClientProjectConverter.java
  56. +36 −0 ...clipse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/conversion/ConnectorProjectConversionEnabler.java
  57. +37 −0 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/conversion/EarProjectConversionEnabler.java
  58. +36 −0 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/conversion/EjbProjectConversionEnabler.java
  59. +0 −2 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/conversion/EjbProjectConverter.java
  60. +36 −0 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/conversion/WebProjectConversionEnabler.java
  61. +14 −7 ...pse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/jdt/launch/EjbClientClassifierClasspathProvider.java
  62. +14 −7 ...se.m2e.wtp/src/org/eclipse/m2e/wtp/internal/jdt/launch/WarClassesClassifierClasspathProvider.java
  63. +58 −0 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/preferences/ConfiguratorEnablerComposite.java
  64. +45 −3 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/preferences/MavenWtpPreferencePage.java
  65. +64 −1 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/internal/preferences/MavenWtpPreferencesManagerImpl.java
  66. +106 −0 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/preferences/ConfiguratorEnabler.java
  67. +37 −2 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/preferences/IMavenWtpPreferencesManager.java
  68. +9 −13 pom.xml
View
6 org.eclipse.m2e.wtp.jaxrs.feature/.project
@@ -10,8 +10,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>
View
0 ...settings/org.eclipse.core.resources.prefs → ...settings/org.eclipse.core.resources.prefs
File renamed without changes.
View
0 ....jpa/.settings/org.eclipse.m2e.core.prefs → ...ture/.settings/org.eclipse.m2e.core.prefs
File renamed without changes.
View
3 org.eclipse.m2e.wtp.jaxrs/META-INF/MANIFEST.MF
@@ -23,4 +23,5 @@ Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.m2e.wtp.jaxrs.internal.configurators
+Export-Package: org.eclipse.m2e.wtp.jaxrs.internal,
+ org.eclipse.m2e.wtp.jaxrs.internal.configurators
View
4 org.eclipse.m2e.wtp.jaxrs/plugin.properties
@@ -2,4 +2,6 @@ Bundle-Vendor = eclipse.org
Bundle-Name = Maven JAX-RS Configurator
JAXRS_Project_configurator=JAX-RS
Maven_Configuration_Problem=Maven Java EE Configuration Problem
-Maven_Configuration_Problems=Maven Java EE Configuration Problem
+Maven_Configuration_Problems=Maven Java EE Configuration Problem
+jaxrs_enabler_label=JAX-RS Configurator
+jaxrs_enabler_description=The JAX-RS Configurator adds the JAX-RS Facet to Dynamic Web projects if JAX-RS classpath dependencies are found.
View
10 org.eclipse.m2e.wtp.jaxrs/plugin.xml
@@ -29,4 +29,14 @@
<super type="org.eclipse.m2e.core.maven2Problem"/>
<persistent value="true"/>
</extension>
+
+ <extension
+ point="org.eclipse.m2e.wtp.javaeeConfiguratorEnabler">
+ <javaeeConfiguratorEnabler
+ id="org.eclipse.m2e.wtp.jaxrs.enabler"
+ label="%jaxrs_enabler_label"
+ description="%jaxrs_enabler_description"
+ configuratorIds="org.eclipse.m2e.wtp.jaxrs.configurator"
+ />
+ </extension>
</plugin>
View
8 ....jaxrs/src/org/eclipse/m2e/wtp/jaxrs/internal/configurators/JaxRsProjectConfigurator.java
@@ -37,6 +37,7 @@
import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
+import org.eclipse.m2e.wtp.MavenWtpPlugin;
import org.eclipse.m2e.wtp.ProjectUtils;
import org.eclipse.m2e.wtp.WTPProjectsUtil;
import org.eclipse.m2e.wtp.WarPluginConfiguration;
@@ -79,13 +80,10 @@ private void configureInternal(MavenProject mavenProject,IProject project,
return;
}
- /* FIX_POST_MIGRATION (dis/en)able configurators in prefs
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- boolean configureJaxRs = store.getBoolean(Activator.CONFIGURE_JAXRS);
- if (!configureJaxRs) {
+ boolean enabled = MavenWtpPlugin.getDefault().getMavenWtpPreferencesManager().isEnabled(getId());
+ if (!enabled) {
return;
}
- */
final IFacetedProject fproj = ProjectFacetsManager.create(project);
if (fproj == null) {
View
1 org.eclipse.m2e.wtp.jpa.feature/.gitignore
@@ -1 +0,0 @@
-/target
View
17 org.eclipse.m2e.wtp.jpa.feature/.project
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.m2e.wtp.jpa.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
View
4 org.eclipse.m2e.wtp.jpa.feature/build.properties
@@ -1,4 +0,0 @@
-bin.includes = feature.xml,\
- license.html,\
- p2.inf,\
- feature.properties
View
172 org.eclipse.m2e.wtp.jpa.feature/feature.properties
@@ -1,172 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2012 Red Hat, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat, Inc. - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=m2e-wtp - JPA configurator for WTP (Optional)
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - m2e-wtp
-
-# "updateSiteName" property - label for the update site
-#updateSiteName=The Eclipse Project Updates
-
-# "description" property - description of the feature
-description=m2e JPA project configurator for Eclipse WTP.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008-2012 Red Hat, Inc and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- Red Hat, Inc. - Java EE configurators\n
-
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-February 1, 2011\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse Foundation source code\n\
-repository ("Repository") in software modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
-Update License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-\n\Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which include,\n\
-but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
-the purpose of allowing users to install software, documentation, information and/or\n\
-other materials (collectively "Installable Software"). This capability is provided with\n\
-the intent of allowing such users to install, extend and update Eclipse-based products.\n\
-Information about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install Installable Software.\n\
-You shall be responsible for enabling the applicable license agreements relating to the\n\
-Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
-in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
-making it available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the following:\n\
-\n\
- 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
- the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
- extending or updating the functionality of an Eclipse-based product.\n\
- 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
- Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
- 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
- govern the use of the Installable Software ("Installable Software Agreement") and such\n\
- Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
- with the Specification. Such Installable Software Agreement must inform the user of the\n\
- terms and conditions that govern the Installable Software and must solicit acceptance by\n\
- the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
- indication of agreement by the user, the provisioning Technology will complete installation\n\
- of the Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
-########### end of license property ##########################################
View
50 org.eclipse.m2e.wtp.jpa.feature/feature.xml
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.m2e.wtp.jpa.feature"
- label="%featureName"
- version="0.17.0.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.m2e.wtp.jpa">
- <install-handler/>
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <!--
- <import plugin="org.eclipse.wst.common.frameworks"/>
- <import plugin="org.eclipse.wst.common.modulecore"/>
- <import plugin="org.eclipse.wst.common.project.facet.core"/>
- <import plugin="org.eclipse.jst.common.frameworks"/>
- <import plugin="org.eclipse.jst.common.project.facet.core"/>
- <import plugin="org.eclipse.jst.j2ee.web"/>
- <import plugin="org.eclipse.jst.j2ee"/>
- <import plugin="org.eclipse.jst.j2ee.core"/>
- -->
- <import feature="org.eclipse.platform" version="3.6.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.rcp" version="3.6.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.jdt" version="3.6.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.wst.web_ui.feature" version="3.2.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.jst.enterprise_ui.feature" version="3.2.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.wst.common.fproj" version="3.2.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.jst.common.fproj.enablement.jdt" version="3.2.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.m2e.feature" version="1.1.0" match="greaterOrEqual"/>
- </requires>
-
- <plugin
- id="org.eclipse.m2e.wtp.jpa"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
View
116 org.eclipse.m2e.wtp.jpa.feature/license.html
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>February 1, 2011</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
-
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
-
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
-
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
-
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
-
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-
-</body>
-</html>
View
13 org.eclipse.m2e.wtp.jpa.feature/p2.inf
@@ -1,13 +0,0 @@
-units.1.id=org.jboss.tools.maven.jpa
-units.1.properties.0.name=org.eclipse.equinox.p2.name
-units.1.properties.0.value=This version of the JPA configurator cannot be installed on top of the already installed org.jboss.tools.maven.jpa plugin. Uninstall the previous version of org.jboss.tools.maven.jpa and try the install again.
-units.1.version=$version$
-units.1.singleton=true
-units.1.provides.0.namespace=osgi.bundle
-units.1.provides.0.name=org.jboss.tools.maven.jpa
-units.1.provides.0.version=$version$
-
-requires.0.namespace=osgi.bundle
-requires.0.name=org.jboss.tools.maven.jpa
-requires.0.range=[$version$, $version$]
-
View
17 org.eclipse.m2e.wtp.jpa.feature/pom.xml
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.eclipse.m2e.wtp</groupId>
- <artifactId>org.eclipse.m2e.wtp.parent</artifactId>
- <version>0.17.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.m2e.wtp.jpa.feature</artifactId>
- <packaging>eclipse-feature</packaging>
-
- <name>M2E-WTP :: JPA Support Feature</name>
-
-</project>
-
View
7 org.eclipse.m2e.wtp.jpa/.classpath
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
View
1 org.eclipse.m2e.wtp.jpa/.gitignore
@@ -1 +0,0 @@
-/target
View
34 org.eclipse.m2e.wtp.jpa/.project
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.m2e.wtp.jpa</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
View
7 org.eclipse.m2e.wtp.jpa/.settings/org.eclipse.jdt.core.prefs
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
View
28 org.eclipse.m2e.wtp.jpa/META-INF/MANIFEST.MF
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.eclipse.m2e.wtp.jpa;singleton:=true
-Bundle-Version: 0.17.0.qualifier
-Bundle-Activator: org.eclipse.m2e.wtp.jpa.internal.MavenJpaActivator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.jst.j2ee.core,
- org.eclipse.jst.j2ee,
- org.eclipse.wst.common.emfworkbench.integration,
- org.eclipse.jpt.jpa.core,
- org.eclipse.jpt.common.core,
- org.eclipse.wst.common.project.facet.core,
- org.eclipse.m2e.core,
- org.eclipse.m2e.maven.runtime,
- org.eclipse.core.resources,
- org.eclipse.jdt.core,
- org.eclipse.emf.common,
- org.eclipse.jst.common.project.facet.core,
- org.eclipse.wst.common.frameworks,
- org.slf4j.api,
- org.eclipse.m2e.wtp;bundle-version="0.17.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6,
- JavaSE-1.7
-Bundle-Localization: plugin
-Bundle-Vendor: %Bundle-Vendor
View
29 org.eclipse.m2e.wtp.jpa/about.html
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About Maven JAX-RS Configurator</title>
-</head>
-<body lang="EN-US">
-<h2>Maven JPA Configurator</h2>
-<<p>m2e configurator setting the JPA Facet on projects having a persistence.xml JPA descriptor</p>
-
-<p>October 29, 2010</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
View
27 org.eclipse.m2e.wtp.jpa/about.ini
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-# test
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-# featureImage=m2e-wtp-about.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional
-
-
-
View
5 org.eclipse.m2e.wtp.jpa/about.mappings
@@ -1,5 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
View
2 org.eclipse.m2e.wtp.jpa/about.properties
@@ -1,2 +0,0 @@
-blurb=m2e JPA project configurator for Eclipse WTP\n\nVersion\: {featureVersion}\n\n(c) Copyright (c) Red Hat, Inc. and others 2012. All rights reserved.\nVisit http\://www.eclipse.org/m2e-wtp
-
View
11 org.eclipse.m2e.wtp.jpa/build.properties
@@ -1,11 +0,0 @@
-source.. = src/
-output.. = target/classes/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- lifecycle-mapping-metadata.xml
View
52 org.eclipse.m2e.wtp.jpa/lifecycle-mapping-metadata.xml
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<lifecycleMappingMetadata>
-
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <versionRange>[2.0,)</versionRange>
- <goals>
- <goal>compile</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <configurator>
- <id>org.eclipse.m2e.wtp.jpa.configurator.jdt</id>
- </configurator>
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <versionRange>[1.0,)</versionRange>
- <goals>
- <goal>war</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <configurator>
- <id>org.eclipse.m2e.wtp.jpa.configurator.wtp</id>
- </configurator>
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-ejb-plugin</artifactId>
- <versionRange>[1.0,)</versionRange>
- <goals>
- <goal>ejb</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <configurator>
- <id>org.eclipse.m2e.wtp.jpa.internal.configurator.wtp</id>
- </configurator>
- </action>
- </pluginExecution>
- </pluginExecutions>
-
-</lifecycleMappingMetadata>
View
4 org.eclipse.m2e.wtp.jpa/plugin.properties
@@ -1,4 +0,0 @@
-Bundle-Vendor = eclipse.org
-Bundle-Name = Maven JPA Configurator
-jpa_project_configurator = JPA configurator for JDT projects
-jpa_project_configurator_wtp = JPA configurator for WTP projects
View
22 org.eclipse.m2e.wtp.jpa/plugin.xml
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
- </extension>
- <extension point="org.eclipse.m2e.core.projectConfigurators">
- <configurator
- id="org.eclipse.m2e.wtp.jpa.configurator.jdt"
- class="org.eclipse.m2e.wtp.jpa.internal.configurators.JpaProjectConfigurator"
- name="%jpa_project_configurator"
- secondaryTo="org.eclipse.m2e.jdt.javaConfigurator"/>
- </extension>
- <extension point="org.eclipse.m2e.core.projectConfigurators">
- <configurator
- id="org.eclipse.m2e.wtp.jpa.configurator.wtp"
- class="org.eclipse.m2e.wtp.jpa.internal.configurators.JpaProjectConfigurator"
- name="%jpa_project_configurator_wtp"
- secondaryTo="org.maven.ide.eclipse.configuration.wtp.configurator"/>
- </extension>
-
-</plugin>
View
15 org.eclipse.m2e.wtp.jpa/pom.xml
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.eclipse.m2e.wtp</groupId>
- <artifactId>org.eclipse.m2e.wtp.parent</artifactId>
- <version>0.17.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.m2e.wtp.jpa</artifactId>
- <packaging>eclipse-plugin</packaging>
-
- <name>M2E-WTP :: JPA Support</name>
-</project>
View
61 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/AbstractPlatformIdentifier.java
@@ -1,61 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2012 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Fred Bricon (Red Hat, Inc.) - initial API and implementation
- ************************************************************************************/
-package org.eclipse.m2e.wtp.jpa;
-
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperties;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty;
-
-/**
- * Base class for identifying platform ids from a {@link XmlPersistenceUnit}
- *
- * @author Fred Bricon
- *
- */
-public abstract class AbstractPlatformIdentifier implements IPlatformIdentifier {
-
-
- public String getPlatformId(XmlPersistenceUnit xmlPersistenceUnit) {
- if (xmlPersistenceUnit == null) {
- return null;
- }
-
- String platformId = identifyProvider(xmlPersistenceUnit.getProvider());
- if (platformId != null) {
- return platformId;
- }
-
- XmlProperties properties = xmlPersistenceUnit.getProperties();
- if (properties != null && properties.getProperties() != null) {
- for (XmlProperty property : properties.getProperties()){
- platformId = identifyProperty(property);
- if (platformId != null) {
- return platformId;
- }
- }
- }
-
- return null;
- }
-
- /**
- * Returns the platformId associated with a given provider
- * or <code>null</code> if the provider doesn't match.
- */
- protected abstract String identifyProvider(String provider);
-
- /**
- * Returns the platformId from a given {@link XmlProperty}
- * or <code>null</code> if the property doesn't match
- */
- protected abstract String identifyProperty(XmlProperty property);
-
-}
View
30 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/IPlatformIdentifier.java
@@ -1,30 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2012 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Fred Bricon (Red Hat, Inc.) - initial API and implementation
- ************************************************************************************/
-package org.eclipse.m2e.wtp.jpa;
-
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-
-/**
- * Identifies a JPA platform id (as defined in {@link JpaPlatformDescription}) from a given {@link XmlPersistenceUnit}
- *
- * @author Fred Bricon
- *
- * @see JpaPlatformDescription
- * @see XmlPersistenceUnit
- */
-public interface IPlatformIdentifier {
-
- /**
- * Returns a {@link JpaPlatformDescription} id inferred from a given {@link XmlPersistenceUnit}
- */
- String getPlatformId(XmlPersistenceUnit persistenceUnit);
-}
View
73 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/PlatformIdentifierManager.java
@@ -1,73 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2012 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Fred Bricon (Red Hat, Inc.) - initial API and implementation
- ************************************************************************************/
-package org.eclipse.m2e.wtp.jpa;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty;
-
-/**
- * JPA Platform manager, used to identify a JPA Platform from the content of a persistence.xml
- *
- * @author Fred Bricon
- */
-public class PlatformIdentifierManager {
-
- private List<IPlatformIdentifier> platformIdentifiers = new ArrayList<IPlatformIdentifier>();
-
- public PlatformIdentifierManager() {
- //TODO use extension points
- platformIdentifiers.add(new ReallySimplePlatformIdentifer("hibernate"));
- platformIdentifiers.add(new ReallySimplePlatformIdentifer("eclipselink"));
- }
-
- /**
- * Identifies a JPA Platform from the {@link XmlPersistenceUnit} of a persistence.xml
- * by querying all known {@link IPlatformIdentifier}s.
- *
- * @return the detected {@link JpaPlatformDescription} id or null
- */
- public String identify(XmlPersistenceUnit xmlPersistenceUnit) {
- String platformId = null;
- for (IPlatformIdentifier identifier : platformIdentifiers) {
- platformId = identifier.getPlatformId(xmlPersistenceUnit);
- if (platformId != null) {
- return platformId;
- }
- }
- return null;
- }
-
- private class ReallySimplePlatformIdentifer extends AbstractPlatformIdentifier {
-
- private final String platformName;
-
- ReallySimplePlatformIdentifer(String platformName) {
- this.platformName = platformName;
- }
-
- @Override
- protected String identifyProvider(String provider) {
- if (provider != null && provider.contains(platformName)) {
- return platformName;
- }
- return null;
- }
-
- @Override
- protected String identifyProperty(XmlProperty property) {
- return identifyProvider(property.getName());
- }
- }
-}
View
65 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/internal/MavenJpaActivator.java
@@ -1,65 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2012 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Fred Bricon (Red Hat, Inc.) - initial API and implementation
- ************************************************************************************/
-package org.eclipse.m2e.wtp.jpa.internal;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.m2e.wtp.jpa.PlatformIdentifierManager;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- *
- * @author Fred Bricon
- */
-public class MavenJpaActivator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.m2e.wtp.jpa"; //$NON-NLS-1$
-
- // The shared instance
- private static MavenJpaActivator plugin;
-
- private PlatformIdentifierManager platformIdentifierManager;
-
- public PlatformIdentifierManager getPlatformIdentifierManager() {
- return platformIdentifierManager;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- platformIdentifierManager = new PlatformIdentifierManager();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- platformIdentifierManager = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static MavenJpaActivator getDefault() {
- return plugin;
- }
-
-}
View
198 ...2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/internal/configurators/JpaProjectConfigurator.java
@@ -1,198 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2012 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Fred Bricon (Red Hat, Inc.) - initial API and implementation
- ************************************************************************************/
-package org.eclipse.m2e.wtp.jpa.internal.configurators;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jpt.common.core.resource.ResourceLocator;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProvider;
-import org.eclipse.jpt.jpa.core.internal.resource.persistence.PersistenceXmlResourceProvider;
-import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.jst.common.project.facet.core.JavaFacet;
-import org.eclipse.jst.common.project.facet.core.internal.JavaFacetUtil;
-import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderFramework;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
-import org.eclipse.m2e.core.project.configurator.ILifecycleMappingConfiguration;
-import org.eclipse.m2e.core.project.configurator.MojoExecutionKey;
-import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
-import org.eclipse.m2e.wtp.ProjectUtils;
-import org.eclipse.m2e.wtp.jpa.PlatformIdentifierManager;
-import org.eclipse.m2e.wtp.jpa.internal.MavenJpaActivator;
-import org.eclipse.m2e.wtp.jpa.internal.util.JptUtils;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject.Action;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * JPA Project configurator. Will install the JPA facet on a maven project containing a persistence.xml.
- *
- * @author Fred Bricon
- */
-@SuppressWarnings("restriction")
-public class JpaProjectConfigurator extends AbstractProjectConfigurator {
-
- private static final String JPA_NO_OP_LIBRARY_PROVIDER = "jpa-no-op-library-provider";
-
- @Override
- public void configure(ProjectConfigurationRequest request,
- IProgressMonitor monitor) throws CoreException {
- IProject project = request.getProject();
-
- if(!canConfigure(project)) {
- return;
- }
-
- IFile persistenceXml = getPersistenceXml(project);
- if (persistenceXml == null || !persistenceXml.exists()) {
- //No persistence.xml => not a JPA project
- return;
- }
-
- IFacetedProject facetedProject = ProjectFacetsManager.create(project, true, monitor);
- if (facetedProject != null) {
-
- //Refresh parent in multi-module setups, or Dali throws an exception
- ProjectUtils.refreshHierarchy(request.getMavenProject().getBasedir(),
- IResource.DEPTH_INFINITE,
- new SubProgressMonitor(monitor, 1));
-
- configureFacets(facetedProject, persistenceXml, monitor);
- }
- }
-
- private IFile getPersistenceXml(IProject project) {
- ResourceLocator resourceLocator = new MavenResourceLocator();
- IPath path = resourceLocator.getResourcePath(project, new Path("META-INF/persistence.xml"));
- IFile persistenceXml = null;
- if (path != null) {
- persistenceXml = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- return persistenceXml;
- }
-
- private void configureFacets(IFacetedProject facetedProject, IFile persistenceXml, IProgressMonitor monitor)
- throws CoreException {
-
- //Need to refresh the persistence.xml as the resource provider might crash badly on some occasions
- //if it finds the file is out-of-sync
- persistenceXml.refreshLocal(IResource.DEPTH_ZERO, null);
-
- PersistenceXmlResourceProvider provider = PersistenceXmlResourceProvider.getXmlResourceProvider(persistenceXml);
-
- JpaXmlResource jpaXmlResource = provider.getXmlResource();
-
- IProjectFacetVersion version = JptUtils.getVersion(jpaXmlResource);
-
- JpaPlatformDescription platform = getPlatform(jpaXmlResource, version);
-
- IDataModel dataModel = getDataModel(facetedProject, version, platform);
-
- Set<Action> actions = new LinkedHashSet<Action>();
- installJavaFacet(actions, facetedProject.getProject(), facetedProject);
- actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.INSTALL,
- version,
- dataModel));
- facetedProject.modify(actions, monitor);
- }
-
-
- private JpaPlatformDescription getPlatform(JpaXmlResource persistenceXml, IProjectFacetVersion facetVersion) {
- XmlPersistenceUnit xmlPersistenceUnit = JptUtils.getFirstXmlPersistenceUnit(persistenceXml);
- if (xmlPersistenceUnit == null) {
- return null;
- }
- PlatformIdentifierManager identifierManager = MavenJpaActivator.getDefault().getPlatformIdentifierManager();
- String platformType = identifierManager.identify(xmlPersistenceUnit);
- if (platformType != null) {
- for (JpaPlatformDescription platform : JptJpaCorePlugin.getJpaPlatformManager().getJpaPlatforms()) {
- if (platform.supportsJpaFacetVersion(facetVersion) && platform.getId().contains(platformType)) {
- return platform;
- }
- }
- }
- //If no adequate platform found, Dali will use a default one.
- return null;
- }
-
- private IDataModel getDataModel(IFacetedProject facetedProject,
- IProjectFacetVersion version,
- JpaPlatformDescription platform) {
-
- IDataModel dm = DataModelFactory.createDataModel(new JpaFacetInstallDataModelProvider());
-
- dm.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, version.getVersionString());
- dm.setProperty(JpaFacetDataModelProperties.PLATFORM, platform);
- dm.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, false);
- dm.setProperty(JpaFacetInstallDataModelProperties.DISCOVER_ANNOTATED_CLASSES, true);
-
- LibraryInstallDelegate libraryInstallDelegate = getNoOpLibraryProvider(facetedProject, version);
- dm.setProperty(JpaFacetInstallDataModelProperties.LIBRARY_PROVIDER_DELEGATE, libraryInstallDelegate);
-
- return dm;
- }
-
- private boolean canConfigure(IProject project) throws CoreException {
- /* FIX_POST_MIGRATION (dis/en)able configurators in prefs
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- boolean configureJpa = store.getBoolean(Activator.CONFIGURE_JPA);
- */
- return !JpaFacet.isInstalled(project)
- && project.hasNature(JavaCore.NATURE_ID);
- }
-
- private LibraryInstallDelegate getNoOpLibraryProvider(IFacetedProject facetedProject, IProjectFacetVersion facetVersion) {
- LibraryInstallDelegate libraryDelegate = new LibraryInstallDelegate(facetedProject, facetVersion);
- ILibraryProvider provider = LibraryProviderFramework.getProvider(JPA_NO_OP_LIBRARY_PROVIDER);
- libraryDelegate.setLibraryProvider(provider);
- return libraryDelegate;
- }
-
- @Override
- public boolean hasConfigurationChanged(IMavenProjectFacade newFacade,
- ILifecycleMappingConfiguration oldProjectConfiguration,
- MojoExecutionKey key, IProgressMonitor monitor) {
- //Changes to maven-compiler-plugin in pom.xml don't make it "dirty" wrt JPA config
- return false;
- }
-
- private void installJavaFacet(Set<Action> actions, IProject project, IFacetedProject facetedProject) {
- IProjectFacetVersion javaFv = JavaFacet.FACET.getVersion(JavaFacetUtil.getCompilerLevel(project));
- if(!facetedProject.hasProjectFacet(JavaFacet.FACET)) {
- actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.INSTALL, javaFv, null));
- } else if(!facetedProject.hasProjectFacet(javaFv)) {
- actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.VERSION_CHANGE, javaFv, null));
- }
- }
-}
View
242 ....m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/internal/configurators/MavenResourceLocator.java
@@ -1,242 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2012 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Fred Bricon (Red Hat, Inc.) - initial API and implementation
- ************************************************************************************/
-package org.eclipse.m2e.wtp.jpa.internal.configurators;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.util.List;
-
-import org.apache.maven.model.Resource;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.common.core.internal.resource.ModuleResourceLocator;
-import org.eclipse.jpt.common.core.internal.resource.SimpleJavaResourceLocator;
-import org.eclipse.jpt.common.core.internal.resource.WebModuleResourceLocator;
-import org.eclipse.jpt.common.core.resource.ResourceLocator;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.internal.IMavenConstants;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * Maven resource Locator
- *
- * @author Fred Bricon
- */
-@SuppressWarnings("restriction")
-public class MavenResourceLocator implements ResourceLocator {
-
- private static IPath META_INF_PATH = new Path("META-INF");
-
- private static final IProjectFacet WEB_FACET = ProjectFacetsManager.getProjectFacet("jst.web");
-
- /**
- * Accepts all resources not under the build output and test build output
- * folders
- */
- public boolean resourceLocationIsValid(IProject project, IContainer container) {
- IMavenProjectFacade mavenProjectFacade = getMavenProjectFacade(project);
- boolean accept = true;
- if (mavenProjectFacade != null
- && mavenProjectFacade.getMavenProject() != null) {
- IPath classesPath = mavenProjectFacade.getOutputLocation();
- IPath testClassesPath = mavenProjectFacade.getTestOutputLocation();
- if (classesPath.isPrefixOf(container.getFullPath())
- || testClassesPath.isPrefixOf(container.getFullPath())) {
- // Reject everything coming from target/classes and
- // target/testClasses
- accept = false;
- }
- } else {
- // Maven project not loaded yet, fallback to default behaviour.
- //System.err.println(project + " not loaded");
- accept = isResourceLocationValid(getDelegate(project), project, container);
- }
- // Sometimes src/main/resources/META-INF is not even sent immediately to
- // this method, resulting in persistence.xml not being added to the jpaFiles
- // of the jpaProject hence the creation of a
- // "The persistence.xml file does not have recognized content." error
- // marker
-
- return accept;
- }
-
- private ResourceLocator getDelegate(IProject project) {
- if (ModuleCoreNature.isFlexibleProject(project)) {
- try {
- IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- if (facetedProject != null && facetedProject.hasProjectFacet(WEB_FACET)) {
- return new WebModuleResourceLocator();
- }
- } catch (CoreException e) {
- //Ignore
- }
- return new ModuleResourceLocator();
- }
- return new SimpleJavaResourceLocator();
- }
-
- /**
- * Returns the resource path from Maven's resource folders mapped to theP
- * runtimePath.
- */
- public IPath getResourcePath(IProject project, IPath runtimePath) {
- IPath resourcePath = null;
- IMavenProjectFacade mavenProjectFacade = getMavenProjectFacade(project);
- if (mavenProjectFacade != null && mavenProjectFacade.getMavenProject() != null) {
- List<Resource> resources = mavenProjectFacade.getMavenProject().getBuild().getResources();
- for (Resource resourceFolder : resources) {
- resourcePath = getFilePath(getWorkspaceRelativePath(resourceFolder), runtimePath);
- if (resourcePath != null) {
- break;
- }
- }
- } else {
- // Maven project not loaded yet, we fallback on the JavaProject
- // source folders lookup
- IJavaProject javaProject = JavaCore.create(project);
- try {
- for (IClasspathEntry entry : javaProject.getRawClasspath()) {
- if (IClasspathEntry.CPE_SOURCE == entry.getEntryKind()) {
- resourcePath = getFilePath(entry.getPath(), runtimePath);
- if (resourcePath != null) {
- break;
- }
- }
- }
- } catch (JavaModelException e) {
- e.printStackTrace();
- }
- }
-
- // System.err.println("getResourcePath (" + project + ", " + runtimePath
- // + ") = " + resourcePath);
- if (resourcePath == null) {
- resourcePath = getDelegate(project).getResourcePath(project, runtimePath);
- }
- return resourcePath;
- }
-
- private IPath getFilePath(IPath containerPath, IPath runtimePath) {
- if (containerPath != null) {
- final IWorkspaceRoot root = ResourcesPlugin.getWorkspace()
- .getRoot();
- IFile resource = root.getFile(containerPath.append(runtimePath));
- if (resource.exists()) {
- return resource.getFullPath();
- }
- }
- return null;
- }
-
- /**
- * Returns the META-INF folder found in one of Maven's resource.
- */
- public IContainer getDefaultResourceLocation(IProject project) {
- IMavenProjectFacade mavenProjectFacade = getMavenProjectFacade(project);
- IContainer defaultLocation = null;
- if (mavenProjectFacade != null && mavenProjectFacade.getMavenProject() != null) {
- final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- for (Resource resourceFolder : mavenProjectFacade.getMavenProject().getBuild().getResources()) {
- IPath p = getWorkspaceRelativePath(resourceFolder);
- if (p != null) {
- IFolder candidate = root.getFolder(p.append(META_INF_PATH));
- if (candidate.exists()) {
- return candidate;
- }
- if (defaultLocation == null) {
- defaultLocation = candidate;
- }
- }
- }
- }
-
- if (defaultLocation == null) {
- defaultLocation = getDelegate(project).getDefaultResourceLocation(project);
- }
- return defaultLocation;
- }
-
- private IPath getWorkspaceRelativePath(Resource mavenResourceFolder) {
- File resourceDirectory = new File(mavenResourceFolder.getDirectory());
- IPath relativePath = null;
- if (resourceDirectory.exists() && resourceDirectory.isDirectory()) {
- relativePath = getWorkspaceRelativePath(mavenResourceFolder.getDirectory());
- }
- return relativePath;
- }
-
- private IPath getWorkspaceRelativePath(String absolutePath) {
- final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IPath relativePath = new Path(absolutePath).makeRelativeTo(root
- .getLocation());
- return relativePath;
- }
-
- /**
- * Returns the cached IMavenProjectFacade in m2e's project registry
- */
- private IMavenProjectFacade getMavenProjectFacade(IProject project) {
- return MavenPlugin.getMavenProjectRegistry().create(project.getFile(IMavenConstants.POM_FILE_NAME),
- true,
- new NullProgressMonitor());
- }
-
- public IPath getRuntimePath(IProject project, IPath resourcePath) {
- IPath runtimePath = getDelegate(project).getRuntimePath(project, resourcePath);
- return runtimePath;
- }
-
- /**
- * @deprecated use {@link #acceptResourceLocation(IProject, IContainer)} instead
- */
- @Deprecated
- public boolean acceptResourceLocation(IProject project, IContainer container) {
- return resourceLocationIsValid(project, container);
- }
-
-
- //FIXME workaround to deal with Dali API changes in Juno and keep backward compatibility with Indigo
- private static boolean isResourceLocationValid(ResourceLocator resourceLocator, IProject project, IContainer container) {
- Method isResourceLocationIsValid = null;
- for (Method m : resourceLocator.getClass().getMethods()) {
- if ("isResourceLocationIsValid".equals(m.getName()) || "acceptResourceLocation".equals(m.getName())) {
- isResourceLocationIsValid = m;
- break;
- }
- }
- boolean result = false;
- if (isResourceLocationIsValid != null) {
- try {
- result = (Boolean)isResourceLocationIsValid.invoke(resourceLocator, project, container);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- return result;
- }
-
-}
View
116 org.eclipse.m2e.wtp.jpa/src/org/eclipse/m2e/wtp/jpa/internal/util/JptUtils.java
@@ -1,116 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2012 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Fred Bricon (Red Hat, Inc.) - initial API and implementation
- ************************************************************************************/
-package org.eclipse.m2e.wtp.jpa.internal.util;
-
-import java.lang.reflect.Method;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.resource.ResourceLocator;
-import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence;
-import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Utility class related to the Java Persistence Toolkit
- *
- * @author Fred Bricon
- */
-public class JptUtils {
-
- private static final Logger LOG = LoggerFactory.getLogger(JptUtils.class);
-
- /**
- * @return the IFile persitence.xml handle. Can be null.
- */
- public static IFile getPersistenceXml(IProject project) {
- ResourceLocator resourceLocator = getResourceLocator(project);
- if (resourceLocator == null) {
- return null;
- }
- IPath path = resourceLocator.getResourcePath(project, new Path("META-INF/persistence.xml"));
- IFile persistenceXml = null;
- if (path != null) {
- persistenceXml = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- return persistenceXml;
- }
-
- /**
- * @return the first {@link XmlPersistenceUnit} found in persistenceXml
- */
- public static XmlPersistenceUnit getFirstXmlPersistenceUnit(JpaXmlResource persistenceXml) {
- if (persistenceXml != null && persistenceXml.getRootObject() instanceof XmlPersistence) {
- XmlPersistence xmlPersistence = (XmlPersistence)persistenceXml.getRootObject();
- List<XmlPersistenceUnit> persistenceUnits = xmlPersistence.getPersistenceUnits();
- if (persistenceUnits != null && !persistenceUnits.isEmpty()) {
- return persistenceUnits.get(0);
- }
- }
- return null;
- }
-
- /**
- * @return the JPA Facet version corresponding to the version attribute of a {@link JpaXmlResource}
- */
- public static IProjectFacetVersion getVersion(JpaXmlResource persistenceXml) {
- if (persistenceXml == null) {
- return null;
- }
- String version = persistenceXml.getVersion();
- if (version == null || version.trim().length() == 0) {
- return JpaFacet.FACET.getDefaultVersion();
- }
- return JpaFacet.FACET.getVersion(version);
- }
-
-
- /**
- * Returns the {@link ResourceLocator} for a given project.
- * <p>
- * This method was introduced to workaround a breaking change in Dali's (provisional) API : {@link JptCommonCorePlugin}.getResourceLocator
- * was removed in favor of {@link org.eclipse.jpt.common.core.internal.resource.ResourceLocatorManager}.getResourceLocator),
- * </p>
- */
- public static ResourceLocator getResourceLocator(IProject project) {
- Method getResourceLocator;
- try {
- getResourceLocator = JptCommonCorePlugin.class.getMethod("getResourceLocator", IProject.class);
- if(getResourceLocator!=null) {
- return (ResourceLocator)getResourceLocator.invoke(null, project);
- }
- } catch (NoSuchMethodException e) {
- try {
- Class<?> resourceLocatorManagerClass = Class.forName("org.eclipse.jpt.common.core.internal.resource.ResourceLocatorManager");
- Object resourceLocatorManager = resourceLocatorManagerClass.getMethod("getInstance", null).invoke(null, null);
- getResourceLocator = resourceLocatorManagerClass.getMethod("getResourceLocator", IProject.class);
- if(getResourceLocator!=null) {
- return (ResourceLocator)getResourceLocator.invoke(resourceLocatorManager, project);
- } ;
- } catch (Exception e1) {
- LOG.error("Unable to get a ResourceLocator for "+project, e1);
- }
- } catch (Exception e) {
- LOG.error("Unable to get a ResourceLocator for "+project, e);
- }
- return null;
- }
-
-}
View
6 org.eclipse.m2e.wtp.jsf.feature/.project
@@ -10,8 +10,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>
View
2 org.eclipse.m2e.wtp.jsf.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
View
4 org.eclipse.m2e.wtp.jsf.feature/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
View
8 org.eclipse.m2e.wtp.jsf/plugin.properties
@@ -1,5 +1,7 @@
-Bundle-Vendor =eclipse.org
-Bundle-Name =Maven JSF Configurator
-JSF_Project_configurator =JSF configurator
+Bundle-Vendor=eclipse.org
+Bundle-Name=Maven JSF Configurator
+JSF_Project_configurator=JSF configurator
Maven_Configuration_Problem=Maven Java EE Configuration Problem
Maven_Configuration_Problems=Maven Java EE Configuration Problems
+jsf_enabler_label=JSF Configurator
+jsf_enabler_description=The JSF Configurator adds the JSF Facet to Dynamic Web projects if JSF classpath dependencies are found.
View
9 org.eclipse.m2e.wtp.jsf/plugin.xml
@@ -28,5 +28,14 @@
<super type="org.eclipse.m2e.core.maven2Problem"/>
<persistent value="true"/>
</extension>
+ <extension
+ point="org.eclipse.m2e.wtp.javaeeConfiguratorEnabler">
+ <javaeeConfiguratorEnabler
+ id="org.eclipse.m2e.wtp.jsf.enabler"
+ label="%jsf_enabler_label"
+ description="%jsf_enabler_description"
+ configuratorIds="org.eclipse.m2e.wtp.jsf.configurator"
+ />
+ </extension>
</plugin>
View
9 ...2e.wtp.jsf/src/org/eclipse/m2e/wtp/jsf/internal/configurators/JSFProjectConfigurator.java
@@ -42,6 +42,7 @@
import org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider;
import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
+import org.eclipse.m2e.wtp.MavenWtpPlugin;
import org.eclipse.m2e.wtp.ProjectUtils;
import org.eclipse.m2e.wtp.ResourceCleaner;
import org.eclipse.m2e.wtp.WarPluginConfiguration;
@@ -78,14 +79,10 @@ private void configureInternal(MavenProject mavenProject,IProject project,
return;
}
- /*
- //FIX_POST_MIGRATION
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- boolean configureJSF = store.getBoolean(Activator.CONFIGURE_JSF);
- if (!configureJSF) {
+ boolean enabled = MavenWtpPlugin.getDefault().getMavenWtpPreferencesManager().isEnabled(getId());
+ if (!enabled) {
return;
}
- */
final IFacetedProject fproj = ProjectFacetsManager.create(project);
if (fproj != null) {
View
20 ....overlay/src/org/eclipse/m2e/wtp/overlay/internal/modulecore/OverlayVirtualComponent.java
@@ -18,7 +18,9 @@
import org.eclipse.jst.common.internal.modulecore.AddMappedOutputFoldersParticipant;
import org.eclipse.jst.common.internal.modulecore.IgnoreJavaInSourceFolderParticipant;
import org.eclipse.jst.common.internal.modulecore.SingleRootExportParticipant;
+import org.eclipse.jst.j2ee.internal.common.exportmodel.JEEHeirarchyExportParticipant;
import org.eclipse.jst.j2ee.internal.common.exportmodel.JavaEESingleRootCallback;
+import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
import org.eclipse.m2e.wtp.overlay.modulecore.IOverlayVirtualComponent;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent;
@@ -70,7 +72,6 @@ private CompositeVirtualFolder getRoot() {
return cachedRoot;
}
- //System.err.println("returning new root ");
if (project != null) {
IVirtualComponent component = ComponentCore.createComponent(project);
if (component != null) {
@@ -90,7 +91,22 @@ private FlatComponentTaskModel getOptions() {
//TODO Maybe deal with the inclusion/exclusion stuff on the participant level (using an Adapter or a Callback pattern)
IFlattenParticipant[] participants = new IFlattenParticipant[] {
new SingleRootExportParticipant(new JavaEESingleRootCallback()),
- //new JEEHeirarchyExportParticipant(), Prevents from deploying web fragments!!!
+ //JEEHeirarchyExportParticipant doesn't deploy utility java projects
+ //if JEEHeirarchyExportParticipant is skipped, utility java projects are deployed as exploded folders,
+ //only the sources, not classes; Should be deployed as zips.
+ new JEEHeirarchyExportParticipant() {
+ @Override
+ protected boolean isApprovedNesting(String parentType,
+ String childType, boolean binary) {
+ if( childType == null )
+ return false;
+ if( IJ2EEFacetConstants.UTILITY.equals(childType) && binary)
+ return false; // child utility project
+ if( IJ2EEFacetConstants.WEBFRAGMENT.equals(childType) && binary)
+ return false; // child utility project
+ return true;
+ }
+ },
new AddClasspathLibReferencesParticipant(),
new AddClasspathFoldersParticipant(),
new AddMappedOutputFoldersParticipant(),
View
4 org.eclipse.m2e.wtp.sdk.feature/.project
@@ -6,12 +6,12 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
+ <name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
View
4 org.eclipse.m2e.wtp/META-INF/MANIFEST.MF
@@ -35,7 +35,9 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.m2e.wtp.overlay;visibility:=reexport,
org.eclipse.wst.server.core,
org.sonatype.m2e.mavenarchiver;bundle-version="0.14.0",
- org.eclipse.jdt.launching
+ org.eclipse.jdt.launching,
+ org.eclipse.jst.jee.web,
+ org.eclipse.jst.jee.ejb
Bundle-Vendor: Eclipse.org - m2e-wtp
Export-Package: org.eclipse.m2e.wtp;x-friends:="org.eclipse.m2e.wtp.tests";
uses:="org.eclipse.core.runtime,
View
90 org.eclipse.m2e.wtp/plugin.xml
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
+
+ <extension-point id="javaeeConfiguratorEnabler" name="Java EE Configurator Enablers" schema="schema/javaeeConfiguratorEnablers.exsd"/>
+
<extension
point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
</extension>
@@ -214,7 +217,6 @@
<keywordReference id="org.eclipse.m2e.core.maven"/>
</page>
</extension>
-
<extension
point="org.eclipse.ui.propertyPages">
@@ -275,7 +277,36 @@
</extension>
<extension
- point="org.eclipse.m2e.core.projectConversionParticipants">
+ point="org.eclipse.m2e.core.projectConversionParticipants" >
+
+ <!-- m2e 1.3 requires all 3rd party plugins to register compatible packagings -->
+ <conversionParticipantConfiguration
+ conversionParticipantId="org.eclipse.m2e.jdt.javaProjectConversionParticipant"
+ compatiblePackagings="war,ejb,rar,app-client"
+ />
+
+ <conversionParticipantConfiguration
+ conversionParticipantId="org.eclipse.m2e.wtp.conversion.WebProjectConverter"
+ compatiblePackagings="war"
+ />
+ <conversionParticipantConfiguration
+ conversionParticipantId="org.eclipse.m2e.wtp.conversion.EjbProjectConverter"
+ compatiblePackagings="ejb"
+ />
+ <conversionParticipantConfiguration
+ conversionParticipantId="org.eclipse.m2e.wtp.conversion.ConnectorProjectConverter"
+ compatiblePackagings="rar"
+ />
+ <conversionParticipantConfiguration
+ conversionParticipantId="org.eclipse.m2e.wtp.conversion.AppClientProjectConverter"
+ compatiblePackagings="app-client"
+ />
+ <conversionParticipantConfiguration
+ conversionParticipantId="org.eclipse.m2e.wtp.conversion.EarProjectConverter"
+ compatiblePackagings="ear"
+ />
+
+
<projectConversionParticipant
class="org.eclipse.m2e.wtp.internal.conversion.WebProjectConverter"
id="org.eclipse.m2e.wtp.conversion.WebProjectConverter"
@@ -307,35 +338,8 @@
nature="org.eclipse.wst.common.modulecore.ModuleCoreNature">
</projectConversionParticipant>
- <!-- m2e 1.3 requires all 3rd party plugins to register compatible packagings -->
- <conversionParticipantConfiguration
- conversionParticipantId="org.eclipse.m2e.jdt.javaProjectConversionParticipant"
- compatiblePackagings="war,ejb,rar,app-client"
- />
-
- <conversionParticipantConfiguration
- conversionParticipantId="org.eclipse.m2e.wtp.conversion.WebProjectConverter"
- compatiblePackagings="war"
- />
- <conversionParticipantConfiguration
- conversionParticipantId="org.eclipse.m2e.wtp.conversion.EjbProjectConverter"
- compatiblePackagings="ejb"
- />
- <conversionParticipantConfiguration
- conversionParticipantId="org.eclipse.m2e.wtp.conversion.ConnectorProjectConverter"
- compatiblePackagings="rar"
- />
- <conversionParticipantConfiguration
- conversionParticipantId="org.eclipse.m2e.wtp.conversion.AppClientProjectConverter"
- compatiblePackagings="app-client"
- />
- <conversionParticipantConfiguration
- conversionParticipantId="org.eclipse.m2e.wtp.conversion.EarProjectConverter"
- compatiblePackagings="ear"
- />
</extension>
-
<extension
point="org.eclipse.m2e.jdt.classifierClasspathProviders">
<classifierClasspathProvider
@@ -349,4 +353,32 @@
name="EJB Client Classpath Provider">
</classifierClasspathProvider>
</extension>
+ <extension
+ point="org.eclipse.m2e.core.conversionEnabler">
+ <enabler
+ class="org.eclipse.m2e.wtp.internal.conversion.WebProjectConversionEnabler"
+ id="org.eclipse.m2e.wtp.conversion.web.enabler"
+ weight="50">
+ </enabler>
+ <enabler
+ class="org.eclipse.m2e.wtp.internal.conversion.EarProjectConversionEnabler"
+ id="org.eclipse.m2e.wtp.conversion.ear.enabler"
+ weight="50">
+ </enabler>
+ <enabler
+ class="org.eclipse.m2e.wtp.internal.conversion.EjbProjectConversionEnabler"
+ id="org.eclipse.m2e.wtp.conversion.ejb.enabler"
+ weight="50">
+ </enabler>
+ <enabler
+ class="org.eclipse.m2e.wtp.internal.conversion.AppClientProjectConversionEnabler"
+ id="org.eclipse.m2e.wtp.conversion.appclient.enabler"
+ weight="50">
+ </enabler>
+ <enabler
+ class="org.eclipse.m2e.wtp.internal.conversion.ConnectorProjectConversionEnabler"
+ id="org.eclipse.m2e.wtp.conversion.connector.enabler"
+ weight="50">
+ </enabler>
+ </extension>
</plugin>
View
136 org.eclipse.m2e.wtp/schema/javaeeConfiguratorEnablers.exsd
@@ -0,0 +1,136 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e.wtp" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.m2e.wtp" id="javaeeConfiguratorEnabler" name="Java EE Configurator Enablers"/>
+ </appinfo>
+ <documentation>
+ Java EE Configurator Enablers
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="javaeeConfiguratorEnabler"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="javaeeConfiguratorEnabler">
+ <annotation>
+ <documentation>
+ Java EE Configurator Enabler
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique project configurator enabler id
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="label" type="string" use="required">
+ <annotation>
+ <documentation>
+ Label of the Configurator.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ Description of the Java EE configurator this enabler targets, used as tooltip in the preference page.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="configuratorIds" type="string" use="required">
+ <annotation>
+ <documentation>
+ Comma-separated list of projectConfigurator ids this enabler targets.
+ </documentation>
+ </annotation>
+ </attribute>
+
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 0.17.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2013 Red Hat, Inc.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ </documentation>
+ </annotation>
+
+</schema>
View
2 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/AbstractProjectConfiguratorDelegate.java
@@ -19,8 +19,6 @@
import org.apache.maven.artifact.Artifact;
import org.apache.maven.project.MavenProject;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
View
2 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/ConnectorProjectConfiguratorDelegate.java
@@ -41,8 +41,6 @@
import org.eclipse.wst.common.project.facet.core.IFacetedProject.Action;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Configures Connector (RAR) projects based on their mavenè-rar-plugin configuration.
View
4 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/EarPluginConfiguration.java
@@ -162,9 +162,9 @@ public String getDefaultBundleDirectory() {
Xpp3Dom config = getConfiguration();
if(config != null) {
Xpp3Dom libDom = config.getChild("defaultLibBundleDir");
- if(libDom != null) {
+ if(libDom != null && libDom.getValue() != null) {
String libDir = libDom.getValue().trim();
- libDirectory = (libDir == null || libDir.length() == 0) ? EAR_DEFAULT_BUNDLE_DIR : libDir;
+ libDirectory = (libDir.length() == 0) ? EAR_DEFAULT_BUNDLE_DIR : libDir;
}
}
libDirectory = (libDirectory == null)?EAR_DEFAULT_BUNDLE_DIR:libDirectory;
View
2 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/ProjectUtils.java
@@ -28,10 +28,8 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
/**
* Utility class around {@link IProject}
View
17 org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/WebProjectConfiguratorDelegate.java
@@ -26,14 +26,11 @@
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
@@ -353,7 +350,6 @@ public void configureClasspath(IProject project, MavenProject mavenProject, ICla
Iterator<IClasspathEntryDescriptor> iter = classpath.getEntryDescriptors().iterator();
while (iter.hasNext()) {
IClasspathEntryDescriptor descriptor = iter.next();
- IClasspathEntry entry = descriptor.toClasspathEntry();
String scope = descriptor.getScope();
Artifact artifact = ArtifactHelper.getArtifact(mavenProject.getArtifacts(), descriptor.getArtifactKey());
@@ -376,11 +372,11 @@ public void configureClasspath(IProject project, MavenProject mavenProject, ICla
//If custom fileName is used, check if the underlying file already exists
// if it doesn't, copy and rename the artifact under the build dir
- String fileName = entry.getPath().lastSegment();
+ String fileName = descriptor.getPath().lastSegment();
if (!deployedName.equals(fileName)) {