{"id":22515311,"url":"https://github.com/scijava/scijava-maven-plugin","last_synced_at":"2026-03-18T00:47:37.983Z","repository":{"id":15741357,"uuid":"18479943","full_name":"scijava/scijava-maven-plugin","owner":"scijava","description":"A Maven plugin to manage development of SciJava-based software.","archived":false,"fork":false,"pushed_at":"2024-10-20T19:38:28.000Z","size":3646,"stargazers_count":3,"open_issues_count":9,"forks_count":5,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-10-21T00:12:43.254Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"vigosan/forecast_io","license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scijava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-06T00:45:44.000Z","updated_at":"2024-10-20T19:38:32.000Z","dependencies_parsed_at":"2024-10-21T23:51:44.577Z","dependency_job_id":null,"html_url":"https://github.com/scijava/scijava-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scijava%2Fscijava-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scijava%2Fscijava-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scijava%2Fscijava-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scijava%2Fscijava-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scijava","download_url":"https://codeload.github.com/scijava/scijava-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228556511,"owners_count":17936433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-07T03:29:38.185Z","updated_at":"2026-03-18T00:47:32.902Z","avatar_url":"https://github.com/scijava.png","language":"Java","readme":"[![](https://github.com/scijava/scijava-maven-plugin/actions/workflows/build-main.yml/badge.svg)](https://github.com/scijava/scijava-maven-plugin/actions/workflows/build-main.yml)\n\n[![](https://img.shields.io/maven-central/v/org.scijava/scijava-maven-plugin.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.scijava%22%20AND%20a%3A%22scijava-maven-plugin%22)\n\nSciJava Maven Plugin\n====================\n\nscijava-maven-plugin is a Maven plugin for managing SciJava-based software.\n\nGoals\n-----\n\n```shell\n$ mvn scijava:help\n[INFO] SciJava plugin for Maven 1.1.0\n  A plugin for managing SciJava-based projects.\n\nThis plugin has 7 goals:\n\nscijava:bump\n  Bumps dependency and parent versions in SciJava projects.\n\nscijava:populate-app\n  Copies .jar artifacts and their dependencies into a SciJava application\n  directory structure. ImageJ 1.x plugins (identified by containing a\n  plugins.config file) get copied to the plugins/ subdirectory and all other\n  .jar files to jars/. However, you can override this decision by setting the\n  scijava.app.subdirectory property to a specific subdirectory. It expects the\n  location of the SciJava application directory to be specified in the\n  scijava.app.directory property (which can be set on the Maven command-line).\n  If said property is not set, the populate-app goal is skipped.\n\nscijava:eclipse-helper\n  Runs the annotation processor of the scijava-common artifact even inside\n  Eclipse.\n\nscijava:help\n  Display help information on scijava-maven-plugin.\n  Call mvn scijava:help -Ddetail=true -Dgoal=\u003cgoal-name\u003e to display parameter\n  details.\n\nscijava:install-artifact\n  Downloads .jar artifacts and their dependencies into a SciJava application\n  directory structure. ImageJ 1.x plugins (identified by containing a\n  plugins.config file) get copied to the plugins/ subdirectory and all other\n  .jar files to jars/. However, you can override this decision by setting the\n  scijava.app.subdirectory property to a specific subdirectory. It expects the\n  location of the SciJava application directory to be specified in the\n  scijava.app.directory property (which can be set on the Maven command-line).\n  If said property is not set, the install-artifact goal is skipped.\n\nscijava:set-rootdir\n  Sets the project.rootdir property to the top-level directory of the current\n  Maven project structure.\n\nscijava:verify-no-snapshots\n  Mojo wrapper for the SnapshotFinder.\n  Parameters:\n\n  - failFast - end execution after first failure (default: false)\n  - groupIds - an inclusive list of groupIds. Errors will only be reported for\n    projects whose groupIds are contained this list. (default: empty - all\n    groupIds considered)\n  - groupId - Singular groupIds option. Will be appended to groupIds if both are\n    specified.\n```\n\nUsage\n-----\n\nIt is recommended to enable the _set-rootdir_ as well as the _populate-app_\ngoal by making the [SciJava POM](http://github.com/scijava/pom-scijava)\nthe parent project:\n\n```xml\n\u003cproject ...\u003e\n  \u003cparent\u003e\n    \u003cgroupId\u003eorg.scijava\u003c/groupId\u003e\n    \u003cartifactId\u003epom-scijava\u003c/artifactId\u003e\n    \u003cversion\u003e7.5.2\u003c/version\u003e\n  \u003c/parent\u003e\n  ...\n\u003c/project\u003e\n```\n\nAlternatively, you can include the plugin explicitly in the life cycle:\n\n```xml\n\u003cplugins\u003e\n  \u003c!-- Set the rootdir property to the root of the multi-module project --\u003e\n  \u003cplugin\u003e\n    \u003cgroupId\u003eorg.scijava\u003c/groupId\u003e\n    \u003cartifactId\u003escijava-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.0\u003c/version\u003e\n    \u003cexecutions\u003e\n      \u003cexecution\u003e\n        \u003cid\u003eset-rootdir\u003c/id\u003e\n        \u003cphase\u003evalidate\u003c/phase\u003e\n        \u003cgoals\u003e\n          \u003cgoal\u003eset-rootdir\u003c/goal\u003e\n        \u003c/goals\u003e\n      \u003c/execution\u003e\n      \u003cexecution\u003e\n        \u003cid\u003epopulate-app\u003c/id\u003e\n        \u003cphase\u003einstall\u003c/phase\u003e\n        \u003cgoals\u003e\n          \u003cgoal\u003epopulate-app\u003c/goal\u003e\n        \u003c/goals\u003e\n      \u003c/execution\u003e\n    \u003c/executions\u003e\n  \u003c/plugin\u003e\n\u003c/plugins\u003e\n```\n\nSciJava Packages Rules\n====================\n\nscijava-packages-rules provides a set of [Maven Enforcer Plugin](https://maven.apache.org/enforcer/maven-enforcer-plugin/) rules for policing the package hierarchy at build time.\n\n## Usage\n\nCurrently, the only way to utilize these rules is by explicitly declaring it in the life cycle\n\n```xml\n\u003cplugin\u003e\n\t\u003cartifactId\u003emaven-enforcer-plugin\u003c/artifactId\u003e\n\t\u003cdependencies\u003e\n\t\t\u003cdependency\u003e\n\t\t\t\u003cgroupId\u003eorg.scijava\u003c/groupId\u003e\n\t\t\t\u003cartifactId\u003escijava-packages-rules\u003c/artifactId\u003e\n\t\t\t\u003cversion\u003e0-SNAPSHOT\u003c/version\u003e\n\t\t\u003c/dependency\u003e\n\t\u003c/dependencies\u003e\n\t\u003cexecutions\u003e\n\t\t...\n\t\u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\nRules\n====================\n\n# No Package Cycles\n[Circular dependencies](https://en.wikipedia.org/wiki/Circular_dependency) are usually considered poor practice. To prevent circular dependencies, add the following `execution`:\n\n```xml\n\u003cexecution\u003e\n\t\u003cid\u003eenforce-no-package-cycles\u003c/id\u003e\n\t\u003cgoals\u003e\n\t\t\u003cgoal\u003eenforce\u003c/goal\u003e\n\t\u003c/goals\u003e\n\t\u003cphase\u003etest\u003c/phase\u003e\n\t\u003cconfiguration\u003e\n\t\t\u003crules\u003e\n\t\t\t\u003cNoPackageCyclesRule\n\t\t\t\timplementation=\"org.scijava.packages.rules.NoPackageCyclesRule\" /\u003e\n\t\t\u003c/rules\u003e\n\t\u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n### Including test classes\n\nIf you want to exclude tests from cycle checking, you can use the parameter `includeTests` which is set to true by default:\n\n```xml\n        ...\n        \u003crules\u003e\n            \u003cNoPackageCyclesRule implementation=\"org.scijava.packages.rules.NoPackageCyclesRule\"\u003e\n                \u003cincludeTests\u003efalse\u003c/includeTests\u003e\n            \u003c/NoPackageCyclesRule\u003e\n        \u003c/rules\u003e\n        ...\n```\n\n### Restricting scope\n\n**:warning: Only use this, if there is no other way! Once there are exceptions, the connection between those excluded packages\nwill grow stronger and stronger, without notice!**\n\nIf you want to exclude packages or restrict check to certain packages only, you can use `includedPackages` or `excludedPackages` (although you really should not!):\n\n```xml\n        ...\n        \u003crules\u003e\n            \u003cNoPackageCyclesRule implementation=\"org.scijava.packages.rules.NoPackageCyclesRule\"\u003e\n                \u003cincludedPackages\u003e\n                    \u003cincludedPackage\u003emyapp.code.good\u003c/includedPackage\u003e\n                \u003c/includedPackages\u003e\n            \u003c/NoPackageCyclesRule\u003e\n        \u003c/rules\u003e\n        ...\n```\n\n```xml\n        ...\n        \u003crules\u003e\n            \u003cNoPackageCyclesRule implementation=\"de.andrena.tools.nopackagecycles.NoPackageCyclesRule\"\u003e\n                \u003cexcludedPackages\u003e\n                    \u003cexcludedPackage\u003emyapp.code.bad\u003c/excludedPackage\u003e\n                \u003c/excludedPackages\u003e\n            \u003c/NoPackageCyclesRule\u003e\n        \u003c/rules\u003e\n        ...\n```\n\n\n# No Subpackage Dependence\nSubpackage Dependence can throw a wrench into libraries wishing to follow the [Dependency Inversion principle](https://en.wikipedia.org/wiki/Dependency_inversion_principle). To prevent subpackage dependence, add the following `execution`:\n\n```xml\n\u003cexecution\u003e\n\t\u003cid\u003eenforce-no-subpackage-dependence\u003c/id\u003e\n\t\u003cgoals\u003e\n\t\t\u003cgoal\u003eenforce\u003c/goal\u003e\n\t\u003c/goals\u003e\n\t\u003cphase\u003etest\u003c/phase\u003e\n\t\u003cconfiguration\u003e\n\t\t\u003crules\u003e\n\t\t\t\u003cNoSubpackageDependenceRule\n\t\t\t\timplementation=\"org.scijava.packages.rules.NoSubpackageDependenceRule\" /\u003e\n\t\t\u003c/rules\u003e\n\t\u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n\n## See also\n\n* The original version by Daniel Seidewitz on [Stackoverflow](http://stackoverflow.com/questions/3416547/maven-jdepend-fail-build-with-cycles). Improved by showing all packages afflicted with cycles and the corresponding classes importing the conflicting packages; this version was written [here](https://github.com/andrena/no-package-cycles-enforcer-rule). From there, the SciJava team made the behavior more extensible, making it easier to write and use more package-based rules.\n* [JDepend](https://github.com/clarkware/jdepend), the library being used to detect package cycles.\n* For more information about package cycles, see [\"The Acyclic Dependencies Principle\" by Robert C. Martin (Page 6)](http://www.objectmentor.com/resources/articles/granularity.pdf). \n* The [Maven Enforcer Plugin](https://maven.apache.org/enforcer/maven-enforcer-plugin/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscijava%2Fscijava-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscijava%2Fscijava-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscijava%2Fscijava-maven-plugin/lists"}