René's URL Explorer Experiment


Title: Add Main class exists rule by gselzer · Pull Request #35 · scijava/scijava-maven-plugin · GitHub

Open Graph Title: Add Main class exists rule by gselzer · Pull Request #35 · scijava/scijava-maven-plugin

X Title: Add Main class exists rule by gselzer · Pull Request #35 · scijava/scijava-maven-plugin

Description: This PR adds a new custom enforcer rule that asserts that either: No main-class property exists (this would actually show up as a key with a blank value) The main-class property refers to an existing class file. The intent behind this rule is to catch the situations where a POM is copied and the developer who doesn't know any better (historically me) just changes the package structure of this property without actually making the class. It's been tested on the scijava/scijava repository, and seems to be working. Note that this rule differs from the existing rules in that it does not use the deprecated org.apache.maven.enforcer.rule.api.EnforcerRule. Let me know if that's an issue! We could always refactor the other rules into the new classes in another PR (there seems to be no issue with using both old and new patterns simultaneously)

Open Graph Description: This PR adds a new custom enforcer rule that asserts that either: No main-class property exists (this would actually show up as a key with a blank value) The main-class property refers to an exist...

X Description: This PR adds a new custom enforcer rule that asserts that either: No main-class property exists (this would actually show up as a key with a blank value) The main-class property refers to an exist...

Opengraph URL: https://github.com/scijava/scijava-maven-plugin/pull/35

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:dcf316c3-b2c0-919c-87af-d4551da530da
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDEAA:185C62:AD0385:F4D1CE:696F9119
html-safe-nonce1e5b5d45110d8bfd5f58680e48dcac99af5f6e013f7060826a5f7f5803239495
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUFBOjE4NUM2MjpBRDAzODU6RjREMUNFOjY5NkY5MTE5IiwidmlzaXRvcl9pZCI6Ijc2OTMyOTMxNDM0NjkyOTc5NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbd69b254c2c0ccf55c16fb5093e22e22528dabbb986bb4ffbdedadd35437f5c2
hovercard-subject-tagpull_request:3154262750
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/scijava/scijava-maven-plugin/pull/35/files
twitter:imagehttps://avatars.githubusercontent.com/u/29754838?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/29754838?s=400&v=4
og:image:altThis PR adds a new custom enforcer rule that asserts that either: No main-class property exists (this would actually show up as a key with a blank value) The main-class property refers to an exist...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0ca8d8c65612640b9a1a588b3eed68222ca723ed2d028b18fe81b28936d535eb
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/scijava/scijava-maven-plugin git https://github.com/scijava/scijava-maven-plugin.git
octolytics-dimension-user_id1262770
octolytics-dimension-user_loginscijava
octolytics-dimension-repository_id18479943
octolytics-dimension-repository_nwoscijava/scijava-maven-plugin
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id18479943
octolytics-dimension-repository_network_root_nwoscijava/scijava-maven-plugin
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release95f60616ce2765d1114fe6da4af405a58c6d26d2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fscijava%2Fscijava-maven-plugin%2Fpull%2F35%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fscijava%2Fscijava-maven-plugin%2Fpull%2F35%2Ffiles
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=scijava%2Fscijava-maven-plugin
Reloadhttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files
Reloadhttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files
Reloadhttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files
scijava https://patch-diff.githubusercontent.com/scijava
scijava-maven-pluginhttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fscijava%2Fscijava-maven-plugin
Fork 5 https://patch-diff.githubusercontent.com/login?return_to=%2Fscijava%2Fscijava-maven-plugin
Star 3 https://patch-diff.githubusercontent.com/login?return_to=%2Fscijava%2Fscijava-maven-plugin
Code https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin
Issues 11 https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/issues
Pull requests 0 https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pulls
Actions https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/actions
Projects 0 https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/projects
Wiki https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/security
Please reload this pagehttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files
Insights https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pulse
Code https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin
Issues https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/issues
Pull requests https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pulls
Actions https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/actions
Projects https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/projects
Wiki https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/wiki
Security https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/security
Insights https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pulse
Sign up for GitHub https://patch-diff.githubusercontent.com/signup?return_to=%2Fscijava%2Fscijava-maven-plugin%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://patch-diff.githubusercontent.com/login?return_to=%2Fscijava%2Fscijava-maven-plugin%2Fissues%2Fnew%2Fchoose
ctruedenhttps://patch-diff.githubusercontent.com/ctrueden
masterhttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/tree/master
main-class-exists-rulehttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/tree/main-class-exists-rule
Conversation 2 https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35
Commits 2 https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/commits
Checks 1 https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/checks
Files changed https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files
Please reload this pagehttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files
Add Main class exists rule https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files#top
Show all changes 2 commits https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files
2928c93 Add a MainClassExistsRule gselzer Jan 7, 2026 https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/commits/2928c9380f130f02b70b80d4828a4660c4ea0d34
c616820 Check for empty main class gselzer Jan 7, 2026 https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/commits/c616820dd0347c68d75af81e0bca77f2fc6b22f4
Clear filters https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files
Please reload this pagehttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files
Please reload this pagehttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files
MainClassExistsRule.java https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files#diff-3223cb66d2e53b11db8134f5da344ebe155dac8be5809a4a0800cf09981c926a
EnforcerLoggerMock.java https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files#diff-35e5b54403ba2282cc9e7e27d960c956e62941800958719610bfd31820d938d9
MainClassExistsRuleTest.java https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files#diff-5001a1621634d4d1f37b84c94eb62bbd1201628ef8400a87d46ca0410707d03c
src/main/java/org/scijava/maven/plugin/enforcer/MainClassExistsRule.javahttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files#diff-3223cb66d2e53b11db8134f5da344ebe155dac8be5809a4a0800cf09981c926a
View file https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/blob/c616820dd0347c68d75af81e0bca77f2fc6b22f4/src/main/java/org/scijava/maven/plugin/enforcer/MainClassExistsRule.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/{{ revealButtonHref }}
src/test/java/org/scijava/maven/plugin/enforcer/EnforcerLoggerMock.javahttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files#diff-35e5b54403ba2282cc9e7e27d960c956e62941800958719610bfd31820d938d9
View file https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/blob/c616820dd0347c68d75af81e0bca77f2fc6b22f4/src/test/java/org/scijava/maven/plugin/enforcer/EnforcerLoggerMock.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/{{ revealButtonHref }}
src/test/java/org/scijava/maven/plugin/enforcer/MainClassExistsRuleTest.javahttps://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/files#diff-5001a1621634d4d1f37b84c94eb62bbd1201628ef8400a87d46ca0410707d03c
View file https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/blob/c616820dd0347c68d75af81e0bca77f2fc6b22f4/src/test/java/org/scijava/maven/plugin/enforcer/MainClassExistsRuleTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/scijava/scijava-maven-plugin/pull/35/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.