diff --git a/aggregator.pom b/aggregator.pom index b3ededd..407fc7e 100644 --- a/aggregator.pom +++ b/aggregator.pom @@ -2,13 +2,18 @@ 4.0.0 org.fedoraproject.xmvn.junit5 aggregator - 1.0.0 + any pom UTF-8 junit-bom + junit-jupiter + junit-jupiter-api + junit-jupiter-engine + junit-jupiter-migrationsupport + junit-jupiter-params junit-platform-commons junit-platform-console junit-platform-console-standalone @@ -17,13 +22,8 @@ junit-platform-reporting junit-platform-runner junit-platform-suite-api - junit-platform-testkit junit-platform-suite-commons - junit-jupiter - junit-jupiter-api - junit-jupiter-engine - junit-jupiter-migrationsupport - junit-jupiter-params + junit-platform-testkit junit-vintage-engine diff --git a/junit5.spec b/junit5.spec index 95a9f05..6d79545 100644 --- a/junit5.spec +++ b/junit5.spec @@ -74,33 +74,19 @@ JUnit 5 User Guide. find -name \*.jar -delete cp -p %{SOURCE100} pom.xml -cp -p %{SOURCE200} junit-platform-commons/pom.xml -cp -p %{SOURCE201} junit-platform-console/pom.xml -cp -p %{SOURCE202} junit-platform-console-standalone/pom.xml -cp -p %{SOURCE203} junit-platform-engine/pom.xml -cp -p %{SOURCE205} junit-platform-launcher/pom.xml -cp -p %{SOURCE206} junit-platform-runner/pom.xml -cp -p %{SOURCE207} junit-platform-suite-api/pom.xml -cp -p %{SOURCE208} junit-platform-reporting/pom.xml -cp -p %{SOURCE209} junit-platform-testkit/pom.xml -cp -p %{SOURCE210} junit-platform-suite-commons/pom.xml -cp -p %{SOURCE300} junit-jupiter/pom.xml -cp -p %{SOURCE301} junit-jupiter-api/pom.xml -cp -p %{SOURCE302} junit-jupiter-engine/pom.xml -cp -p %{SOURCE303} junit-jupiter-migrationsupport/pom.xml -cp -p %{SOURCE304} junit-jupiter-params/pom.xml -cp -p %{SOURCE400} junit-vintage-engine/pom.xml -cp -p %{SOURCE500} junit-bom/pom.xml -for pom in $(find -mindepth 2 -name pom.xml | grep -v tests/); do - # Set parent to aggregator - %pom_xpath_inject pom:project "org.fedoraproject.xmvn.junit5aggregator1.0.0" $pom - # OSGi BSN - bsn=$(sed 's|/pom.xml$||;s|.*/|org.|;s|-|.|g' <<<"$pom") - %pom_xpath_inject pom:project "${bsn}" $pom - # Incorrect scope - API guardian is just annotation, needed only during compilation - %pom_xpath_set -f "pom:dependency[pom:artifactId='apiguardian-api']/pom:scope" provided $pom - sed -i s/runtime/compile/ $pom +for source in $(echo %{sources} | cut -d ' ' -f3-); do + module=${source} + module=${module##*/} + module=${module%%-*} + cp -p ${source} ${module}/pom.xml + %pom_add_parent org.fedoraproject.xmvn.junit5:aggregator:any ${module} + # OSGi BSN + bsn=org.${module//-/.} + %pom_xpath_inject pom:project "${bsn}" ${module} + # Incorrect scope - API guardian is just annotation, needed only during compilation + %pom_xpath_set -f "pom:dependency[pom:artifactId='apiguardian-api']/pom:scope" provided ${module} + %pom_xpath_set -f "pom:dependency[pom:scope='runtime']/pom:scope" "compile" ${module} done %pom_remove_parent junit-bom @@ -118,7 +104,7 @@ done %build %mvn_build -f -# Build docs. Ignore exit asciidoc -- it fails for some reason, but +# Build docs. Ignore exit asciidoc -- it fails for some reason, but # still produces readable docs. asciidoc documentation/src/docs/asciidoc/index.adoc || : ln -s ../../javadoc/junit5 documentation/src/docs/api