#8 Rework aggregator poms
Merged 2 years ago by mkoncek. Opened 2 years ago by mkoncek.
rpms/ mkoncek/lucene refactor  into  rawhide

aggregator-analysis.pom parent-analysis.pom
file renamed
+3 -7
@@ -2,14 +2,10 @@ 

  <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/maven-v4_0_0.xsd'>

    <modelVersion>4.0.0</modelVersion>

- 

-   <groupId>org.apache.lucene</groupId>

-   <artifactId>lucene-analysis</artifactId>

-   <version></version>

+   <groupId>org.fedoraproject.xmvn.lucene</groupId>

+   <artifactId>aggregator-analysis</artifactId>

+   <version>any</version>

    <packaging>pom</packaging>

-   <name>Lucene analysis parent POM</name>

-   <description>Lucene analysis parent POM</description>

- 

    <modules>

      <module>common</module>

      <module>icu</module>

aggregator.pom parent.pom
file renamed
+6 -15
@@ -2,20 +2,13 @@ 

  <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/maven-v4_0_0.xsd'>

    <modelVersion>4.0.0</modelVersion>

- 

-   <groupId>org.apache.lucene</groupId>

-   <artifactId>lucene-parent</artifactId>

-   <version></version>

- 

+   <groupId>org.fedoraproject.xmvn.lucene</groupId>

+   <artifactId>aggregator</artifactId>

+   <version>any</version>

    <packaging>pom</packaging>

- 

-   <name>Lucene parent POM</name>

-   <description>Lucene parent POM</description>

- 

    <properties>

      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    </properties>

- 

    <modules>

      <module>analysis</module>

      <module>backward-codecs</module>
@@ -41,16 +34,14 @@ 

      <module>suggest</module>

      <module>test-framework</module>

    </modules>

- 

    <dependencies>

      <dependency>

        <groupId>junit</groupId>

        <artifactId>junit</artifactId>

-       <version>SYSTEM</version>

+       <version>any</version>

        <scope>test</scope>

      </dependency>

    </dependencies>

- 

    <build>

      <sourceDirectory>src/java</sourceDirectory>

      <testSourceDirectory>src/test</testSourceDirectory>
@@ -58,7 +49,7 @@ 

        <plugin>

          <groupId>org.apache.maven.plugins</groupId>

          <artifactId>maven-compiler-plugin</artifactId>

-         <version>SYSTEM</version>

+         <version>any</version>

          <configuration>

            <source>11</source>

            <target>11</target>
@@ -70,7 +61,7 @@ 

        <plugin>

          <groupId>org.apache.maven.plugins</groupId>

          <artifactId>maven-surefire-plugin</artifactId>

-         <version>SYSTEM</version>

+         <version>any</version>

        </plugin>

      </plugins>

      <resources>

file modified
+17 -21
@@ -1,7 +1,7 @@ 

  Summary:        High-performance, full-featured text search engine

  Name:           lucene

  Version:        9.2.0

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Epoch:          0

  # License breakdown is present in NOTICE.txt file

  License:        ASL 2.0 and MIT and BSD
@@ -10,8 +10,8 @@ 

  ExclusiveArch:  %{java_arches} noarch

  

  Source0:        https://dlcdn.apache.org/lucene/java/%{version}/lucene-%{version}-src.tgz

- Source1:        parent.pom

- Source2:        parent-analysis.pom

+ Source1:        aggregator.pom

+ Source2:        aggregator-analysis.pom

  

  Source3:        https://repo1.maven.org/maven2/org/apache/lucene/lucene-analysis-common/%{version}/lucene-analysis-common-%{version}.pom

  Source4:        https://repo1.maven.org/maven2/org/apache/lucene/lucene-analysis-icu/%{version}/lucene-analysis-icu-%{version}.pom
@@ -71,13 +71,6 @@ 

  %description javadoc

  %{summary}.

  

- %package analysis-pom

- Summary:        Lucene aggregator pom for the module analysis

- Obsoletes:      %{name}-analysis < 9

- 

- %description analysis-pom

- %{summary}.

- 

  %package analysis-common

  Summary:        Lucene module: analysis-common

  Obsoletes:      %{name}-analysis < 9
@@ -236,7 +229,6 @@ 

  find -wholename '*/src/test' -exec rm -rf {} +

  

  cp %SOURCE1 pom.xml

- %pom_xpath_set "pom:project/pom:version" "%{version}"

  

  function add_pom {

    source=${1}
@@ -249,18 +241,17 @@ 

  

  for source in $(echo %{sources} | tr ' ' '\n' | grep -v 'lucene-analysis-.*\.pom' | grep 'lucene-.*\.pom'); do

    add_pom ${source} "lucene-"

-   %pom_add_parent org.apache.lucene:lucene-parent:%{version} ${module}

+   %pom_add_parent org.fedoraproject.xmvn.lucene:aggregator:any ${module}

    %pom_xpath_set -f "pom:dependency[pom:scope='runtime']/pom:scope" "compile" ${module}

  done

  

  pushd analysis

  cp %SOURCE2 pom.xml

- %pom_xpath_set "pom:project/pom:version" "%{version}"

- %pom_add_parent org.apache.lucene:lucene-parent:%{version}

+ %pom_add_parent org.fedoraproject.xmvn.lucene:aggregator:any

  

  for source in $(echo %{sources} | tr ' ' '\n' | grep 'lucene-analysis-.*\.pom'); do

    add_pom ${source} "lucene-analysis-"

-   %pom_add_parent org.apache.lucene:lucene-analysis:%{version} ${module}

+   %pom_add_parent org.fedoraproject.xmvn.lucene:aggregator-analysis:any ${module}

  done

  popd

  
@@ -274,7 +265,8 @@ 

  %pom_disable_module morfologik analysis

  %pom_disable_module opennlp analysis

  

- %mvn_package ':lucene-parent' lucene

+ %mvn_package :aggregator __noinstall

+ %mvn_package :aggregator-analysis __noinstall

  

  %build

  # Tests have unpackaged dependencies
@@ -283,15 +275,11 @@ 

  %install

  %mvn_install

  

- %files -f .mfiles-lucene

- %license LICENSE.txt NOTICE.txt

- %doc README.md

- 

  %files javadoc -f .mfiles-javadoc

+ %license LICENSE.txt NOTICE.txt

  

  %files analysis-common -f .mfiles-lucene-analysis-common

  %files analysis-icu -f .mfiles-lucene-analysis-icu

- %files analysis-pom -f .mfiles-lucene-analysis

  %files analysis-kuromoji -f .mfiles-lucene-analysis-kuromoji

  %files analysis-nori -f .mfiles-lucene-analysis-nori

  %files analysis-phonetic -f .mfiles-lucene-analysis-phonetic
@@ -300,7 +288,12 @@ 

  %files backward-codecs -f .mfiles-lucene-backward-codecs

  %files classification -f .mfiles-lucene-classification

  %files codecs -f .mfiles-lucene-codecs

+ 

+ # core is a common dependency of all other modules

  %files core -f .mfiles-lucene-core

+ %license LICENSE.txt NOTICE.txt

+ %doc README.md

+ 

  %files expressions -f .mfiles-lucene-expressions

  %files grouping -f .mfiles-lucene-grouping

  %files highlighter -f .mfiles-lucene-highlighter
@@ -315,6 +308,9 @@ 

  %files suggest -f .mfiles-lucene-suggest

  

  %changelog

+ * Wed Oct 19 2022 Marian Koncek <mkoncek@redhat.com> - 0:9.2.0-3

+ - Do not ship parent poms

+ 

  * Tue Aug 23 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:9.2.0-2

  - Add missing Obsoletes

  - Resolves: rhbz#2119506

no initial comment

rebased onto 8a6566c

2 years ago

rebased onto e15fd1c

2 years ago

Pull-Request has been merged by mkoncek

2 years ago