Git Product home page Git Product logo

nexus-repository-apk's Introduction

Nexus Repository apk Format

Maven Central CircleCI Join the chat at https://gitter.im/sonatype/nexus-developers DepShield Badge

Table Of Contents

Developing

Requirements

Also, there is a good amount of information available at Bundle Development

Download

Find pre-compiled files here.

Building

To build the project and generate the bundle use Maven

mvn clean package -PbuildKar

If everything checks out, the bundle for apk should be available in the target folder

Build with Docker

docker build -t nexus-repository-apk .

Run as a Docker container

docker run -d -p 8081:8081 --name nexus-repository-apk nexus-repository-apk

For further information like how to persist volumes check out the GitHub repo for our official image.

The application will now be available from your browser at http://localhost:8081

After allowing some time to spin up, the application will be available from your browser at http://localhost:8081.

To read the generated admin password for your first login to the web UI, you can use the command below against the running docker container:

docker exec -it nexus-repository-apk cat /nexus-data/admin.password && echo

Using apk With Nexus Repository Manager 3

We have detailed instructions on how to get started here!

Compatibility with Nexus Repository Manager 3 Versions

The table below outlines what version of Nexus Repository the plugin was built against

Plugin Version Nexus Repository Version
v0.0.1 3.19.0-01
v0.0.8 3.23.0-03
v0.0.12 3.28.0-01
v0.0.18 3.30.0-01
v0.0.19 3.31.0-01
v0.0.24 3.38.0-01
v0.0.26 3.41.0-01
v3.54.1-02 3.54.1-02
v3.69.0-02 3.69.0-02
v3.70.1-02 3.70.1-02

If a new version of Nexus Repository is released and the plugin needs changes, a new release will be made, and this table will be updated to indicate which version of Nexus Repository it will function against. This is done on a time available basis, as this is community supported. If you see a new version of Nexus Repository, go ahead and update the plugin and send us a PR after testing it out!

All released versions can be found here.

Features Implemented In This Plugin

Feature Implemented
Proxy โœ”๏ธ
Hosted
Group

Installing the plugin

There are a range of options for installing the apk plugin. You'll need to build it first, and then install the plugin with the options shown below:

Permanent Install

Thanks to some upstream work in Nexus Repository, it's become a LOT easier to install a plugin. To install the apk plugin, follow these steps:

  • Build the plugin with mvn clean package -PbuildKar
  • Copy the nexus-repository-apk-0.0.1-bundle.kar file from your target folder to the deploy folder for your Nexus Repository installation.

Once you've done this, go ahead and either restart Nexus Repo, or go ahead and start it if it wasn't running to begin with.

You should see apk (proxy) in the available Repository Recipes to use, if all has gone according to plan :)

Temporary Install

Installations done via the Karaf console will be wiped out with every restart of Nexus Repository. This is a good installation path if you are just testing or doing development on the plugin.

  • Enable Nexus Repo console: edit <nexus_dir>/bin/nexus.vmoptions and change karaf.startLocalConsole to true.

    More details here: Bundle Development

  • Run Nexus Repo console:

    # sudo su - nexus
    $ cd <nexus_dir>/bin
    $ ./nexus run
    > bundle:install file:///tmp/nexus-repository-apk-0.0.1.jar
    > bundle:list

    (look for org.sonatype.nexus.plugins:nexus-repository-apk ID, should be the last one)

    > bundle:start <org.sonatype.nexus.plugins:nexus-repository-apk ID>
    

Other Permanent Install Options

There are two other outdated options for Permanent Installation that can be found in the Composer Community Format's (more) Permanent Install and (most) Permanent Install instructions. Replace all references to Composer with apk.

The Fine Print

It is worth noting that this is NOT SUPPORTED by Sonatype, and is a contribution of ours to the open source community (read: you!)

Don't worry, using this community item does not "void your warranty". In a worst case scenario, you may be asked by the Sonatype Support team to remove the community item in order to determine the root cause of any issues.

Remember:

  • Use this contribution at the risk tolerance that you have
  • Do NOT file Sonatype support tickets related to apk support in regard to this plugin
  • DO file issues here on GitHub, so that the community can pitch in

Phew, that was easier than I thought. Last but not least of all:

Have fun creating and using this plugin and the Nexus platform, we are glad to have you here!

Getting help

Looking to contribute to our code but need some help? There's a few ways to get information:

nexus-repository-apk's People

Contributors

bhamail avatar allenhsieh avatar darthhater avatar ripolin avatar mykyta avatar aornatovskyy avatar mpiggott avatar 805728578 avatar adrianp-sti avatar taz77 avatar mikeq avatar rgmz avatar scherzhaft avatar sjweixel avatar linuxsuren avatar

Watchers

Nikita Borzykh avatar  avatar

nexus-repository-apk's Issues

building bug plugin 1.0.0 nexus 3.69.0

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?
    docker build --build-arg="NEXUS_VERSION=3.69.0" --progress=plain -t library/nexus-repository-apk:3.69.0 .

  • What feature or behavior is this required for?
    docker build

  • How could we solve this issue? (Not knowing is okay!)

  • Anything else?
    ''' bash
    #9 249.4 Downloaded from central: https://repo.maven.apache.org/maven2/org/tmatesoft/sqljet/sqljet/1.1.10/sqljet-1.1.10.jar (762 kB at 147 kB/s)
    #9 249.6 [INFO] Executing: /bin/sh -c cd '/nexus-repository-apk' && 'git' 'rev-parse' '--verify' 'HEAD'
    #9 249.6 [INFO] Working directory: /nexus-repository-apk
    #9 249.7 [INFO] ------------------------------------------------------------------------
    #9 249.7 [INFO] Reactor Summary for apk-parent 1.0.0:
    #9 249.7 [INFO]
    #9 249.7 [INFO] apk-parent ......................................... FAILURE [01:18 min]
    #9 249.7 [INFO] nexus-repository-apk ............................... SKIPPED
    #9 249.7 [INFO] nexus-repository-apk-it ............................ SKIPPED
    #9 249.7 [INFO] ------------------------------------------------------------------------
    #9 249.7 [INFO] BUILD FAILURE
    #9 249.7 [INFO] ------------------------------------------------------------------------
    #9 249.7 [INFO] Total time: 04:08 min
    #9 249.7 [INFO] Finished at: 2024-08-09T12:27:43Z
    #9 249.7 [INFO] ------------------------------------------------------------------------
    #9 249.7 [ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create (build-identity) on project apk-parent: Cannot get the revision information from the scm repository :
    #9 249.7 [ERROR] Exception while executing SCM command.: Error while executing command. Error while executing process. Cannot run program "git" (in directory "/nexus-repository-apk"): error=2, No such file or directory
    #9 249.7 [ERROR] -> [Help 1]
    #9 249.7 [ERROR]
    #9 249.7 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    #9 249.7 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    #9 249.7 [ERROR]
    #9 249.7 [ERROR] For more information about the errors and possible solutions, please read the following articles:
    #9 249.7 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
    #9 ERROR: process "/bin/sh -c cd /nexus-repository-apk/; mvn clean package -PbuildKar;" did not complete successfully: exit code: 1


[build 3/3] RUN cd /nexus-repository-apk/; mvn clean package -PbuildKar;:
249.7 [INFO] ------------------------------------------------------------------------
249.7 [ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create (build-identity) on project apk-parent: Cannot get the revision information from the scm repository :
249.7 [ERROR] Exception while executing SCM command.: Error while executing command. Error while executing process. Cannot run program "git" (in directory "/nexus-repository-apk"): error=2, No such file or directory
249.7 [ERROR] -> [Help 1]
249.7 [ERROR]
249.7 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
249.7 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
249.7 [ERROR]
249.7 [ERROR] For more information about the errors and possible solutions, please read the following articles:
249.7 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


Dockerfile:8

7 | COPY . /nexus-repository-apk/
8 | >>> RUN cd /nexus-repository-apk/;
9 | >>> mvn clean package -PbuildKar;
10 |

ERROR: failed to solve: process "/bin/sh -c cd /nexus-repository-apk/; mvn clean package -PbuildKar;" did not complete successfully: exit code: 1
'''

cc @DarthHater @bhamail

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.