-
Notifications
You must be signed in to change notification settings - Fork 300
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
Migrate build to "maven-publish" plugin #284
Conversation
Congratulations 🍻. DeepCode analyzed your code in 0.108 seconds and we found no issues. Enjoy a moment of no bugs ☀️. 💬 This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues. |
BTW: I like the check logic for the upload quite much. Maybe I will use it for the junit-dataprovider as well some day ... |
@codecholeric: Any feedback on this? |
a8b9948
to
a9d6366
Compare
Thanks a lot for your support! 😃 I've rebased this against master and fixed some parts. To answer the questions from your commit message:
There is one problem left (maybe you know how to fix this out of your head?): In the JUnit 5 aggregator POM the |
Thanks for the rebase and the reply.
I think I know how to fix and will try during the next days. |
868b6aa fixes your last issue. I (only) tested it locally by using your In general, I think, we should migrate the whole project to |
Addtional note: I had to use
I haven't looked at the root cause intensively but on a quick look it turns up that |
Follow up PR upgrading to Gradle 6 can be find on https://github.com/TNG/ArchUnit/tree/gradle.6 |
f1d7390
to
617ea60
Compare
…ugin * migrate project specific settings to use with new API * move referenced sources and javadoc tasks before publishing * classifier are no longer generated so do not need to be removed * TNG nexus stuff is no longer used, therefore removed Open points: * `repackagesAsm` property is initialized too late for retrieving it in `license.gradle` * Is check for non-parallel build on publish still required else use `./gradlew --no-parallel publish` * Is 'signArchive dependsOn finishArchive' or something equivalent still required? * Maybe refactor code to use JUnit* module mechanism also for archunit core Signed-off-by: Andreas Schmid <service@aaschmid.de> Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Somehow uploads to Maven Central break when done in parallel, thus we should keep the check for now. Originally the idea was to keep `repackagesAsm` decentralized, i.e. every project can decide itself. In fact it will always only be `archunit` though, so I think it is easier to keep this logic within `license.gradle`. Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
in order to publish them in correct scope automatically. To get the `checkUploadedArtifacts` not to fail, I have to change the order of namespaces of the expected pom. Note: * I also replaced tabs with spaces in `junit5/aggregator/build.gradle`. But only one additinal line, so no separate commit. Signed-off-by: Andreas Schmid <service@aaschmid.de>
617ea60
to
90572b6
Compare
Looks good now 😄 I've tested it a little more as well, artifacts, manifests and POMs look good and the project where I tried the aggregator POM worked fine as well. |
@codecholeric: I just rebased the https://github.com/TNG/ArchUnit/tree/gradle.6 branch. I haven't had time to try to cleanup the dependencies more properly, especially test dependencies but IMO this should be done also. However, trying to further use the shadow plugin provided features was not successful yet (built poms are incorrect again; code in local stash...). And I also wanted to clean up / simplifiy the test dependencies which was not time for yet. |
migrate to "maven-publish" plugin * migrate project specific settings to use with new API * get rid of deprecated "maven" plugin * move referenced sources and javadoc tasks before publishing * classifier are no longer generated so do not need to be removed * TNG nexus stuff is no longer used, therefore removed
Finally got it running @codecholeric. But haven't had a look at the new "shadow" plugin and it's possibilities in order to get rid of dependencies removal in published poms, yet.
See commit message for still open points and tell me what you think about these as well as with I should get fixed.
You can check the results of a
publish
run at https://oss.sonatype.org/content/repositories/snapshots/com/tngtech/archunit/, version0.13.0-SNAPSHOT
or runpublishToMavenLocal
yourself. I also created a release (which is again dropped) and runcheckUAr -PtngRepoId=1202
besides some pom formattings - at least as far as I could see manually ;-) - quite successfully IMO.Note: Only thing was that I needed to run
./gradlew --no-parallel publish
multiple times to have all artifacts in the OSS Sonatype repo but could not find out why this is the case ...Unfortunately, the upgrade to Gradle version 5 (first commit) is required unless you want to add
enableFeaturePreview('STABLE_PUBLISHING')
to your settings.