Nice fix @markt! This was in my stack of changes from earlier work when we got blocked on finalizing module naming.
- Ray On Fri, Sep 18, 2020 at 4:14 PM <ma...@apache.org> wrote: > This is an automated email from the ASF dual-hosted git repository. > > markt pushed a commit to branch master > in repository https://gitbox.apache.org/repos/asf/tomcat.git > > commit 57463377fdc13556f80d8ac8f524dbf9684ca377 > Author: Mark Thomas <ma...@apache.org> > AuthorDate: Fri Sep 18 18:44:07 2020 +0100 > > Fix 64751 - Correct JPMS descriptor for embedded > --- > build.xml | 3 ++- > java/org/apache/juli/logging/LogFactory.java | 3 +++ > res/checkstyle/org-import-control.xml | 1 + > res/ide-support/eclipse/eclipse.classpath | 1 + > res/ide-support/idea/tomcat.iml | 9 +++++++++ > res/ide-support/netbeans/project.xml | 2 +- > webapps/docs/changelog.xml | 4 ++++ > 7 files changed, 21 insertions(+), 2 deletions(-) > > diff --git a/build.xml b/build.xml > index b165c5f..4badeed 100644 > --- a/build.xml > +++ b/build.xml > @@ -225,6 +225,7 @@ > > <!-- Classpaths --> > <path id="compile.classpath"> > + <pathelement location="${bnd.jar}"/> > <pathelement location="${jdt.jar}"/> > <pathelement location="${saaj-api.jar}"/> > <pathelement location="${jaxrpc-lib.jar}"/> > @@ -1596,7 +1597,7 @@ > </txt2html> > </target> > <target name="embed-jars" description="Create experimental embedded > jars" > - depends="build-manifests,setup-bnd,compile" > > + depends="build-manifests,setup-bnd,compile,package" > > > <mkdir dir="${tomcat.embed}" /> > > diff --git a/java/org/apache/juli/logging/LogFactory.java > b/java/org/apache/juli/logging/LogFactory.java > index 3cd4562..56c805a 100644 > --- a/java/org/apache/juli/logging/LogFactory.java > +++ b/java/org/apache/juli/logging/LogFactory.java > @@ -21,6 +21,8 @@ import java.nio.file.FileSystems; > import java.util.ServiceLoader; > import java.util.logging.LogManager; > > +import aQute.bnd.annotation.spi.ServiceConsumer; > + > /** > * This is a modified LogFactory that uses a simple {@link ServiceLoader} > based > * discovery mechanism with a default of using JDK based logging. An > @@ -61,6 +63,7 @@ import java.util.logging.LogManager; > * @author Costin Manolache > * @author Richard A. Sitze > */ > +@ServiceConsumer(value=org.apache.juli.logging.Log.class) > public class LogFactory { > > private static final LogFactory singleton = new LogFactory(); > diff --git a/res/checkstyle/org-import-control.xml > b/res/checkstyle/org-import-control.xml > index fc69cef..a67ffa2 100644 > --- a/res/checkstyle/org-import-control.xml > +++ b/res/checkstyle/org-import-control.xml > @@ -37,6 +37,7 @@ > <allow pkg="org.w3c.dom"/> > <allow pkg="org.xml.sax"/> > <allow pkg="org.ietf.jgss"/> > + <allow pkg="aQute.bnd.annotation.spi"/> > <subpackage name="catalina"> > <allow pkg="jakarta.annotation"/> > <allow pkg="jakarta.ejb"/> > diff --git a/res/ide-support/eclipse/eclipse.classpath > b/res/ide-support/eclipse/eclipse.classpath > index 216c5d4..73e459e 100644 > --- a/res/ide-support/eclipse/eclipse.classpath > +++ b/res/ide-support/eclipse/eclipse.classpath > @@ -29,5 +29,6 @@ > <classpathentry kind="var" > path="TOMCAT_LIBS_BASE/hamcrest-2.2/hamcrest-2.2.jar"/> > <classpathentry kind="var" > path="TOMCAT_LIBS_BASE/cglib-3.3.0/cglib-nodep-3.3.0.jar"/> > <classpathentry kind="var" > path="TOMCAT_LIBS_BASE/objenesis-3.1/objenesis-3.1.jar"/> > + <classpathentry kind="var" > path="TOMCAT_LIBS_BASE/bnd-5.1.1/biz.aQute.bnd-5.1.1.jar"/> > <classpathentry kind="output" path=".settings/output"/> > </classpath> > diff --git a/res/ide-support/idea/tomcat.iml > b/res/ide-support/idea/tomcat.iml > index 7d3e246..22834db 100644 > --- a/res/ide-support/idea/tomcat.iml > +++ b/res/ide-support/idea/tomcat.iml > @@ -110,6 +110,15 @@ > <SOURCES /> > </library> > </orderEntry> > + <orderEntry type="module-library"> > + <library> > + <CLASSES> > + <root > url="jar://$TOMCAT_BUILD_LIBS$/bnd-5.1.1/biz.aQute.bnd-5.1.1.jar!/" /> > + </CLASSES> > + <JAVADOC /> > + <SOURCES /> > + </library> > + </orderEntry> > > </component> > </module> > diff --git a/res/ide-support/netbeans/project.xml > b/res/ide-support/netbeans/project.xml > index 084b8f5..a78164c 100644 > --- a/res/ide-support/netbeans/project.xml > +++ b/res/ide-support/netbeans/project.xml > @@ -178,7 +178,7 @@ > --> > <compilation-unit> > <package-root>java</package-root> > - <classpath > mode="compile">${base.path}/jaxrpc-1.1-rc4/geronimo-spec-jaxrpc-1.1-rc4.jar:${base.path}/wsdl4j-1.6.3/wsdl4j-1.6.3.jar:${base.path}/ecj-4.15/ecj-4.15.jar:${ant.includes}/</classpath> > + <classpath > mode="compile">${base.path}/jaxrpc-1.1-rc4/geronimo-spec-jaxrpc-1.1-rc4.jar:${base.path}/wsdl4j-1.6.3/wsdl4j-1.6.3.jar:${base.path}/ecj-4.15/ecj-4.15.jar:${base.path}/bnd-5.1.1/biz.aQute.bnd-5.1.1.jar:${ant.includes}/</classpath> > <source-level>1.7</source-level> > </compilation-unit> > <compilation-unit> > diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml > index f1d7a76..26605a0 100644 > --- a/webapps/docs/changelog.xml > +++ b/webapps/docs/changelog.xml > @@ -71,6 +71,10 @@ > Allow using the utility executor for annotation scanning. Patch > provided by Jatin Kamnani. (remm) > </update> > + <fix> > + <bug>64751</bug>: Correct the JPMS module descriptor so the > embedded > + JARs may be used with JPMS. (markt) > + </fix> > </changelog> > </subsection> > <subsection name="Coyote"> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > > -- *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> (@Liferay)