diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index 926e605d911..60fba4e6910 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -220,6 +220,7 @@ ${assembly-directory}/lib/annotations + copy-orbit-lib-jta-deps generate-resources @@ -487,4 +488,134 @@ --> + + + env-linux + + + Linux + + + + + + maven-dependency-plugin + + + copy-setuid-deps + generate-resources + + copy + + + + + org.eclipse.jetty.setuid + jetty-setuid-java + ${project.version} + jar + true + ${assembly-directory}/lib/setuid + + + org.eclipse.jetty.setuid + libsetuid-linux + ${project.version} + so + true + ${assembly-directory}/lib/setuid + + + + + + unpack-setuid + process-resources + + unpack + + + + + org.eclipse.jetty.setuid + jetty-setuid-java + ${project.version} + config + jar + true + ${assembly-directory} + + + + + + + + + + + env-mac + + + mac + + + + + + maven-dependency-plugin + + + copy-setuid-deps + generate-resources + + copy + + + + + org.eclipse.jetty.setuid + jetty-setuid-java + ${project.version} + jar + true + ${assembly-directory}/lib/setuid + + + org.eclipse.jetty.setuid + libsetuid-osx + ${project.version} + so + true + ${assembly-directory}/lib/setuid + + + + + + unpack-setuid + process-resources + + unpack + + + + + org.eclipse.jetty.setuid + jetty-setuid-java + ${project.version} + config + jar + true + ${assembly-directory} + + + + + + + + + + diff --git a/jetty-setuid/jetty-setuid-test/pom.xml b/jetty-setuid/jetty-setuid-test/pom.xml index 7ebfbb1d0cd..1e2f14e020c 100644 --- a/jetty-setuid/jetty-setuid-test/pom.xml +++ b/jetty-setuid/jetty-setuid-test/pom.xml @@ -71,12 +71,12 @@ org.eclipse.jetty.setuid - libsetuid_osx + libsetuid-osx ${project.version} so true target/native - libsetuid.so + @@ -85,14 +85,14 @@ - + diff --git a/jetty-setuid/jetty-setuid-test/src/test/java/org/eclipse/jetty/setuid/TestSetuid.java b/jetty-setuid/jetty-setuid-test/src/test/java/org/eclipse/jetty/setuid/TestSetuid.java index cf5d8598e97..106aaa7d9e8 100644 --- a/jetty-setuid/jetty-setuid-test/src/test/java/org/eclipse/jetty/setuid/TestSetuid.java +++ b/jetty-setuid/jetty-setuid-test/src/test/java/org/eclipse/jetty/setuid/TestSetuid.java @@ -34,10 +34,14 @@ public class TestSetuid extends TestCase try { - // TODO use the dependency plugin to grab the proper lib and put it into place, no relative goop - File lib = MavenTestingUtils.getTargetFile("native/libsetuid.so"); + /* This is a test of the -VERSION based loading mechanism, the + * jetty.lib logic in SetUID looks in a directory of jetty.lib + * and tries to load the file ending in the VERISON.so which is + * the mechanism used by default in jetty-distro now + */ + File lib = new File(MavenTestingUtils.getTargetDir(), "native"); String libPath = lib.getCanonicalPath(); - System.setProperty("jetty.libsetuid.path", libPath); + System.setProperty("jetty.lib", libPath); try diff --git a/jetty-setuid/libsetuid_linux/pom.xml b/jetty-setuid/libsetuid-linux/pom.xml similarity index 94% rename from jetty-setuid/libsetuid_linux/pom.xml rename to jetty-setuid/libsetuid-linux/pom.xml index 9d8e79b430e..0ff7300c2ee 100644 --- a/jetty-setuid/libsetuid_linux/pom.xml +++ b/jetty-setuid/libsetuid-linux/pom.xml @@ -6,16 +6,15 @@ 9.0.0-SNAPSHOT 4.0.0 - libsetuid_linux + libsetuid-linux Jetty :: SetUID Linux Native so target/native -shared -lc -ldl-shared -lc -ldl - target/libsetuid_linux.so + target/libsetuid-linux.so - libsetuid_linux maven-dependency-plugin @@ -86,7 +85,7 @@ -o - ${project.build.directory}/libsetuid.so + ${project.build.directory}/libsetuid-linux.so diff --git a/jetty-setuid/libsetuid_osx/pom.xml b/jetty-setuid/libsetuid-osx/pom.xml similarity index 94% rename from jetty-setuid/libsetuid_osx/pom.xml rename to jetty-setuid/libsetuid-osx/pom.xml index 8adda63207c..912d2b78933 100644 --- a/jetty-setuid/libsetuid_osx/pom.xml +++ b/jetty-setuid/libsetuid-osx/pom.xml @@ -6,17 +6,16 @@ 9.0.0-SNAPSHOT 4.0.0 - libsetuid_osx + libsetuid-osx Jetty :: SetUID OSX Native so target/generated -lc -ldl -dynamiclib -undefined dynamic_lookup -single_module - target/libsetuid_osx.so + target/libsetuid-osx.so - libsetuid_osx maven-dependency-plugin @@ -64,7 +63,7 @@ -o - ${project.build.directory}/libsetuid_osx.so + ${project.build.directory}/libsetuid-osx.so diff --git a/jetty-setuid/pom.xml b/jetty-setuid/pom.xml index c6d0669eeba..49e8daa0c9f 100644 --- a/jetty-setuid/pom.xml +++ b/jetty-setuid/pom.xml @@ -23,7 +23,7 @@ - jetty-setuid-linux + libsetuid-linux @@ -34,7 +34,7 @@ - jetty-setuid-osx + libsetuid-osx diff --git a/pom.xml b/pom.xml index 8ba74c34b63..eed7d4f7841 100644 --- a/pom.xml +++ b/pom.xml @@ -415,6 +415,7 @@ aggregates/jetty-all jetty-distribution jetty-runner + jetty-setuid