From aecc2f8e83fc24acb0666acff27209d4acea5951 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 4 Aug 2020 15:45:24 -0400 Subject: [PATCH 1/4] docs: system dependencies are not always available --- .../introduction-to-dependency-mechanism.apt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt index 55de0f60b59..f6352743774 100644 --- a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt +++ b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt @@ -174,9 +174,10 @@ Introduction to the Dependency Mechanism unit tests (src/test/java) but not in the model code (src/main/java). * <>\ - This scope is similar to <<>> except that you have to provide the JAR - which contains it explicitly. The artifact is always available and is not - looked up in a repository. + Maven does not add system-scoped dependencies to any classpath. + A system scoped dependency must be added to the classpath by means + outside of Maven; for example, by placing its jar in the jre/lib/ext + directory of the virtual machine. The artifact is not looked up in a repository. * <>\ This scope is only supported on a dependency of type <<>> in the <<<\>>> section. It @@ -826,12 +827,11 @@ Introduction to the Dependency Mechanism <<>> - Dependencies with the scope are always available and are not looked - up in repository. They are usually used to tell Maven about dependencies which - are provided by the JDK or the VM. Thus, system dependencies are especially - useful for resolving dependencies on artifacts which are now provided by the - JDK, but were available as separate downloads earlier. Typical examples are - the JDBC standard extensions or the Java Authentication and Authorization + Dependencies with the scope are not looked up in the Maven repository system. + They are usually used to tell Maven about dependencies provided by the JDK or the VM. + System dependencies are especially useful for resolving dependencies on artifacts which + are now provided by the JDK, but were available as separate downloads earlier. Typical + examples are the JDBC standard extensions or the Java Authentication and Authorization Service (JAAS). A simple example would be: From 78a6a277453779c026f71b041ad8f63fbd46a08b Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 19 Apr 2023 07:14:35 -0400 Subject: [PATCH 2/4] not every dependency is loaded from a classpath --- .../introduction/introduction-to-dependency-mechanism.apt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt index a11d4680d0d..7f6804df73a 100644 --- a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt +++ b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt @@ -174,8 +174,9 @@ Introduction to the Dependency Mechanism unit tests (src/test/java) but not in the model code (src/main/java). * <>\ - Maven does not add system-scoped dependencies to any classpath. - A system scoped dependency must be added to the classpath by means + This scope indicates that the dependency is required for compilation and execution. + However, Maven will not download the dependency or add it to any classpath. + Instead Maven expects that Java will load the system scoped dependency by means outside of Maven; for example, by placing its jar in the jre/lib/ext directory of the virtual machine. The artifact is not looked up in a repository. From 4a272f18c9ec9b5c1432d5fccec4c303656a2dd2 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 19 Apr 2023 07:39:32 -0400 Subject: [PATCH 3/4] system scoped dependencies are looked up at a path --- .../introduction-to-dependency-mechanism.apt | 11 ++++++----- pom.xml | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt index 7f6804df73a..b1b7184a78e 100644 --- a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt +++ b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt @@ -175,10 +175,8 @@ Introduction to the Dependency Mechanism * <>\ This scope indicates that the dependency is required for compilation and execution. - However, Maven will not download the dependency or add it to any classpath. - Instead Maven expects that Java will load the system scoped dependency by means - outside of Maven; for example, by placing its jar in the jre/lib/ext - directory of the virtual machine. The artifact is not looked up in a repository. + However, Maven will not download the dependency from the repository system. + Instead it looks for a jar in the local file system at a specified path. * <>\ This scope is only supported on a dependency of type <<>> in the <<<\>>> section. It @@ -829,7 +827,10 @@ Introduction to the Dependency Mechanism <<>> Dependencies with the scope are not looked up in the Maven repository system. - They are usually used to tell Maven about dependencies provided by the JDK or the VM. + Instead the `dependency` element contains a `systemPath` pointing to a jar on the local + file system. + + The system scope is commonly used to tell Maven about dependencies provided by the JDK or the VM. System dependencies are especially useful for resolving dependencies on artifacts which are now provided by the JDK, but were available as separate downloads earlier. Typical examples are the JDBC standard extensions or the Java Authentication and Authorization diff --git a/pom.xml b/pom.xml index 0e09560a25f..bfef3f28819 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,8 @@ maven-site - x + x + 3.9.1 2e178502fcdbffc201671fb2537d0cb4b4cc58f8 4.0.0-alpha-5 From 2676b96af37840f1c060e8241126d5e1102aff8c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 22 Jan 2025 08:58:05 -0500 Subject: [PATCH 4/4] Remove JDBC --- .../introduction-to-dependency-mechanism.apt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt index b1b7184a78e..1e08ddcc231 100644 --- a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt +++ b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt @@ -832,11 +832,8 @@ Introduction to the Dependency Mechanism The system scope is commonly used to tell Maven about dependencies provided by the JDK or the VM. System dependencies are especially useful for resolving dependencies on artifacts which - are now provided by the JDK, but were available as separate downloads earlier. Typical - examples are the JDBC standard extensions or the Java Authentication and Authorization - Service (JAAS). - - A simple example would be: + are now provided by the JDK, but were available as separate downloads earlier. A typical + examples is the Java Authentication and Authorization Service (JAAS): +----+ @@ -844,9 +841,9 @@ Introduction to the Dependency Mechanism ... - javax.sql - jdbc-stdext - 2.0 + javax.security + jaas + 1.0.01 system ${java.home}/lib/rt.jar