Skip to content

Commit

Permalink
feat: polarion 2410 support (#203)
Browse files Browse the repository at this point in the history
Refs: #202
  • Loading branch information
grigoriev authored Oct 25, 2024
1 parent 80f3f85 commit 64f8a06
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void save(@NotNull ILocation location, @NotNull String content) {
save(location, content.getBytes(StandardCharsets.UTF_8));
}

public void save(@NotNull ILocation location, @NotNull byte[] content) {
public void save(@NotNull ILocation location, byte @NotNull [] content) {
Runnable runnable = () -> {
IRepositoryConnection connection = repositoryService.getConnection(location);
try (InputStream inputStream = new ByteArrayInputStream(content)) {
Expand Down Expand Up @@ -154,12 +154,11 @@ public List<Revision> listRevisions(@NotNull ILocation location, @Nullable Strin
});
}

@SuppressWarnings("unchecked")
public Collection<String> getPersistedSettingFileNames(ILocation settingsFolderLocation) {
final IRepositoryReadOnlyConnection readOnlyConnection = repositoryService.getReadOnlyConnection(settingsFolderLocation);
List<Location> subLocations = readOnlyConnection.getSubLocations(settingsFolderLocation, false);
List<ILocation> subLocations = readOnlyConnection.getSubLocations(settingsFolderLocation, false);
return subLocations.stream()
.map(Location::getLastComponent)
.map(ILocation::getLastComponent)
.filter(name -> name.endsWith(GenericNamedSettings.SETTINGS_FILE_EXTENSION))
.map(name -> name.replace(GenericNamedSettings.SETTINGS_FILE_EXTENSION, ""))
.toList();
Expand Down
36 changes: 33 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,13 @@
</build>
</profile>

<!-- deprecated profile: polarion2310 -->
<profile>
<id>polarion2310</id>
<activation>
<property>
<name>polarion2310active</name>
<value>true</value>
</property>
</activation>
<properties>
Expand All @@ -202,14 +204,17 @@
<jersey-osgi-bundle.version>2.35.0</jersey-osgi-bundle.version>

<commons-io.artifactId>org.apache.commons.io_2.11.0</commons-io.artifactId>

<slf4j-api.artifactId>slf4j-api-1.7.36</slf4j-api.artifactId>
<jaxb-api.artifactId>jaxb-api-2.4.0-b180830.0359-patched</jaxb-api.artifactId>
</properties>
</profile>

<profile>
<id>polarion2404</id>
<activation>
<property>
<name>!polarion2310active</name>
<name>!polarion2410active</name>
</property>
</activation>
<properties>
Expand All @@ -221,6 +226,31 @@
<jersey-osgi-bundle.version>2.35.0</jersey-osgi-bundle.version>

<commons-io.artifactId>commons-io-2.15.1</commons-io.artifactId>

<slf4j-api.artifactId>slf4j-api-1.7.36</slf4j-api.artifactId>
<jaxb-api.artifactId>jaxb-api-2.4.0-b180830.0359-patched</jaxb-api.artifactId>
</properties>
</profile>

<profile>
<id>polarion2410</id>
<activation>
<property>
<name>polarion2410active</name>
</property>
</activation>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<polarion.version>2410</polarion.version>

<jersey.version>2.35</jersey.version>
<jersey-osgi-bundle.version>2.35.0</jersey-osgi-bundle.version>

<commons-io.artifactId>org.apache.commons.commons-io_2.15.1</commons-io.artifactId>

<slf4j-api.artifactId>slf4j.api_1.7.36</slf4j-api.artifactId>
<jaxb-api.artifactId>jaxb-api.patched_2.4.0.b1808300359</jaxb-api.artifactId>
</properties>
</profile>

Expand Down Expand Up @@ -353,7 +383,7 @@

<dependency>
<groupId>com.polarion.thirdparty</groupId>
<artifactId>slf4j-api-1.7.36</artifactId>
<artifactId>${slf4j-api.artifactId}</artifactId>
<version>${polarion.version}</version>
<scope>provided</scope>
</dependency>
Expand All @@ -374,7 +404,7 @@

<dependency>
<groupId>com.polarion.thirdparty</groupId>
<artifactId>jaxb-api-2.4.0-b180830.0359-patched</artifactId>
<artifactId>${jaxb-api.artifactId}</artifactId>
<version>${polarion.version}</version>
<scope>provided</scope>
</dependency>
Expand Down

0 comments on commit 64f8a06

Please sign in to comment.