When I run ./gradlew publishToMavenLocal directly, I can see the jar file and pom file in the directory. However, once the verifyMavenJarsCreated task is run, it cleans previous jars but fails to create new ones. I suspect the task publishToMavenLocal fails to work for some reason.
I have applied the required plugin. Any hints? Thanks
Even i’m getting same error from last night. i have tried all possible things. but still it is not resolved. Share the solution if you resolve it.
no plugin is applied. verifyMavenJarsCreated is not doing the job to publishtolocalmaven.
Check this out guys.
jar and pom file are being created when we run publishtomavenlocal. im able to see the file.
but if i run verifyMavenJarsCreated, the directory is deleted.
@Jayesh @Ajaybarath, you don’t have to run publishtomavenlocal
explicitly. verifyMavenJarsCreated
will automatically call publishtomavenlocal
. You can check the gradle file for this.
I know that running the task manually isn’t required. It was a debug step. I wanted to check if my jar and pom files are getting created and they were. The problem as I have already mentioned is that the task publishToMavenLocal when run from within the test task doesn’t perform its supposed function
publishtomavenlocal is not doing the job when called with verifyMavenJarsCreated
. but working when called just 'publishtomavenlocal ’ seperately.
@Ajaybarath, check your build.gradle file for the verifyMavenJarsCreated
task. You might find the error there.
Where did you add versioning info? if you are not able to call this target from within some other target, it can be a code issue, as well…
Can you try a clean before you run next time?
also try to run with --info or --debug and get the full log here, please.
@anand-crio can you check into this problem. I’ve been stuck with this from yesterday.
Please see the snippets shared in this discussion.
Hey, find the task verifyMavenJarsCreated and understand every line of it. Try making a small change to it if you feel anything is not right in that task.
Hi @Jayesh,
As far as my understanding goes, the verification task would not clear your jar files and then carry out the task of creating new ones using publishToMavenLocal. Had that been the case, the mere execution of verifyMavenJarsCreated would have completed the milestone.
I suspect you might have added extra dependencies or code to the build.gradle files. Please note that you only need to add the given parameters to build.gradle inside the qmoney directory. You don’t need to create any additional tasks inside that file or add any dependency. Just adding those 3 parameters would be sufficient.
Also, as suggested, try running a clean before running the command next time.
Let me know if the issues persists!
@Ajaybarath, the task checks if a particular directory exists. But if the path does not exist after running the verifyMavenJarsCreated in spite of you creating the directory, then what do you infer from this?
PS: I had to make a change in that task for the build to get successful.
Ok… Can you guys confirm that you havent modified anything inside your build.gradle except the changes required for this change?
All we expect you to do is - modify qmoney/build.gradle
file inside publishing
task. No changes are except in any other build.gradle. Please refrain from making those changes.