We have exiting maven projects and we tried to migrate them using gradle init. It migrated projects but when i try to import in the tools and those projects fail to import due to the error generated from gradle init.
One of the child EJB project has dependency on JPA project and here is the entry in pom.xml
After gradle init the following entry is generated in build.gradle file and this is failed to import in tools.
description = ''
dependencies {
compileOnly group: 'javax.ejb', name: 'javax.ejb-api', version:'3.2'
compileOnly group: 'org.eclipse.persistence', name: 'javax.persistence', version:'2.1.1'
providedCompile project(':CreditCardDBJPA')
}
In the above build file, the gradle init should have generated with "compileOnly" rather "providedCompile"
In the above build file, the gradle init should have generated with "compileOnly" rather "providedCompile"
In the above build file, the gradle init generated with "providedCompile" .
Error
Could not find method providedCompile() for arguments [project ':CreditCardDBJPA'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
We got into this problem when migrating existing maven projects into Gradle projects.
Here are the projects generated from gradle init.
TestProjects.zip
Build time: 2018-02-05 13:22:49 UTC
Revision: 37007e1c012001ff09973e0bd095139239ecd3b3
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_151 (IBM Corporation 2.9)
OS: Windows 10 10.0 amd64
Bump! This is an important issue...
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.
This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request.
Most helpful comment
Bump! This is an important issue...