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

feat: initial implementation #3

Merged
merged 3 commits into from
Jul 3, 2024
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
10 changes: 2 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,8 @@ body:
required: true
- type: input
attributes:
label: Polarion version
description: 2310, 2404, etc...
validations:
required: true
- type: input
attributes:
label: Extension Version
description: It can be found under https://<<host>>/polarion/#/project/dev/administration/<<Extension Name>>/About
label: Version
description: Version of the software where the bug was found.
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature request
description: Request an enhancement for this Polarion extension
description: Request an enhancement for this project
labels: [enhancement]
body:
- type: markdown
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,8 @@ jobs:
gpg-private-key: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PRIVATE_KEY }}
- uses: whelk-io/maven-settings-xml-action@9dc09b23833fa9aa7f27b63db287951856f3433d # v22
with:
repositories: >
[
{
"id": "s3",
"name": "s3.sbb.polarion.maven.repo",
"url": "s3://sbb-polarion-maven-repo/polarion.mvn",
"releases": {
"enabled": "true",
"updatePolicy": "never"
}
}
]
servers: >
[
{
"id": "s3",
"username": "${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY }}",
"password": "${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY }}"
},
{
"id": "github",
"username": "${env.GITHUB_ACTOR}",
Expand Down
7 changes: 0 additions & 7 deletions .mvn/extensions.xml

This file was deleted.

11 changes: 4 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ These are mostly guidelines, not rules. Use your best judgment, and feel free to
## <a id="prerequisites"></a>Prerequisites
This project and everyone participating in it are governed by our [Code of Conduct](https://github.com/SchweizerischeBundesbahnen/.github/blob/main/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.

All contributors must have an active Polarion license. An active Polarion license means that the contributor has access to a valid Polarion license issued by Siemens, including but not limited to customer, partner, academic, trial, or demo Polarion license.

## <a id="asking-questions"></a>Asking questions
Do not know how something in this project works? Curious if this project can achieve your desired functionality? Please ask questions in this project discussions [here](../../discussions)

## <a id="what-should-i-know-before-i-get-started"></a>What should I know before I get started?

### <a id="tools-and-packages"></a>Tools and Packages
All extensions provided by SBB Polarion Team can be built, tested and packaged using Maven.
It is only possible when the dependencies are extract from Polarion installer. The process must be performed by each contributor. Please consider to use https://github.com/SchweizerischeBundesbahnen/polarion-artifacts-deployer to extract the dependencies for your own Polarion installer version.

### <a id="design-decisions"></a>Design Decisions
The generic implementation for extensions provided by SBB Polarion Team is located in [ch.sbb.polarion.extension.generic](https://github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.generic)
This project can be built, tested and packaged using Maven.
```shell
mvn clean package
```

## <a id="how-can-i-contribute"></a>How Can I Contribute?

Expand Down
75 changes: 47 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,55 @@
# Polarion ALM extension to <...>
# Export-Package Generator

This project is used to find all exported packages and append them to the MANIFEST.MF file. It searches for sub-packages within the specified root packages and creates an "Export-Package" entry in the manifest file.

This Polarion extension provides possibility to <...>
## Build

This extension can be produced using maven:
```bash
The binary artefact can be produced using maven:
```shell
mvn clean package
```

## Installation to Polarion

To install the extension to Polarion `ch.sbb.polarion.extension.<extension_name>-<version>.jar`
should be copied to `<polarion_home>/polarion/extensions/ch.sbb.polarion.extension.<extension_name>/eclipse/plugins`
It can be done manually or automated using maven build:
```bash
mvn clean install -P install-to-local-polarion
```
For automated installation with maven env variable `POLARION_HOME` should be defined and point to folder where Polarion is installed.

Changes only take effect after restart of Polarion.

## Polarion configuration

<...>


## Extension Configuration

<...>


## Usage

<...>

To use the Export-Package Generator the following changes in `pom.xml` are required:

```xml
<dependencies>
<dependency>
<groupId>ch.sbb</groupId>
<artifactId>export-package-generator</artifactId>
<version>1.0.0</version>
<scope>runtime</scope>
</dependency>
...
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>ch.sbb.export_package_generator.PackageFinder</argument>
<argument>org.apache.poi</argument> <!-- root package -->
</arguments>
</configuration>
</plugin>
...
</plugins>
...
</build>
```
139 changes: 108 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,19 @@
<project>
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>ch.sbb.polarion.extensions</groupId>
<artifactId>ch.sbb.polarion.extension.generic</artifactId>
<version>6.0.1</version>
</parent>

<artifactId>ch.sbb.polarion.extension.extension-name</artifactId>
<version>0.0.0-SNAPSHOT</version>
<groupId>ch.sbb</groupId>
<artifactId>export-package-generator</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>... extension of Polarion ALM</name>
<description>This is a Polarion extension which provides ...</description>
<url>https://github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.extension-name</url>
<name>Export-Package Generator</name>
<description>This project is used to find all exported packages and append them to the MANIFEST.MF file. It searches for sub-packages within the specified root packages and creates an "Export-Package" entry in the manifest file.</description>
<url>https://github.com/SchweizerischeBundesbahnen/ch.sbb.export-package-generator</url>

<licenses>
<license>
<name>The SBB License, Version 1.0</name>
<url>https://github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.extension-name/blob/main/LICENSES/SBB.txt</url>
<url>https://github.com/SchweizerischeBundesbahnen/ch.sbb.export-package-generator/blob/main/LICENSES/SBB.txt</url>
</license>
</licenses>

Expand All @@ -33,62 +28,144 @@
</developers>

<scm>
<connection>scm:git:git://github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.extension-name.git</connection>
<developerConnection>scm:git:ssh://github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.extension-name.git</developerConnection>
<url>http://github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.extension-name/tree/main</url>
<connection>scm:git:git://github.com/SchweizerischeBundesbahnen/ch.sbb.export-package-generator.git</connection>
<developerConnection>scm:git:ssh://github.com/SchweizerischeBundesbahnen/ch.sbb.export-package-generator.git</developerConnection>
<url>http://github.com/SchweizerischeBundesbahnen/ch.sbb.export-package-generator/tree/main</url>
</scm>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.extension-name/issues</url>
<url>https://github.com/SchweizerischeBundesbahnen/ch.sbb.export-package-generator/issues</url>
</issueManagement>

<properties>
<maven-jar-plugin.Extension-Context>extension-name</maven-jar-plugin.Extension-Context>
<maven-jar-plugin.Automatic-Module-Name>ch.sbb.polarion.extension.extension_name</maven-jar-plugin.Automatic-Module-Name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>

<web.app.name>${maven-jar-plugin.Extension-Context}</web.app.name>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<guava.version>33.2.1-jre</guava.version>
<junit-jupiter-engine.version>5.10.3</junit-jupiter-engine.version>

<!-- Maven plugins -->
<maven-clean-plugin.version>3.4.0</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>3.7.0</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-surefire-plugin.version>3.3.0</maven-surefire-plugin.version>

<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
</properties>

<dependencies>
<dependency>
<groupId>ch.sbb.polarion.extensions</groupId>
<artifactId>ch.sbb.polarion.extension.generic.app</artifactId>
<version>${project.parent.version}</version>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter-engine.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>gpg-sign</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>nexus-staging</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
</plugins>

</build>
</project>
Loading
Loading