Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

553630 invent a way to publish general purpose passage bundles for external reuse #847

Merged
merged 5 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions releng/org.eclipse.passage.publish/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
workspace/
target/
/build.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.passage.releng</name>
<name>org.eclipse.passage.publish</name>
<comment></comment>
<projects>
</projects>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${workspace}"/>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="JAVA_HOME" value="${maven.build.java.home}"/>
</mapAttribute>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/org.eclipse.passage.publish}/build.log"/>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_ENCODING" value="UTF-8"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${maven.build.command}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-DX&#13;&#10;${string_prompt:arguments to modify the arguments used for the Maven build.:-Dversion.passage=2.0.1}&#13;&#10;--fail-at-end&#13;&#10;clean&#13;&#10;resources:resources&#13;&#10;verify"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${passage.git.clone.location}/releng/org.eclipse.passage.publish"/>
</launchConfiguration>
25 changes: 25 additions & 0 deletions releng/org.eclipse.passage.publish/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# How to build?

Run `mvn`.

The pom.xml is configured to execute the default goals `clean resources:resources verify`.

# pommod

The directory `pommod` contains a small Maven based project that contains a small utility to
enrich the POM files produced by the CBI aggregator by mandatory information for upload to Maven Central.


# OSSRH

* Deploy snapshot artifacts into repository https://oss.sonatype.org/content/repositories/snapshots
* Deploy release artifacts into the staging repository https://oss.sonatype.org/service/local/staging/deploy/maven2
* Promote staged artifacts into repository 'Releases'
* Download snapshot and release artifacts from group https://oss.sonatype.org/content/groups/public
* Download snapshot, release and staged artifacts from staging group https://oss.sonatype.org/content/groups/staging

# Q & A

## Why is there a feature.xml?

This project must be of a type recognized by Tycho. It contains an empty feature.xml and is declared as packaging-type 'eclipse-feature' for that sake.
63 changes: 63 additions & 0 deletions releng/org.eclipse.passage.publish/aggr/passage.aggr
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021 ArSysOp

This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.

SPDX-License-Identifier: EPL-2.0

Contributors:
ArSysOp - initial API and implementation
-->
<aggregator:Aggregation xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:aggregator="http://www.eclipse.org/cbi/p2repo/2011/aggregator/1.1.0"
label="Passage Execute Repository Aggregation"
buildRoot="../repository" packedStrategy="SKIP" type="R"
mavenResult="true" versionFormat="MavenRelease">
<validationSets label="Main">
<contributions label="Passage ${version.passage}">
<repositories location="${p2.passage}">
<bundles name="org.eclipse.passage.lic.api" />
<bundles name="org.eclipse.passage.lic.api.source" />
<bundles name="org.eclipse.passage.lic.base" />
<bundles name="org.eclipse.passage.lic.base.source" />
<bundles name="org.eclipse.passage.lic.licenses.model" />
<bundles name="org.eclipse.passage.lic.licenses.model.source" />
<bundles name="org.eclipse.passage.lic.equinox" />
<bundles name="org.eclipse.passage.lic.equinox.source" />
<bundles name="org.eclipse.passage.lic.hc" />
<bundles name="org.eclipse.passage.lic.hc.source" />
<bundles name="org.eclipse.passage.lic.bc" />
<bundles name="org.eclipse.passage.lic.bc.source" />
<bundles name="org.eclipse.passage.lic.oshi" />
<bundles name="org.eclipse.passage.lic.oshi.source" />
</repositories>
<mavenMappings namePattern="org.eclipse.ant.core"
groupId="org.eclipse.platform" artifactId="org.eclipse.ant.core" />
<mavenMappings namePattern="org.eclipse.debug.(.*)"
groupId="org.eclipse.platform" artifactId="org.eclipse.debug.$1" />
<mavenMappings namePattern="org.eclipse.core.(.*)"
groupId="org.eclipse.platform" artifactId="org.eclipse.core.$1" />
<mavenMappings namePattern="org.eclipse.equinox(.*)"
groupId="org.eclipse.platform" artifactId="org.eclipse.equinox$1" />
<mavenMappings namePattern="org.eclipse.osgi(.*)"
groupId="org.eclipse.platform" artifactId="org.eclipse.osgi$1" />
<mavenMappings namePattern="org.apache.log4j"
groupId="log4j" artifactId="log4j" />
<mavenMappings namePattern="com.sun.jna.platform"
groupId="net.java.dev.jna" artifactId="jna-platform" />
<mavenMappings namePattern="com.sun.jna"
groupId="net.java.dev.jna" artifactId="jna" />
</contributions>
<validationRepositories
location="https://download.eclipse.org/eclipse/updates/4.14" />
<validationRepositories
location="https://download.eclipse.org/tools/orbit/downloads/latest-R" />
</validationSets>
<configurations architecture="x86_64" />
<configurations operatingSystem="macosx" windowSystem="cocoa" />
<configurations operatingSystem="linux" windowSystem="gtk" architecture="x86_64" />
</aggregator:Aggregation>
14 changes: 14 additions & 0 deletions releng/org.eclipse.passage.publish/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
###############################################################################
# Copyright (c) 2021 ArSysOp
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0/.
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# ArSysOp - initial API and implementation
###############################################################################

bin.includes = feature.xml
eparovyshnaya marked this conversation as resolved.
Show resolved Hide resolved
25 changes: 25 additions & 0 deletions releng/org.eclipse.passage.publish/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
eparovyshnaya marked this conversation as resolved.
Show resolved Hide resolved
<!--
Copyright (c) 2021 ArSysOp

This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.

SPDX-License-Identifier: EPL-2.0

Contributors:
ArSysOp - initial API and implementation
-->
<feature
id="org.eclipse.passage.releng.publish.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%providerName"
plugin="org.eclipse.passage.publish">

<description url="http://www.example.com/description">
Dummy feature. Required for the Tycho build in order to be able to configure the project with packaging type &apos;eclipse-feature&apos; to build it.
</description>

</feature>
129 changes: 129 additions & 0 deletions releng/org.eclipse.passage.publish/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
eparovyshnaya marked this conversation as resolved.
Show resolved Hide resolved
<!--
Copyright (c) 2021 ArSysOp

This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.

SPDX-License-Identifier: EPL-2.0

Contributors:
ArSysOp - initial API and implementation
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.tycho>2.3.0</version.tycho>
<version.passage>2.0.1</version.passage>
<p2.passage>https://download.eclipse.org/passage/updates/release/${version.passage}</p2.passage>
</properties>

<groupId>org.eclipse.passage</groupId>
<artifactId>org.eclipse.passage.releng.publish.feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>

<build>
<defaultGoal>clean resources:resources verify</defaultGoal>
<resources>
<resource>
<directory>aggr</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${version.tycho}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-eclipserun-plugin</artifactId>
<version>${version.tycho}</version>
<executions>
<execution>
<goals>
<goal>eclipse-run</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<!-- DO NOT FORMAT THE FOLLOWING LINE, IT MUST BE ON ONE LINE -->
<appArgLine>-application org.eclipse.cbi.p2repo.cli.headless aggregate --buildModel target/classes/passage.aggr</appArgLine>
<dependencies>
<dependency>
<artifactId>org.eclipse.cbi.p2repo.aggregator.engine.feature</artifactId>
<type>eclipse-feature</type>
</dependency>
<dependency>
<artifactId>org.eclipse.equinox.core.feature</artifactId>
<type>eclipse-feature</type>
</dependency>
<dependency>
<artifactId>org.eclipse.equinox.p2.core.feature</artifactId>
<type>eclipse-feature</type>
</dependency>
</dependencies>
<repositories>
<repository>
<id>cbi-aggregator</id>
<layout>p2</layout>
<url>https://download.eclipse.org/cbi/updates/aggregator/headless/4.13/I20200625-1232</url>
</repository>
</repositories>
<executionEnvironment>JavaSE-11</executionEnvironment>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${version.tycho}</version>
<configuration>
<strictBinIncludes>false</strictBinIncludes>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${version.tycho}</version>
<configuration>
<environments>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
</plugins>
</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>
29 changes: 29 additions & 0 deletions releng/org.eclipse.passage.publish/pommod/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
2 changes: 2 additions & 0 deletions releng/org.eclipse.passage.publish/pommod/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build.log
/dependency-reduced-pom.xml
23 changes: 23 additions & 0 deletions releng/org.eclipse.passage.publish/pommod/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.passage.releng.pommod</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${workspace}"/>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="JAVA_HOME" value="${maven.build.java.home}"/>
</mapAttribute>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/org.eclipse.passage.releng/publish/pommod}/build.log"/>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_ENCODING" value="UTF-8"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${maven.build.command}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-DX&#13;&#10;${string_prompt:arguments to modify the arguments used for the Maven build.:}&#13;&#10;--fail-at-end&#13;&#10;clean&#13;&#10;verify"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${passage.git.clone.location}/releng/org.eclipse.passage.releng/publish/pommod"/>
</launchConfiguration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${workspace}"/>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_ENCODING" value="UTF-8"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${maven.build.java.home}/bin/java.exe"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-jar releng/org.eclipse.passage.releng/publish/pommod/target/pommod.jar -dir releng/org.eclipse.passage.releng/publish/target/repository/final&#13;&#10;${string_prompt:arguments to modify the arguments used for the pommod.:-dryRun}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${passage.git.clone.location}"/>
</launchConfiguration>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021 ArSysOp and others
Copyright (c) 2021 ArSysOp

This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -35,11 +35,13 @@
<artifactId>plexus-utils</artifactId>
<version>3.1.0</version>
</dependency>
<!-- Command Line Args -->
<dependency>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
<version>2.33</version>
</dependency>
<!-- Null analysis -->
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.annotation</artifactId>
Expand Down
Loading