seancorfield/depstar

`:sync-pom` and `:pom-file` options mutually exclusive

IGJoshua opened this issue · 3 comments

I'm currently publishing two different artifacts from the same repository, which requires that I include two different pom files. What I would like to be able to do is specify a new pom file and include the :sync-pom directive to reduce the manual changes I have to make on upgrading versions. If I do this using the current version of depstar, then only the original pom.xml is overwritten.

Would you be open to a pull request that implements this functionality?

I can't reproduce this. I just did the following:

(! 835)-> mkdir t
(! 836)-> cp pom.xml t/
(! 837)-> clojure -X:jar :pom-file '"t/pom.xml"' :sync-pom true :group-id foo.bar :version '"1.2.3"'
[main] INFO hf.depstar.uberjar - Synchronizing pom.xml
[main] INFO hf.depstar.uberjar - Building thin jar: next-jdbc.jar
[main] INFO hf.depstar.uberjar - Updating pom.xml file to {foo.bar/next.jdbc {:mvn/version "1.2.3"}}
[main] INFO hf.depstar.uberjar - Processing pom.xml for {foo.bar/next.jdbc {:mvn/version "1.2.3"}}
(! 838)-> git status
On branch develop
Your branch is up to date with 'origin/develop'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	t/

nothing added to commit but untracked files present (use "git add" to track)

Note that the top-level, default pom.xml file was not touched.

(! 839)-> diff pom.xml t/pom.xml 
4c4
<   <groupId>com.github.seancorfield</groupId>
---
>   <groupId>foo.bar</groupId>
6c6
<   <version>1.1.646</version>
---
>   <version>1.2.3</version>
25c25
<     <tag>v1.1.646</tag>
---
>     <tag>v1.2.3</tag>
37a38,42
>     <dependency>
>       <groupId>camel-snake-kebab</groupId>
>       <artifactId>camel-snake-kebab</artifactId>
>       <version>0.4.2</version>
>     </dependency>
47,50d51
<     <repository>
<       <id>sonatype</id>
<       <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<     </repository>

All the changes were made to the file specified via :pom-file -- as expected.

Please provide steps that you think repro the problem.

That's strange. I'll try to see if I can repro it in a smaller case today.

Any luck making a repro? (It's been a month so I'm inclined to close this out if you cannot repro)