Skip to content
This repository has been archived by the owner on Dec 28, 2019. It is now read-only.

Cannot build project using gradle #1

Closed
xsalefter opened this issue Feb 14, 2018 · 2 comments
Closed

Cannot build project using gradle #1

xsalefter opened this issue Feb 14, 2018 · 2 comments

Comments

@xsalefter
Copy link

Hi,

I try to integrate jhipster project with activiti. Because AFAIK this modules only add dependencies to activiti cloud and just generate the example code, I don't use this module directly but just add compile dependency to my build.gradle file as follow:

compile "org.activiti.cloud:activiti-cloud-starter-configure:7-201709-EA". However, executing ./gradlew compileJava produce build error like this:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve org.activiti.cloud:activiti-cloud-starter-configure:7-201709-EA.
  Required by:
      project :
   > Could not resolve org.activiti.cloud:activiti-cloud-starter-configure:7-201709-EA.
      > Could not parse POM https://jcenter.bintray.com/org/activiti/cloud/activiti-cloud-starter-configure/7-201709-EA/activiti-cloud-starter-configure-7-201709-EA.pom
         > Could not resolve org.activiti.cloud:activiti-cloud-starters-root:7-201709-EA.
            > Could not resolve org.activiti.cloud:activiti-cloud-starters-root:7-201709-EA.
               > Could not parse POM https://jcenter.bintray.com/org/activiti/cloud/activiti-cloud-starters-root/7-201709-EA/activiti-cloud-starters-root-7-201709-EA.pom
                  > Could not resolve org.activiti.cloud:activiti-cloud-parent:7-201709-EA.
                     > Could not resolve org.activiti.cloud:activiti-cloud-parent:7-201709-EA.
                        > Could not parse POM https://jcenter.bintray.com/org/activiti/cloud/activiti-cloud-parent/7-201709-EA/activiti-cloud-parent-7-201709-EA.pom
                           > Could not resolve org.activiti:activiti-dependencies:7-201709-EA.
                              > Could not resolve org.activiti:activiti-dependencies:7-201709-EA.
                                 > Could not parse POM https://jcenter.bintray.com/org/activiti/activiti-dependencies/7-201709-EA/activiti-dependencies-7-201709-EA.pom
                                    > Could not resolve org.activiti:activiti-parent:7-201709-EA.
                                       > Could not resolve org.activiti:activiti-parent:7-201709-EA.
                                          > Could not parse POM https://jcenter.bintray.com/org/activiti/activiti-parent/7-201709-EA/activiti-parent-7-201709-EA.pom
                                             > Could not find org.springframework.boot:spring-boot-dependencies:2.0.0.M3.

Note that I try to disable jcenter() in build.gradle and add spring milestone repository, but no any luck. The project example for this issue could be found here.

Thanks.

@ryandawsonuk
Copy link

ryandawsonuk commented Feb 14, 2018

Basically the reason for this is that activiti-cloud-starter-configure:7-201709-EA is using spring-boot-dependencies:2.0.0.M3 which isn't released yet. To use that you would need access to the spring boot 2 milestones and they are not in maven central. To get them see https://github.com/Activiti/activiti-cloud-build/blob/develop/pom.xml#L139 Or you could use the equivalent from the previous version of Activiti which is for boot 1 (that would be activiti-spring-boot-starter-basic). I can explain a bit more.

The idea is that this be an optional JHipster module following http://www.jhipster.tech/modules/creating-a-module/ but we didn't get around to publishing it to npm. So it doesn't come up as an option when you do yo jhipster. But you should be able to do so if you do sudo npm link (or npm link on windows) from the directory of the generator-jhipster-activiti project (see https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md#-generator-development-setup).

I gather that you've had a look at the generator and decided to jump to doing the key bit yourself which is
https://github.com/Activiti/generator-jhipster-activiti/blob/master/generators/app/index.js#L149

(The other bits just add a sample process, a test for the process and a REST controller to illustrate interacting with the engine.)

So essentially what you're doing is http://www.baeldung.com/spring-activiti - activiti-cloud-starter-configure is the name we're currently using for activiti-spring-boot-starter-basic in v7. If you're interested in improving the generator or Activiti 7 or just want to talk more about Activiti feel free to chat at https://gitter.im/Activiti/Activiti7 (or continue to comment here if that's more convenient for you).

@xsalefter
Copy link
Author

Hi @ryandawsonuk , thanks for your prompt reply. Actually, this is my fault. I added spring milestone dependency to buildscript.repositories instead of repositories block in build.gradle. And yes, I essentially just "add" activiti in JHipster application.

So now when I add correct repository in the build.gradle file, the application is running correctly either using activiti-cloud-starter-configure or activiti-spring-boot-starter-basic (v7) dependencies.

As

.... continue to comment here if that's more convenient for you

#2 is my other questions, if you don't mind answering. However, I will close this as the problem solved now.

Thanks.

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

No branches or pull requests

2 participants