Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to merge the dependencies of multiple sbt subprojects? #16

Open
fdietze opened this issue May 5, 2017 · 11 comments
Open

How to merge the dependencies of multiple sbt subprojects? #16

fdietze opened this issue May 5, 2017 · 11 comments

Comments

@fdietze
Copy link

fdietze commented May 5, 2017

Hi,

I'm trying to merge the dependencies of multiple subprojects but it's not working. The results get overwritten by the last submitted subproject. What am I doing wrong?

Currently I'm enabling the plugin in every subproject and share these settings among them:

existingProjectId in versioneye := "58ea970b24ef3e0045217573",
publishCrossVersion in versioneye := true,

diff: woost/wust2@bef5cdf

When running

$ VERSIONEYE_API_KEY=xxxx sbt versioneye:updateProject

I get the following messages:

[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ...
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ...
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] 
[info] Project name: woost/wust2
[info] Project id: 58ea970b24ef3e0045217573
[info] Dependencies: 2
[info] Outdated: 1
[info] 
[info] You can find your updated project here: https://www.versioneye.com/user/projects/58ea970b24ef3e0045217573
[info] 
[info] 
[info] Project name: woost/wust2
[info] Project id: 58ea970b24ef3e0045217573
[info] Dependencies: 12
[info] Outdated: 4
[info] 
[info] You can find your updated project here: https://www.versioneye.com/user/projects/58ea970b24ef3e0045217573
[info] 
[info] 
[info] Project name: woost/wust2
[info] Project id: 58ea970b24ef3e0045217573
[info] Dependencies: 12
[info] Outdated: 4
[info] 
[info] You can find your updated project here: https://www.versioneye.com/user/projects/58ea970b24ef3e0045217573
...

Any suggestions?

@reiz
Copy link
Member

reiz commented Jun 7, 2017

Hi @fdietze is this issue still current?

@fdietze
Copy link
Author

fdietze commented Jun 7, 2017

Hi. I think so. I'm trying again right now...

@reiz
Copy link
Member

reiz commented Jun 7, 2017

@mp911de Can you double check this please?

@fdietze
Copy link
Author

fdietze commented Jun 7, 2017

I can confirm that the dependencies are not merged. Everytime I run versioneye:updateProject, it updates all projects in parallel, so it seems like on the website I see the dependencies of the project which finished last.

Current code is here: https://github.com/woost/wust2/tree/versioneye

@reiz
Copy link
Member

reiz commented Jun 8, 2017

Hi @fdietze can you share a link to your VersionEye project as well?

@fdietze
Copy link
Author

fdietze commented Jun 8, 2017

Hi @reiz, sure, here it is: https://www.versioneye.com/user/projects/58ea970b24ef3e0045217573

Thank you for looking into this.

@reiz
Copy link
Member

reiz commented Jun 8, 2017

Hi @fdietze as far as I can see the project contains 2 files. The build.sbt and the project/plugins.sbt file. So in general the plugin seems to work.

Could you completely delete the VersionEye project re create it with:

sbt versioneye:createProject

?

I would like to see if then everything is created correctly.

@fdietze
Copy link
Author

fdietze commented Jun 8, 2017

I deleted the project on the website and ran the following command:

$ VERSIONEYE_API_KEY=XXXXXX sbt versioneye:createProject

It seems that the command is running for each sub-project individually and therefore created separate versionEye projects for each one. That was not my goal. I'd like to have only one project being created and updated where all project module dependencies are merged together. Is this even possible?

Command output:

[...]
[info] Set current project to wust (in build file:/home/felix/projects/wust2/)
[info] .
[info] .
[info] .
[info] .
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] .
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] .
[info] .
[info] .
[info] 
[info] 
[info] 
[info] Project name: graph
[info] Project name: systemTest
[info] Project name: graph
[info] Project id: 59393b1b6725bd0012bc1f9b
[info] Project id: 59393b1b6725bd001653225c
[info] Dependencies: 5
[info] Dependencies: 4
[info] Outdated: 1
[info] Project id: 59393b1b368b080017608535
[info] Outdated: 1
[info] Dependencies: 7
[info] 
[info] 
[info] Outdated: 1
[info] 
[info] You can find your updated project here: https://www.versioneye.com/user/projects/59393b1b368b080017608535
[info] You can find your updated project here: https://www.versioneye.com/user/projects/59393b1b6725bd0012bc1f9b
[info] You can find your updated project here: https://www.versioneye.com/user/projects/59393b1b6725bd001653225c
[info] 
[info] 
[info] 
[info] .
[info] .
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] .
[info] .
[info] .
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] .
[info] .
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] .
[info] .
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] .
[info] .
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] .
[info] .
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] .
[info] .
[info] Starting to upload dependencies to https://www.versioneye.com. This can take a couple seconds ... 
[info] .
[info] 
[info] Project name: frontend
[info] Project id: 59393b1b368b0800134a3a44
[info] Dependencies: 13
[info] Outdated: 1
[info] 
[info] You can find your updated project here: https://www.versioneye.com/user/projects/59393b1b368b0800134a3a44
[info] 
java.lang.RuntimeException: Status Code: HTTP/1.1 500 Internal Server Error -> You reached the limit 
[...]
[error] (apiJS/versioneye:createProject) Status Code: HTTP/1.1 500 Internal Server Error -> You reached the limit of your current subscription. Please upgrade your plan to monitor more projects.
[error] (utilJVM/versioneye:createProject) Status Code: HTTP/1.1 500 Internal Server Error -> You reached the limit of your current subscription. Please upgrade your plan to monitor more projects.
[error] (backend/versioneye:createProject) Status Code: HTTP/1.1 500 Internal Server Error -> You reached the limit of your current subscription. Please upgrade your plan to monitor more projects.
[error] (frameworkJVM/versioneye:createProject) Status Code: HTTP/1.1 500 Internal Server Error -> You reached the limit of your current subscription. Please upgrade your plan to monitor more projects.
[error] (utilJS/versioneye:createProject) Status Code: HTTP/1.1 500 Internal Server Error -> You reached the limit of your current subscription. Please upgrade your plan to monitor more projects.
[error] (database/versioneye:createProject) Status Code: HTTP/1.1 500 Internal Server Error -> You reached the limit of your current subscription. Please upgrade your plan to monitor more projects.
[error] (frameworkJS/versioneye:createProject) Status Code: HTTP/1.1 500 Internal Server Error -> You reached the limit of your current subscription. Please upgrade your plan to monitor more projects.
[error] (apiJVM/versioneye:createProject) Status Code: HTTP/1.1 500 Internal Server Error -> You reached the limit of your current subscription. Please upgrade your plan to monitor more projects.
[error] Total time: 2 s, completed Jun 8, 2017 1:55:35 PM

@reiz
Copy link
Member

reiz commented Jun 8, 2017

@fdietze The plugin must create a separate project for each module. That's correct. But the API offers an Endpoint to merge an existing VersionEye project into another one. The VersionEye Maven Plugin is using that to merge all module project into the parent project. It seems that this plugin is not doing it.

@mp911de Can you implement this feature if you have time? It would be this Endpoint: https://www.versioneye.com/api/#!/projects/getProjectsParentIdMergeChildId.

@mp911de
Copy link
Contributor

mp911de commented Jun 8, 2017

I'll take care of it.

@reiz
Copy link
Member

reiz commented Jun 9, 2017

@mp911de Thank you :-)

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

No branches or pull requests

3 participants