You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2023/12/30 14:32:47 UTC

(logging-log4j2) branch main updated (f09d1a6d68 -> 99600e21be)

This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


    from f09d1a6d68 Update `org.slf4j:slf4j-api` to version `2.0.10` (#2136)
     new 7117838e7b Delete generated module descriptors before recompilation
     new 99600e21be Remove `META-INF/versions` leftovers before compilation

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 log4j-parent/pom.xml | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)


(logging-log4j2) 02/02: Remove `META-INF/versions` leftovers before compilation

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 99600e21be99260883c4642260ef0e6ec294c9d8
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Dec 22 14:36:57 2023 +0100

    Remove `META-INF/versions` leftovers before compilation
---
 log4j-parent/pom.xml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
index 8866501c47..90d6fcdd4b 100644
--- a/log4j-parent/pom.xml
+++ b/log4j-parent/pom.xml
@@ -933,8 +933,11 @@
     <plugins>
 
       <!--
-        ~ A previous `generate-module-descriptors` execution leaves `target/classes/module-info.class` files.
-        ~ These interfere with the way the `maven-compiler-plugin` works.
+        ~ A previous `generate-module-descriptors` execution leaves:
+        ~  * `target/classes/module-info.class` files, which interferes with `maven-compiler-plugin`,
+        ~  * `target/classes/META-INF/versions` folder, which switch `bnd-maven-plugin` into MRJ mode.
+        ~
+        ~ TODO: test BND multi-release mode in 2.23.0.
         -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -953,6 +956,7 @@
                   <directory>${project.build.outputDirectory}</directory>
                   <includes>
                     <include>module-info.class</include>
+                    <include>META-INF/versions/**</include>
                   </includes>
                 </fileset>
               </filesets>


Re: (logging-log4j2) 01/02: Delete generated module descriptors before recompilation

Posted by "Piotr P. Karwasz" <pi...@gmail.com>.
Hi Volkan,

On Fri, 5 Jan 2024 at 11:30, Volkan Yazıcı <vo...@yazi.ci> wrote:
>
> > A previous `generate-module-descriptors` execution leaves
> > `target/classes/module-info.class` files. These interfere with
> > the way the `maven-compiler-plugin` works.
>
> Piotr, could you elaborate on this interference? What exactly is the
> problem we are trying to address here?
>
> I have the impression we are working around a `maven-compiler-plugin` bug.
> If it is so, is there also an associated `m-c-p` ticket?

This might even be a Java compiler bug. I have a minimal reproducible
example of the problem here:

https://github.com/copernik-eu/bug-reproducibility/tree/main/javac-module-info-bug

I'll deal with Oracle's web bug submission process later.

Piotr

Re: (logging-log4j2) 01/02: Delete generated module descriptors before recompilation

Posted by Volkan Yazıcı <vo...@yazi.ci>.
> A previous `generate-module-descriptors` execution leaves
> `target/classes/module-info.class` files. These interfere with
> the way the `maven-compiler-plugin` works.

Piotr, could you elaborate on this interference? What exactly is the
problem we are trying to address here?

I have the impression we are working around a `maven-compiler-plugin` bug.
If it is so, is there also an associated `m-c-p` ticket?

On Sat, Dec 30, 2023 at 3:33 PM <pk...@apache.org> wrote:

> This is an automated email from the ASF dual-hosted git repository.
>
> pkarwasz pushed a commit to branch main
> in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
>
> commit 7117838e7b973c4c150365678149138b642cd672
> Author: Piotr P. Karwasz <pi...@karwasz.org>
> AuthorDate: Fri Dec 22 12:53:32 2023 +0100
>
>     Delete generated module descriptors before recompilation
> ---
>  log4j-parent/pom.xml | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
> index f024dceb36..8866501c47 100644
> --- a/log4j-parent/pom.xml
> +++ b/log4j-parent/pom.xml
> @@ -932,6 +932,35 @@
>
>      <plugins>
>
> +      <!--
> +        ~ A previous `generate-module-descriptors` execution leaves
> `target/classes/module-info.class` files.
> +        ~ These interfere with the way the `maven-compiler-plugin` works.
> +        -->
> +      <plugin>
> +        <groupId>org.apache.maven.plugins</groupId>
> +        <artifactId>maven-clean-plugin</artifactId>
> +        <executions>
> +          <execution>
> +            <id>delete-module-descriptors</id>
> +            <goals>
> +              <goal>clean</goal>
> +            </goals>
> +            <phase>process-sources</phase>
> +            <configuration>
> +              <excludeDefaultDirectories>true</excludeDefaultDirectories>
> +              <filesets>
> +                <fileset>
> +                  <directory>${project.build.outputDirectory}</directory>
> +                  <includes>
> +                    <include>module-info.class</include>
> +                  </includes>
> +                </fileset>
> +              </filesets>
> +            </configuration>
> +          </execution>
> +        </executions>
> +      </plugin>
> +
>        <plugin>
>          <groupId>org.apache.maven.plugins</groupId>
>          <artifactId>maven-surefire-plugin</artifactId>
>
>

(logging-log4j2) 01/02: Delete generated module descriptors before recompilation

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 7117838e7b973c4c150365678149138b642cd672
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Dec 22 12:53:32 2023 +0100

    Delete generated module descriptors before recompilation
---
 log4j-parent/pom.xml | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
index f024dceb36..8866501c47 100644
--- a/log4j-parent/pom.xml
+++ b/log4j-parent/pom.xml
@@ -932,6 +932,35 @@
 
     <plugins>
 
+      <!--
+        ~ A previous `generate-module-descriptors` execution leaves `target/classes/module-info.class` files.
+        ~ These interfere with the way the `maven-compiler-plugin` works.
+        -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-clean-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>delete-module-descriptors</id>
+            <goals>
+              <goal>clean</goal>
+            </goals>
+            <phase>process-sources</phase>
+            <configuration>
+              <excludeDefaultDirectories>true</excludeDefaultDirectories>
+              <filesets>
+                <fileset>
+                  <directory>${project.build.outputDirectory}</directory>
+                  <includes>
+                    <include>module-info.class</include>
+                  </includes>
+                </fileset>
+              </filesets>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>