Skip to content

Commit

Permalink
Update dependencies, build plugins
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Apr 11, 2023
1 parent 3bf4720 commit b9357cc
Show file tree
Hide file tree
Showing 11 changed files with 118 additions and 88 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -193,8 +193,8 @@ public void execute() throws BuildException {
lmf_class = cm.parseType(addLocalizationUtilityPackageName("LocalizableMessageFactory")).boxify();
l_class = cm.parseType(addLocalizationUtilityPackageName("Localizer")).boxify();
lable_class = cm.parseType(addLocalizationUtilityPackageName("Localizable")).boxify();
} catch (ClassNotFoundException e) {
throw new BuildException(e); // impossible -- but why parseType throwing ClassNotFoundExceptoin!?
} catch (Throwable e) {
throw new BuildException(e); // impossible -- but why parseType throwing Exception!?
}

JFieldVar $msgFactory = clazz.field(JMod.PRIVATE|JMod.STATIC|JMod.FINAL,
Expand Down
15 changes: 1 addition & 14 deletions istack-commons/import-properties-plugin/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -65,18 +65,6 @@
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>once</forkMode>
</configuration>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -169,7 +157,6 @@
<systemPropertyVariables>
<it.projects.dir>${project.build.directory}/it</it.projects.dir>
</systemPropertyVariables>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</execution>
</executions>
Expand Down
18 changes: 15 additions & 3 deletions istack-commons/import-properties-plugin/src/test/it/sample/pom.xml
@@ -1,6 +1,6 @@
<!--
Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -43,11 +43,24 @@
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.sun.istack</groupId>
<artifactId>import-properties-plugin</artifactId>
<version>${ip.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.3.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.sun.istack</groupId>
<artifactId>import-properties-plugin</artifactId>
<version>${ip.plugin.version}</version>
<executions>
<execution>
<phase>compile</phase>
Expand All @@ -60,7 +73,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>enforce-property</id>
Expand Down
4 changes: 2 additions & 2 deletions istack-commons/maven-plugin/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -101,6 +101,7 @@
<mavenOpts>${ittest-proxy}</mavenOpts>
<properties>
<resgen.plugin.version>${project.version}</resgen.plugin.version>
<tp.compiler.release>${maven.compiler.release}</tp.compiler.release>
</properties>
</configuration>
<executions>
Expand Down Expand Up @@ -138,7 +139,6 @@
<systemPropertyVariables>
<it.projects.dir>${project.build.directory}/it</it.projects.dir>
</systemPropertyVariables>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</execution>
</executions>
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -10,7 +10,6 @@

package com.sun.istack.maven;

import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
Expand Down Expand Up @@ -94,13 +93,6 @@ public class MetainfServicesCompilerMojo extends AbstractMojo {
*/
private RepositorySystemSession repoSession;

/**
* parameter expression="${localRepository}"
* readonly
* required
*/
protected ArtifactRepository localRepository;

@Override
public void execute() throws MojoExecutionException {
getLog().info("About to compile META-INF/services files");
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -254,8 +254,8 @@ public ResourceBundle getResourceBundle(Locale locale) {
supplier_class = cm.parseType(addLocalizationUtilityPackageName("LocalizableMessageFactory.ResourceBundleSupplier")).boxify();
rbundle_class = cm.parseType("java.util.ResourceBundle").boxify();
locale_class = cm.parseType("java.util.Locale").boxify();
} catch (ClassNotFoundException e) {
throw new MojoExecutionException(e.getMessage(), e); // impossible -- but why parseType throwing ClassNotFoundExceptoin!?
} catch (Throwable e) {
throw new MojoExecutionException(e.getMessage(), e); // impossible -- but why parseType throwing Exception!?
}

JFieldVar $bundle = clazz.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL,
Expand Down
26 changes: 16 additions & 10 deletions istack-commons/maven-plugin/src/test/it/sample/pom.xml
Expand Up @@ -25,6 +25,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<resgen.plugin.version>4.0.0-SNAPSHOT</resgen.plugin.version>
<maven.compiler.release>${tp.compiler.release}</maven.compiler.release>
<maven.compiler.testRelease>${maven.compiler.release}</maven.compiler.testRelease>
</properties>

<dependencies>
Expand All @@ -46,11 +48,24 @@
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.sun.istack</groupId>
<artifactId>istack-commons-maven-plugin</artifactId>
<version>${resgen.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.sun.istack</groupId>
<artifactId>istack-commons-maven-plugin</artifactId>
<version>${resgen.plugin.version}</version>
<executions>
<execution>
<id>resource-gen</id>
Expand Down Expand Up @@ -89,15 +104,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit b9357cc

Please sign in to comment.