[netbeans] branch delivery updated: Fix option import regression
This is an automated email from the ASF dual-hosted git repository. neilcsmith pushed a commit to branch delivery in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/delivery by this push: new 97438e5b35 Fix option import regression new 49b653966b Merge pull request #6220 from mbien/fix-option-import_delivery 97438e5b35 is described below commit 97438e5b355ba6113cce48c49a1efbea3f94975d Author: Michael Bien AuthorDate: Tue Jul 18 17:00:13 2023 +0200 Fix option import regression there was a bug in the boolean logic of checkIntegrity() --- .../org/netbeans/modules/options/export/OptionsExportModel.java | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/platform/options.api/src/org/netbeans/modules/options/export/OptionsExportModel.java b/platform/options.api/src/org/netbeans/modules/options/export/OptionsExportModel.java index 7a48551aa5..f440ed0577 100644 --- a/platform/options.api/src/org/netbeans/modules/options/export/OptionsExportModel.java +++ b/platform/options.api/src/org/netbeans/modules/options/export/OptionsExportModel.java @@ -746,23 +746,24 @@ public final class OptionsExportModel { Enumeration entries = zipFile.entries(); while (entries.hasMoreElements()) { ZipEntry zipEntry = entries.nextElement(); -if (!zipEntry.isDirectory() && !checkIntegrity(zipEntry)) { +if (!zipEntry.isDirectory() && checkIntegrity(zipEntry)) { copyFile(zipEntry.getName()); } } } } +// true if ok private boolean checkIntegrity(ZipEntry entry) throws IOException { if (entry.getName().endsWith(".properties")) { try (ZipFile zip = new ZipFile(source); BufferedReader reader = new BufferedReader(new InputStreamReader(zip.getInputStream(entry), StandardCharsets.UTF_8))) { // invalid code point check JDK-8075156 -boolean corrupted = reader.lines().anyMatch(l -> l.indexOf('\u') != -1); -if (corrupted) { +boolean ok = reader.lines().noneMatch(l -> l.indexOf('\u') != -1); +if (!ok) { LOGGER.log(Level.WARNING, "ignoring corrupted properties file at {0}", entry.getName()); } -return corrupted; +return ok; } } return true; - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[netbeans] branch delivery updated: Add support for GlassFish 7.0.6 - Add support of the MicroProfile REST Client - Add a new way to start GlassFish - Add support for using @Inject to inject REST arti
This is an automated email from the ASF dual-hosted git repository. neilcsmith pushed a commit to branch delivery in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/delivery by this push: new 88dcee788e Add support for GlassFish 7.0.6 - Add support of the MicroProfile REST Client - Add a new way to start GlassFish - Add support for using @Inject to inject REST artifacts - Bug fixes and updates of various components - Bump the GlassFish version in some tests new de8dde74c1 Merge pull request #6221 from pepness/glassfish706 88dcee788e is described below commit 88dcee788e4bca2aed58ae9f0d5b97352f90b107 Author: José Contreras AuthorDate: Tue Jul 18 17:24:03 2023 -0600 Add support for GlassFish 7.0.6 - Add support of the MicroProfile REST Client - Add a new way to start GlassFish - Add support for using @Inject to inject REST artifacts - Bug fixes and updates of various components - Bump the GlassFish version in some tests --- .../modules/glassfish/common/Bundle.properties | 1 + .../modules/glassfish/common/ServerDetails.java| 14 .../glassfish/tooling/admin/AdminFactory.java | 1 + .../glassfish/tooling/data/GlassFishVersion.java | 10 - .../server/config/ConfigBuilderProvider.java | 8 ++- .../glassfish/tooling/admin/AdminFactoryTest.java | 4 ++-- .../tooling/data/GlassFishVersionTest.java | 8 +-- .../glassfish/tooling/utils/EnumUtilsTest.java | 26 +++--- 8 files changed, 53 insertions(+), 19 deletions(-) diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties index ba40e9cd3e..7babce535c 100644 --- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties +++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties @@ -172,6 +172,7 @@ STR_702_SERVER_NAME=GlassFish Server 7.0.2 STR_703_SERVER_NAME=GlassFish Server 7.0.3 STR_704_SERVER_NAME=GlassFish Server 7.0.4 STR_705_SERVER_NAME=GlassFish Server 7.0.5 +STR_706_SERVER_NAME=GlassFish Server 7.0.6 # CommonServerSupport.java MSG_FLAKEY_NETWORK=Network communication problemCould not establish \ diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java index 36c0d30b05..0d8d14f6eb 100644 --- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java +++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java @@ -356,6 +356,17 @@ public enum ServerDetails { "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/7.0.5/glassfish-7.0.5.zip";, // NOI18N "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/7.0.5/glassfish-7.0.5.zip";, // NOI18N "http://www.eclipse.org/legal/epl-2.0"; //NOI18N +), + +/** + * details for an instance of GlassFish Server 7.0.6 + */ +GLASSFISH_SERVER_7_0_6(NbBundle.getMessage(ServerDetails.class, "STR_706_SERVER_NAME", new Object[]{}), // NOI18N +"deployer:gfv700ee10", // NOI18N +706, + "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/7.0.6/glassfish-7.0.6.zip";, // NOI18N + "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/7.0.6/glassfish-7.0.6.zip";, // NOI18N +"http://www.eclipse.org/legal/epl-2.0"; //NOI18N ); /** @@ -367,6 +378,7 @@ public enum ServerDetails { public static WizardDescriptor.InstantiatingIterator getInstantiatingIterator() { return new ServerWizardIterator(new ServerDetails[]{ +GLASSFISH_SERVER_7_0_6, GLASSFISH_SERVER_7_0_5, GLASSFISH_SERVER_7_0_4, GLASSFISH_SERVER_7_0_3, @@ -396,6 +408,7 @@ public enum ServerDetails { GLASSFISH_SERVER_3_0_1, GLASSFISH_SERVER_3}, new ServerDetails[]{ +GLASSFISH_SERVER_7_0_6, GLASSFISH_SERVER_7_0_5, GLASSFISH_SERVER_7_0_4, GLASSFISH_SERVER_7_0_3, @@ -466,6 +479,7 @@ public enum ServerDetails { case GF_7_0_3: return GLASSFISH_SERVER_7_0_3.getVersion(); case GF_7_0_4: return GLASSFISH_SERVER_7_0_4.getVersion(); case GF_7_0_5: return GLASSFISH_SERVER_7_0_5.getVersion(); +case GF_7_0_6: return GLASSFISH_SERVER_7_0_6.getVersion(); default: return -1; } } diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfi
[netbeans] branch delivery updated: Revert "Use resolve() method that actually throws exception. Respect remote repository chaching."
This is an automated email from the ASF dual-hosted git repository. neilcsmith pushed a commit to branch delivery in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/delivery by this push: new f954a246d8 Revert "Use resolve() method that actually throws exception. Respect remote repository chaching." new cd844223fc Merge pull request #6228 from mbien/revert-maven-embedder-commit_delivery f954a246d8 is described below commit f954a246d84d0846cedeaa308868031a577e1e46 Author: Michael Bien AuthorDate: Wed Jul 19 05:03:41 2023 +0200 Revert "Use resolve() method that actually throws exception. Respect remote repository chaching." This reverts commit e2a14bf32a5bddabee71e0fc2e35f575f7d1aacc. fixes #6222 ArtifactResolutionExceptions when working with maven projects --- .../modules/maven/embedder/MavenEmbedder.java | 22 -- .../AbstractProjectClassPathImplTest.java | 7 +-- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/java/maven.embedder/src/org/netbeans/modules/maven/embedder/MavenEmbedder.java b/java/maven.embedder/src/org/netbeans/modules/maven/embedder/MavenEmbedder.java index 7608be2203..4bf4c38954 100644 --- a/java/maven.embedder/src/org/netbeans/modules/maven/embedder/MavenEmbedder.java +++ b/java/maven.embedder/src/org/netbeans/modules/maven/embedder/MavenEmbedder.java @@ -45,7 +45,6 @@ import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.ArtifactResolutionRequest; import org.apache.maven.artifact.resolver.ArtifactResolutionResult; -import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.cli.configuration.SettingsXmlConfigurationProcessor; import org.apache.maven.execution.DefaultMavenExecutionRequest; import org.apache.maven.execution.DefaultMavenExecutionResult; @@ -94,7 +93,6 @@ import org.openide.util.Exceptions; import org.openide.util.BaseUtilities; import org.eclipse.aether.repository.Authentication; import org.eclipse.aether.DefaultRepositorySystemSession; -import org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManagerFactory; import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory; import org.eclipse.aether.repository.LocalRepository; import org.eclipse.aether.repository.NoLocalRepositoryManagerException; @@ -372,13 +370,17 @@ public final class MavenEmbedder { */ public void resolve(Artifact sources, List remoteRepositories, ArtifactRepository localRepository) throws ArtifactResolutionException, ArtifactNotFoundException { setUpLegacySupport(); - -// must call internal Resolver API directly, as the RepositorySystem does not report an exception, -// even in ArtifactResolutionResult: resolve(ArtifactResolutionRequest request) catches the exception and -// swallows ArtifactNotFoundException. -// The existing calling code that handles these exception cannot work, in fact, when using resolve(ArtifactResolutionRequest request) API. -lookupComponent(ArtifactResolver.class).resolveAlways(sources, remoteRepositories, localRepository); +ArtifactResolutionRequest req = new ArtifactResolutionRequest(); +req.setLocalRepository(localRepository); +req.setRemoteRepositories(remoteRepositories); +req.setArtifact(sources); +req.setOffline(isOffline()); +ArtifactResolutionResult result = repositorySystem.resolve(req); normalizePath(sources); +// XXX check result for exceptions and throw them now? +for (Exception ex : result.getExceptions()) { +LOG.log(Level.FINE, null, ex); +} } //TODO possibly rename.. build sounds like something else.. @@ -509,7 +511,7 @@ public final class MavenEmbedder { return req; } - + /** * Needed to avoid an NPE in {@link org.eclipse.org.eclipse.aether.DefaultArtifactResolver#resolveArtifacts} under some conditions. * (Also {@link org.eclipse.org.eclipse.aether.DefaultMetadataResolver#resolve}; wherever a {@link org.eclipse.aether.RepositorySystemSession} is used.) @@ -522,7 +524,7 @@ public final class MavenEmbedder { } DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(); session.setOffline(isOffline()); -EnhancedLocalRepositoryManagerFactory f = lookupComponent(EnhancedLocalRepositoryManagerFactory.class); +SimpleLocalRepositoryManagerFactory f = new SimpleLocalRepositoryManagerFactory(); try { session.setLocalRepositoryManager(f.newInstance(session, new LocalRepository(getLocalRepository().getBasedir(; } catch (NoLocalRepositoryManagerException ex) { diff --git a/java/maven/test/unit/src/org/netbeans