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

Feature/performant old filmlist reader #150

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open
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
29 changes: 29 additions & 0 deletions .run/MLib [Sort pom].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MLib [Sort pom]" type="MavenRunConfiguration" factoryName="Maven">
<MavenSettings>
<option name="myGeneralSettings" />
<option name="myRunnerSettings" />
<option name="myRunnerParameters">
<MavenRunnerParameters>
<option name="profiles">
<set />
</option>
<option name="goals">
<list>
<option value="com.github.ekryd.sortpom:sortpom-maven-plugin:sort" />
<option value="-Dsort.keepBlankLines" />
<option value="-Dsort.predefinedSortOrder=recommended_2008_06" />
</list>
</option>
<option name="pomFileName" />
<option name="profilesMap">
<map />
</option>
<option name="resolveToWorkspace" value="false" />
<option name="workingDirPath" value="$PROJECT_DIR$" />
</MavenRunnerParameters>
</option>
</MavenSettings>
<method v="2" />
</configuration>
</component>
125 changes: 56 additions & 69 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wieso Spring Boot? wird doch in MLib gar nicht verwendet.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im spring Boot parent sind für viele Abhängigkeiten die Versionen aufeinander abgestimmt und getestet. Wenn wir den, wie hier von mir getan, nutzen müssen wir uns nicht um Kompatibilität einzelner Versionen zueinander kümmern. Zum updaten von dependencies können wir so auch "einfach" die Spring version erhöhen und müssen uns dann nur noch um die zusätzlichen Deps kümmern.

<version>2.6.3</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>

<groupId>de.mediathekview</groupId>
<artifactId>MLib</artifactId>
Expand Down Expand Up @@ -69,62 +76,20 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<assertj.version>3.21.0</assertj.version>
<commons-compress.version>1.21</commons-compress.version>
<commons-text.version>1.9</commons-text.version>
<gson.version>2.8.9</gson.version>
<jakarta-activation.version>2.0.1</jakarta-activation.version>
<javax-jaxb.version>2.4.0-b180830.0359</javax-jaxb.version>
<jetbrains-annotations.version>22.0.0</jetbrains-annotations.version>
<jersey.version>3.0.3</jersey.version>
<junit-jupiter.version>5.7.2</junit-jupiter.version>
<log4j2.version>2.17.1</log4j2.version>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<maven-project-info-reports-plugin.version>3.0.0</maven-project-info-reports-plugin.version>
<maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<maven-site-plugin.version>3.8.2</maven-site-plugin.version>
<mockito.version>4.2.0</mockito.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<okhttp3.version>4.9.3</okhttp3.version>
<wiremock.version>2.27.2</wiremock.version>
<wiremock.version>2.32.0</wiremock.version>
<yacl4j-core.version>0.9.2</yacl4j-core.version>
<xz.version>1.9</xz.version>
<mapstruct.version>1.4.2.Final</mapstruct.version>
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
<maven-site-plugin.version>3.8.2</maven-site-plugin.version>
<maven-project-info-reports-plugin.version>3.0.0</maven-project-info-reports-plugin.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-bom</artifactId>
<version>${log4j2.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit-jupiter.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down Expand Up @@ -185,10 +150,18 @@
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>

<!-- JUnit 5 Jupiter -->
<dependency>
Expand Down Expand Up @@ -235,11 +208,22 @@
<!-- Wiremock HTTP server mock for integration tests -->
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<artifactId>wiremock-jre8</artifactId>
<version>${wiremock.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>

</dependencies>

<build>
Expand Down Expand Up @@ -305,24 +289,28 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>${maven-install-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>${lombok-mapstruct-binding.version}</version>
</dependency>
</annotationProcessorPaths>
</configuration>
</plugin>

</plugins>
Expand All @@ -334,7 +322,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
Expand All @@ -352,7 +339,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<version>1.6.8</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't do it for the plugins inside the profile. When I do it the version is missing.

<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -363,7 +350,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<version>3.0.1</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and again

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the one before, its inside the profile so I can't do

<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/de/mediathekview/mlib/daten/Film.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package de.mediathekview.mlib.daten;

import java.io.Serial;
import java.net.URL;
import java.time.Duration;
import java.time.LocalDateTime;
Expand All @@ -8,11 +9,11 @@

/** Represents a found film. */
public class Film extends Podcast {
@Serial
private static final long serialVersionUID = -7834270191129532291L;
private final Set<URL> subtitles;
private Set<URL> subtitles;
private Map<Resolution, FilmUrl> audioDescriptions;
private Map<Resolution, FilmUrl> signLanguages;

public Film(
final UUID aUuid,
final Sender aSender,
Expand Down Expand Up @@ -119,6 +120,10 @@ public Collection<URL> getSubtitles() {
return new ArrayList<>(subtitles);
}

public void setSubtitles(Set<URL> subtitles) {
this.subtitles = subtitles;
}

@Override
public String toString() {
return "Film{"
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/de/mediathekview/mlib/daten/GeoLocations.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public enum GeoLocations {
GEO_DE_AT_CH_EU("DE-AT-CH-EU", "SAT", "EBU");

private final String description;
private String[] alternatives;
private final String[] alternatives;

GeoLocations(final String aDescription, final String... aAlternatives) {
description = aDescription;
Expand Down Expand Up @@ -47,4 +47,8 @@ public static GeoLocations getFromDescription(final String aDescription) {
public String getDescription() {
return description;
}

public String[] getAlternatives() {
return alternatives;
}
}
4 changes: 4 additions & 0 deletions src/main/java/de/mediathekview/mlib/daten/Sender.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,8 @@ public String getName() {
public String toString() {
return getName();
}

public String[] getNameAlternatives() {
return nameAlternatives;
}
}

This file was deleted.

Loading