[572114] Add signing profile to jetty site
diff --git a/plugins/org.eclipse.wst.server.preview/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.server.preview/META-INF/MANIFEST.MF index 77cb68b..2a9cdd7 100644 --- a/plugins/org.eclipse.wst.server.preview/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.wst.server.preview/META-INF/MANIFEST.MF
@@ -9,10 +9,8 @@ Export-Package: org.eclipse.wst.server.preview.internal;x-internal:=true Require-Bundle: org.apache.commons.logging;bundle-version="[1.0.4,2.0.0)", org.eclipse.core.runtime;bundle-version="[3.21.0,4.0.0)", - org.eclipse.jetty.annotations;bundle-version="[10.0.1,11.0.0)", org.eclipse.jetty.http;bundle-version="[10.0.1,11.0.0)", org.eclipse.jetty.io;bundle-version="[10.0.1,11.0.0)", - org.eclipse.jetty.osgi.boot;bundle-version="[10.0.1,11.0.0)", org.eclipse.jetty.plus;bundle-version="[10.0.1,11.0.0)", org.eclipse.jetty.security;bundle-version="[10.0.1,11.0.0)", org.eclipse.jetty.server;bundle-version="[10.0.1,11.0.0)",
diff --git a/plugins/org.eclipse.wst.server.preview/jetty/category.xml b/plugins/org.eclipse.wst.server.preview/jetty/category.xml new file mode 100644 index 0000000..b982915 --- /dev/null +++ b/plugins/org.eclipse.wst.server.preview/jetty/category.xml
@@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<site> + <iu id="org.eclipse.jetty.webapp" version="0.0.0" /> + <iu id="org.eclipse.jetty.xml" version="0.0.0" /> +</site>
diff --git a/plugins/org.eclipse.wst.server.preview/jetty/pom.xml b/plugins/org.eclipse.wst.server.preview/jetty/pom.xml index 4b0c78e..0f0daaa 100644 --- a/plugins/org.eclipse.wst.server.preview/jetty/pom.xml +++ b/plugins/org.eclipse.wst.server.preview/jetty/pom.xml
@@ -46,15 +46,6 @@ <source>true</source> </artifact> <artifact> - <id>org.eclipse.jetty.osgi:jetty-osgi-boot:${jettyVersion}</id> - <source>true</source> - <excludes> - <exclude>*:org.eclipse.osgi:*:*</exclude> - <exclude>*:org.eclipse.osgi.services:*:*</exclude> - <exclude>*:jakarta.annotation-api:*:*</exclude> - </excludes> - </artifact> - <artifact> <id>jakarta.enterprise:jakarta.enterprise.cdi-api:2.0.2</id> </artifact> <artifact> @@ -68,4 +59,62 @@ </plugins> </build> + <profiles> + <!-- Eclipse SimRel requires all artifacts to be jar-signed. So we sign + the (non eclipse) artifacts and update the p2 metadata accordingly --> + <profile> + <id>eclipse-sign</id> + <pluginRepositories> + <pluginRepository> + <id>cbi-releases</id> + <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url> + </pluginRepository> + </pluginRepositories> + <build> + <plugins> + <plugin> + <groupId>org.eclipse.cbi.maven.plugins</groupId> + <artifactId>eclipse-jarsigner-plugin</artifactId> + <version>1.3.0</version> + <executions> + <execution> + <id>sign</id> + <goals> + <goal>sign</goal> + </goals> + <phase>prepare-package</phase> + </execution> + </executions> + <configuration> + <excludeInnerJars>true</excludeInnerJars> + <resigningStrategy>DO_NOT_RESIGN</resigningStrategy> + <archiveDirectory>target/repository/plugins/</archiveDirectory> + <processMainArtifact>false</processMainArtifact> + <processAttachedArtifacts>false</processAttachedArtifacts> + </configuration> + </plugin> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-p2-repository-plugin</artifactId> + <version>${tycho-version}</version> + <executions> + <execution> + <id>update</id> + <goals> + <goal>fix-artifacts-metadata</goal> + </goals> + <phase>prepare-package</phase> + </execution> + <execution> + <id>verify</id> + <goals> + <goal>verify-repository</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project>
diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/XMLMemento.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/XMLMemento.java index 9e32a58..c72057a 100644 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/XMLMemento.java +++ b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/XMLMemento.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 IBM Corporation and others. + * Copyright (c) 2007, 2021 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -137,7 +137,7 @@ return null; String strValue = attr.getValue(); try { - return new Integer(strValue); + return Integer.decode(strValue); } catch (NumberFormatException e) { return null; }