Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

Single repo (new attempt) #29

Merged
merged 200 commits into from Mar 13, 2018
Merged

Conversation

erikkemperman
Copy link
Member

@erikkemperman erikkemperman commented Oct 14, 2017

@jdubois To make my thinking more concrete, here's a proposal to put the jhipster serverside library and jhipster-dependencies in a single repository, with all plugin configuration managed in the same place.

This would resolve the co-dependency issue I mentioned here.

I've verified that maven-release-plugin, when running mvn release:prepare from the top directory, correctly replaces all the right version properties, so I would expect mvn release:perform to work well and release all three artifacts simultaneously.

Also, Travis works because it just hands off to the maven reactor, which builds the modules in the appropriate order -- and so Travis would fail if Maven fails.

But I noticed that the server-side library doesn't have any unit tests? This means that surefire and jacoco don't actually do anything at the moment... This is already the case on current master, though, so unrelated to this PR.

For what it's worth, I think it'd be all right to consider something like this change independently of the moment at which you would like to move generator-jhipster to use the new BOM.

Finally, if we would like to add some "steroids" like @Tcharl suggested, we would now have quite a natural place to do that.

Tcharl and others added 30 commits July 9, 2017 20:24
Signed-off-by: charlie <cmordant1@gmail.com>
this poms

generator-jhipsterhttps://github.com/jhipster/jhipster-dependencies/pull/6061 complete dependencies bom
…n/master

Make sure commons-logging isn't included via spring-core
…n/spring-platform

Inherit from spring-platform instead of spring-boot-dependencies
@deepu105
Copy link
Member

deepu105 commented Mar 8, 2018 via email

@erikkemperman
Copy link
Member Author

Great! If no-one objects, I might be able to find some time to update this PR during the weekend?

@jdubois
Copy link
Member

jdubois commented Mar 9, 2018 via email

@erikkemperman
Copy link
Member Author

So, I've updated the PR, it is now based on the latest versions of both the server lib and the dependencies. The history of the jhipster-dependencies module was replayed here, so all attributions should remain valid, and the references to "PR hashtags" in commit messages were replaced with explicit URLs so they keep pointing to the old locations.

Please double-check if I am doing the right things here regarding snapshots -- I wasn't too sure what has been going on lately :-) For what it's worth, in this PR I was thinking to link the dependencies and server-lib artifacts and release them together. I've initially set the version at 2.0.0-SNAPSHOT. But note that such linkage is certainly not a requirement, if you prefer you could do it separately, and in that case the versions need not be the same.

There is a commit at the end which should not be merged, this only changes the repo and branch where Travis fetches the generator for running tests. It is just there to make the Travis build pass, let me know if you want to me get rid of it so you can merge more easily.

It still seems to me that we may be doing some things the wrong way around, if that makes sense; I have to commit and push changes to generator code (version refs) before I can run proposed adaptations to the dependencies and server-lib through CI. I guess I am missing something?

@jdubois
Copy link
Member

jdubois commented Mar 13, 2018

I'm modifying the artifactId from jhipster-server back to jhipster, there's no need to have a jhipster-server.jar

jdubois added a commit to jhipster/generator-jhipster that referenced this pull request Mar 13, 2018
@jdubois jdubois merged commit 4d2f715 into jhipster:master Mar 13, 2018
@jdubois
Copy link
Member

jdubois commented Mar 13, 2018

So this badly broke the build, because we can't do SNAPSHOT releases on JFrog :-(
We're back to doing 2 different fixed releases - not sure that the merge makes any sense anymore :-((((
I'm fixing the build first, but we'll need to think at how this can be improved

@erikkemperman
Copy link
Member Author

Ehm, not sure what you're trying to do -- but the advantage of merging these is not limited to SNAPSHOT releases in my opinion. I don't see why you couldn't link RELEASE releases in the same way. You're using maven-release-plugin, right?

Also, I am unfamiliar with JFrog but I'm assuming it has some advantages over the usual suspects for deployment that weigh more heavily than the disadvantage of not supporting snapshots?

@jdubois
Copy link
Member

jdubois commented Mar 13, 2018

no I'm just doing a "mvn deploy" to do a release, in each module (as the parent module isn't registered on Maven Central).
How do you think I should do the release?

@jdubois
Copy link
Member

jdubois commented Mar 13, 2018

OK I'm just totally lost and I can't do a release anymore, and the build is broken :-(
Doing "mvn deploy" breaks in strange ways in both the dependencies and server libs...

@erikkemperman
Copy link
Member Author

Well, I've never had to register any modules on Maven Central as the things I work on are usually there already. But I just do

mvn release:prepare
mvn release:perform

But I've tried that and it fails because we still rely on the Cairo.SNAPSHOT version of spring-platform... So that sounds like the same problem you see?

In the meantime Cairo.RC1 is out, and it looks like that will work. I'm currently preparing a PR to include that (along with aligning other dependencies).

@jdubois
Copy link
Member

jdubois commented Mar 13, 2018

OK I got it working with mvn deploy but I'm basically doing the same thing as before...

@erikkemperman
Copy link
Member Author

Are you still releasing the server-lib and dependencies separately? I thought the main idea here was to get rid of the cyclical co-dependency that we had to update the server.version properties in the dependencies POM for each new server release, and then vice versa for each dependencies release? Having them in a single repository should allow you to release them both at the same time.

I'm currently running the version bumps through Travis, including Cairo.RC1, for what it's worth.

@erikkemperman erikkemperman deleted the single-repo branch March 13, 2018 14:15
@jdubois
Copy link
Member

jdubois commented Mar 13, 2018

Yes indeed, but I'm stuck with JFrog Artifactory - when you do a SNAPSHOT release, they give you a unique ID. But you can't know that ID before releasing.... So I have no other choice than:

  • Deploy a "jhipster-dependency" and use its id in "jhipster-server"
  • Deploy "jhipster-server" and gets its new ID
  • Re-deploy "jhipster-dependency" so it uses the new "jhipster-server" ID

This is pretty stupid. But this should go away when we do non-SNAPSHOT releases on Maven Central, as we will know the IDs in advance.

@erikkemperman
Copy link
Member Author

erikkemperman commented Mar 13, 2018

Ah, I see! Hmm, that's pretty inconvenient for a lot of scenarios I would imagine... I also wonder if the release plugin recognizes those IDs as snapshots, I guess you might have to edit them manually before doing a (non-snapshot) release. Huh!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet