You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Examine the pom.properties files embedded into the output jar file in each of the solr6, solr7, and solr8 subdirectories of target.
The solrj.major.version property will not be in those files.
Actual behavior :pom-addition from profiles is not used.
Expected behavior :pom-addition from profiles should be used, potentially merged with :pom-addition at the top-level of the project (where it may be needed to override pom content, such as reporting).
Environment
Leiningen Version: 2.9.4.
Leiningen installation method: lein script
JDK Version: 1.8
OS: Debian stretch
Anything else that might be relevant to your problem?
Tried adding ^:leaky to the profile metadata, but no difference.
The need here stems from having to support multiple versions of SolrJ in the clojure-solr fork I've been maintaining for a number of years. The library is built with classifiers for account for different SolrJ major versions. To try to obscure some breaking changes between versions 6, 7 and 8, the Clojure library attempts to figure out which SolrJ version it's been compiled against. In test code, it can do this by reading the manifest.mf file for EmbeddedSolrServer, but that doesn't get included into Clojure uberjars built against the clojure-solr library. But clojure-solr's pom.properties does appear in the uberjar, so I thought it would work to write the major version into that file via :pom-addition and read it at runtime. But I can't figure out how to write different values into pom.properties for different Solr versions.
The text was updated successfully, but these errors were encountered:
technomancy
changed the title
Unable to generate custom pom.properties on a profile-by-profile basis using classifiers
Generate custom pom.properties on a profile-by-profile basis using classifiers
Apr 8, 2022
Describe the bug
:pom-addition
in profiles, invoked via:classifiers
doesn't affect pom.properties in classified jar files.To Reproduce
Here's a test case project.clj:
Actual behavior
:pom-addition
from profiles is not used.Expected behavior
:pom-addition
from profiles should be used, potentially merged with:pom-addition
at the top-level of the project (where it may be needed to override pom content, such as reporting).Environment
Tried adding
^:leaky
to the profile metadata, but no difference.The need here stems from having to support multiple versions of SolrJ in the clojure-solr fork I've been maintaining for a number of years. The library is built with classifiers for account for different SolrJ major versions. To try to obscure some breaking changes between versions 6, 7 and 8, the Clojure library attempts to figure out which SolrJ version it's been compiled against. In test code, it can do this by reading the manifest.mf file for
EmbeddedSolrServer
, but that doesn't get included into Clojure uberjars built against the clojure-solr library. But clojure-solr's pom.properties does appear in the uberjar, so I thought it would work to write the major version into that file via:pom-addition
and read it at runtime. But I can't figure out how to write different values into pom.properties for different Solr versions.The text was updated successfully, but these errors were encountered: