Created attachment 590902 [details] POM file for clucy Description of problem: The latest Lucene RPM ships with POMs that have unitialized version properties, thus causing mvn-rpmpackage to fail when building a package that uses Lucene as a dependency. Version-Release number of selected component (if applicable): lucene-2.9.4-8.fc17.noarch How reproducible: Always Steps to Reproduce: 1. grep "<version>@version@</version>" *lucene*.pom | wc -l 2. Attempt to build clucy (https://github.com/weavejester/clucy) using the attached POM file Actual results: 1. => 59 2. => fails with [ERROR] Failed to execute goal on project clucy: Could not resolve dependencies for project clucy:clucy:jar:0.3.0: The following artifacts could not be resolved : org.apache.lucene:lucene-highlighter:jar:latest, org.apache.lucene:lucene-memo ry:jar:@version@: The repository system is offline but the artifact org.apache.l ucene:lucene-highlighter:jar:latest is not available in the local repository. -> [Help 1] Expected results: 1. => 0 2. => succeeds Additional info:
Created attachment 590906 [details] Patch to lucene spec to fix @version@ instantiation Patch added that fixes the issue. Please review; I can commit and do updates if you want.
Note: build is still failing: [ERROR] Failed to execute goal on project clucy: Could not resolve dependencies for project clucy:clucy:jar:0.3.0: The following artifacts could not be resolved: org.apache.lucene:lucene-highlighter:jar:2.9.4, org.apache.lucene:lucene-memory:jar:2.9.4: The repository system is offline but the artifact org.apache.lucene:lucene-highlighter:jar:2.9.4 is not available in the local repository. -> [Help 1] let me check the way lucene registers its POMs as well, something might be wrong
OK, the problem was really that I needed to depend on lucene-contrib -- the @version@ issue is just an annoyance as mvn-rpmbuild really ignores versions. But it's still nice to have a fix, regardless. Build now succeeds.
Patch release into rawhide. Verified by unpacking built rpms and ensuring find . -name *.pom -exec grep -H @version@ {} \; returned no results. Thanks for the patch, it's really appreciated!