205126 Java Utility jars containg wrong archive name
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html b/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html index 50febb5..f6c2bd0 100644 --- a/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html +++ b/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html
@@ -20,4 +20,5 @@ <p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=215537'>215537</a>. J2EEComponentProjectMigrator always adding WebAppLibrary classpath container</p> <p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=215538'>215538</a>. Several problems with J2EE and Web Dependencies properties pages</p> <p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=216779'>216779</a>. Unable to add specific project to web library</p> +<p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=205126'>205126</a>. Java Utility jars containg wrong archive name</p> </body></html> \ No newline at end of file
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties b/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties index 50b1c8c..2c538ad 100644 --- a/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties +++ b/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties
@@ -34,7 +34,8 @@ Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=200193 Cannot use Java project for BUJava\n\ Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=215537 J2EEComponentProjectMigrator always adding WebAppLibrary classpath container\n\ Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=215538 Several problems with J2EE and Web Dependencies properties pages\n\ -Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216779 Unable to add specific project to web library\n\ +Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216779 Unable to add specific project to web library\n\ +Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=205126 Java Utility jars containg wrong archive name\n\ \n\ # "copyright" property - text of the "Feature Update Copyright"
diff --git a/features/org.eclipse.jst.web_core.feature.patch/buildnotes_org.eclipse.jst.web_core.feature.patch.html b/features/org.eclipse.jst.web_core.feature.patch/buildnotes_org.eclipse.jst.web_core.feature.patch.html index c3dff6f..9226d8e 100644 --- a/features/org.eclipse.jst.web_core.feature.patch/buildnotes_org.eclipse.jst.web_core.feature.patch.html +++ b/features/org.eclipse.jst.web_core.feature.patch/buildnotes_org.eclipse.jst.web_core.feature.patch.html
@@ -31,5 +31,5 @@ <p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=221229'>221229</a>. A module with linked resources should not be considered single root</p> <p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=229478'>229478</a>. ComponentSaveStrategyImpl needs to respect deploy paths</p> <p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=231659'>231659</a>. EAR Libraries classpath container missing entries</p> - +<p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=205126'>205126</a>. Java Utility jars containg wrong archive name</p> </body></html> \ No newline at end of file
diff --git a/features/org.eclipse.jst.web_core.feature.patch/feature.properties b/features/org.eclipse.jst.web_core.feature.patch/feature.properties index 5630ac0..b5d2d78 100644 --- a/features/org.eclipse.jst.web_core.feature.patch/feature.properties +++ b/features/org.eclipse.jst.web_core.feature.patch/feature.properties
@@ -45,6 +45,7 @@ Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=221229 A module with linked resources should not be considered single root\n\ Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=229478 ComponentSaveStrategyImpl needs to respect deploy paths\n\ Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=231659 EAR Libraries classpath container missing entries\n\ +Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=205126 Java Utility jars containg wrong archive name\n\ \n\ # "copyright" property - text of the "Feature Update Copyright"
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AddModulestoEARPropertiesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AddModulestoEARPropertiesPage.java index c6cfcd5..2450f37 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AddModulestoEARPropertiesPage.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AddModulestoEARPropertiesPage.java
@@ -208,6 +208,7 @@ IProject proj = (IProject) javaProjectsList.get(i); IDataModel migrationdm = DataModelFactory.createDataModel(new JavaProjectMigrationDataModelProvider()); migrationdm.setProperty(IJavaProjectMigrationDataModelProperties.PROJECT_NAME, proj.getName()); + migrationdm.getDefaultOperation().execute(monitor, null); @@ -216,12 +217,12 @@ IVirtualComponent targetcomponent = ComponentCore.createComponent(proj); targetCompList.add(targetcomponent); - + refdm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, earComponent); refdm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, targetCompList); // referenced java projects should have archiveName attribute - ((Map)refdm.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP)).put(targetcomponent, proj.getName() + IJ2EEModuleConstants.JAR_EXT); + ((Map)refdm.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP)).put(targetcomponent, proj.getName().replace(' ', '_') + IJ2EEModuleConstants.JAR_EXT); refdm.getDefaultOperation().execute(monitor, null); j2eeComponentList.add(targetcomponent);
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/JavaProjectMigrationOperation.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/JavaProjectMigrationOperation.java index ce8e1c6..ea92485 100644 --- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/JavaProjectMigrationOperation.java +++ b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/JavaProjectMigrationOperation.java
@@ -58,8 +58,9 @@ } udm.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, model.getStringProperty(PROJECT_NAME)); udm.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, "1.0"); //$NON-NLS-1$ - udm.setProperty(IJ2EEModuleFacetInstallDataModelProperties.MODULE_URI, - model.getStringProperty(PROJECT_NAME) + ".jar"); //$NON-NLS-1$ + String moduleURI = model.getStringProperty(PROJECT_NAME) + ".jar"; //$NON-NLS-1$ + moduleURI = moduleURI.replace(' ', '_'); //$NON-NLS-1$ //$NON-NLS-2$ + udm.setProperty(IJ2EEModuleFacetInstallDataModelProperties.MODULE_URI, moduleURI); } catch (Exception e) { Logger.getLogger().logError(e); }