PHPackages                             memfinis/nexus-composer-push - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. memfinis/nexus-composer-push

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

memfinis/nexus-composer-push
============================

Provide a Push command to composer to push to Nexus repositories

0.4.4(4y ago)09PHPPHP &gt;=7.2 || ^8.0

Since Nov 8Pushed 4y agoCompare

[ Source](https://github.com/memfinis/nexus-composer-push)[ Packagist](https://packagist.org/packages/memfinis/nexus-composer-push)[ RSS](/packages/memfinis-nexus-composer-push/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (7)Versions (25)Used By (0)

Nexus Push command for composer
===============================

[](#nexus-push-command-for-composer)

This composer plugin provide a `composer nexus-push` command that allow to push the current package into a Nexus Composer repository hosted with [nexus-repository-composer](https://github.com/sonatype-nexus-community/nexus-repository-composer).

Installation
------------

[](#installation)

```
 $ composer require memfinis/nexus-composer-push
```

Usage
-----

[](#usage)

Many of the options are optional since they can be added directly to the `composer.json` file.

```
 # At the root of your directory
 $ composer nexus-push [--name=] \
   [--url=] \
   [--repository=] \
   [--username=USERNAME] \
   [--password=PASSWORD] \
   [--ignore=test.php]\
   [--ignore=foo/]\
   [--ignore-by-git-attributes]\
   [--src-type=]\
   [--src-url=]\
   [--src-ref=]\

 # Example
 $ composer nexus-push --username=admin --password=admin123 --url=http://localhost:8081/repository/composer --ignore=test.php --ignore=foo/ --src-type=git --src-url="$(git remote get-url origin)" --src-ref="$(git rev-parse HEAD)" 0.0.1

 # Example of use --repository
 # you need firstly configure multi repositories in composer.json of the project.
 # Please refer to Configuration below (multi repository configuration format) for configuration method
 # The component will be uploaded to the first repository whose's name value matching -- repository value
 # If there is no matching between the value of repository name and the value of -- repository, the upload will fail with a prompt
 $ composer nexus-push --username=admin --password=admin123 --repository=prod --ignore=test.php --ignore=foo/ 0.0.1
```

Configuration
-------------

[](#configuration)

It's possible to add some configurations inside the `composer.json` file

```
{
    "extra": {
        "nexus-push": {
            "url": "http://localhost:8081/repository/composer",
            "username": "admin",
            "password": "admin123",
            "ignore-by-git-attributes": true,
            "ignore": [
                "test.php",
                "foo/"
            ]
        }
    }
}
```

Above configuration may be called unique repository configuration format, as you can only configue one nexus repository in composer.json.

In practice, for security reasons, different versions of component code, such as production and development, often apply different deployment policy, such as disable redeploy for the production version and allow redeploy for the development version, so they need to be stored in different nexus repositories. For versions later than 0.1.5, the command-line parameter -- repository is introduced to meet this requirement. To enable the -- repository parameter, the composer.json file needs to be in the following format:

```
{
    "extra": {
        "nexus-push": [{
            "name": "prod",
            "url": "http://localhost:8081/repository/composer-releases",
            "username": "admin",
            "password": "admin123",
            "ignore-by-git-attributes": true,
            "ignore": [
                "test.php",
                "foo/"
            ]
        }, {
            "name": "dev",
            "url": "http://localhost:8081/repository/composer-devs",
            "username": "admin",
            "password": "admin123",
            "ignore-by-git-attributes": true,
            "ignore": [
                "test.php",
                "foo/"
            ]
        }]
    }
}
```

Above configuration may be called multi repository configuration format.

The new version continues to support parsing the unique repository configuration format, but remember that you cannot use the -- repository command line argument in this scenario.

The `username` and `password` can be specified in the `auth.json` file on a per-user basis with the [authentication mechanism provided by Composer](https://getcomposer.org/doc/articles/http-basic-authentication.md).

Source type, URL, reference
---------------------------

[](#source-type-url-reference)

This is an optional part that can be added to the composer.json file provided for the package which can contain the source reference for this version. This option is useful in case you have a source manager and you would like to have a direct link to the source of an specific version. The example above given will read the last commit ID from git and the remote address from git as well which is quiet simple and useful.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 67.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~46 days

Recently: every ~61 days

Total

22

Last Release

1824d ago

PHP version history (3 changes)v0.0.1-alphaPHP ^5.6 || ^7.0

0.2.0PHP &gt;=7.2 &lt;7.5

0.4.0PHP &gt;=7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a03f74f2b6985b90251256e3250eb3aeba71a413ea074d9d23ed60e18b41fa3?d=identicon)[memfinis](/maintainers/memfinis)

---

Top Contributors

[![Elendev](https://avatars.githubusercontent.com/u/1331273?v=4)](https://github.com/Elendev "Elendev (79 commits)")[![Hodgy](https://avatars.githubusercontent.com/u/1502446?v=4)](https://github.com/Hodgy "Hodgy (11 commits)")[![BramG](https://avatars.githubusercontent.com/u/379891?v=4)](https://github.com/BramG "BramG (9 commits)")[![qbaze](https://avatars.githubusercontent.com/u/5493094?v=4)](https://github.com/qbaze "qbaze (4 commits)")[![vostlertsd](https://avatars.githubusercontent.com/u/80632669?v=4)](https://github.com/vostlertsd "vostlertsd (2 commits)")[![zhwei](https://avatars.githubusercontent.com/u/1446459?v=4)](https://github.com/zhwei "zhwei (2 commits)")[![r32rf](https://avatars.githubusercontent.com/u/60923682?v=4)](https://github.com/r32rf "r32rf (1 commits)")[![theravel](https://avatars.githubusercontent.com/u/1029434?v=4)](https://github.com/theravel "theravel (1 commits)")[![tm1000](https://avatars.githubusercontent.com/u/564256?v=4)](https://github.com/tm1000 "tm1000 (1 commits)")[![xrobau](https://avatars.githubusercontent.com/u/457798?v=4)](https://github.com/xrobau "xrobau (1 commits)")[![marcoreni](https://avatars.githubusercontent.com/u/2797489?v=4)](https://github.com/marcoreni "marcoreni (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![fghamsary](https://avatars.githubusercontent.com/u/5503041?v=4)](https://github.com/fghamsary "fghamsary (1 commits)")[![glorpen](https://avatars.githubusercontent.com/u/990336?v=4)](https://github.com/glorpen "glorpen (1 commits)")[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (1 commits)")[![andypost](https://avatars.githubusercontent.com/u/73713?v=4)](https://github.com/andypost "andypost (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/memfinis-nexus-composer-push/health.svg)

```
[![Health](https://phpackages.com/badges/memfinis-nexus-composer-push/health.svg)](https://phpackages.com/packages/memfinis-nexus-composer-push)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
