Giter Site home page Giter Site logo

groupe-edf / nexus-repository-dart Goto Github PK

View Code? Open in Web Editor NEW
30.0 6.0 8.0 146 KB

Dart format repository for Nexus Repository Manager

License: Eclipse Public License 2.0

Java 63.95% JavaScript 6.87% CSS 1.08% Groovy 28.10%
dart flutter nexus-repository-manager java

nexus-repository-dart's Introduction

nexus-repository-dart

Build Status Coverage Status

Nexus plugin to configure Dart repositories

Table Of Contents

Features

  • Dart Proxy repository

Requirements

  • Nexus Repository Manager up to 3.31.0-01

This plugin has been tested on the version 3.31.0-01 and 3.31.1-01 but it may works with others versions.

Compatibility Matrix

Plugin version Nexus repository version
v1.0.0 < 3.38
v1.0.1 < 3.38
v1.1.0 >= 3.38

Developing

There is goods informations about developing bundle for Nexus 3 at Bundle Development

Tools required

Build the plugin

  • Clone the project with git clone ...
  • Build the plugin with
cd nexus-repository-dart
mvn clean install -PbuildKar

Installing the plugin

Pre-built bundle

The pre-built bundle are directly available in the assets of releases on Github with name nexus-repository-dart-<version>-bundle.kar.

Bundle built locally

The package built like described in Developing section should be available in <cloned_repo>/target/ with name nexus-repository-dart-<version>-bundle.kar.

To install the nexus-repository-dart:

  • Stop Nexus
  • Copy the bundle (*.kar file) into the directory <nexus_dir>/deploy
  • Start Nexus

Configuration

Go to the configuration of Nexus (admin rights) -> Repositories

Click on "Create repository" and select "dart (proxy)"

Complete the informations like others Proxy repositories. By default, the remote storage for Dart is "https://pub.dev".

Usage

To use Nexus Dart Proxy repository, it must be set as an environment variable.

  • Windows command line :
set PUB_HOSTED_URL=http://[nexus_url]/repository/[repository_name]/
set FLUTTER_STORAGE_BASE_URL=http://[nexus_url]/repository/[repository_name]/
  • Linux or MacOs :
export PUB_HOSTED_URL=http://[nexus_url]/repository/[repository_name]/
export FLUTTER_STORAGE_BASE_URL=http://[nexus_url]/repository/[repository_name]/

With Flutter it is possible to verify the configuration with the command flutter doctor -v

Example of result :

C:\WORKSPACES\dart_test\dart_test_project>flutter doctor -v
[✓] Flutter (Channel stable, 2.2.3, on Microsoft Windows [version 10.0.19042.630], locale fr-FR)
    • Flutter version 2.2.3 at C:\Softs\flutter
    • Framework revision f4abaa0735 (3 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4
    • Pub download mirror http://localhost:8081/repository/dartlang/
    • Flutter download mirror http://localhost:8081/repository/dartlang/
    ...

Now, the downloads of Dart packages will works with the Nexus Dart Proxy repository.

Troubleshooting

"flutter updtate" command is not working when nexus repository dart is setted. It can break your installation and need a complete reinstall of flutter on your computer. To avoid this, environment variables PUB_HOSTED_URL and FLUTTER_STORAGE_BASE_URL must be unset before launching "flutter update".

Team

Product Owner: Cloudehard

Developer: mat1e

Getting help

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

nexus-repository-dart's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nexus-repository-dart's Issues

Cannot add dart proxy repo in Nexus OSS v 3.38.0-01

Hi. We have installed the plugin and I can see it in Bundles as active.
But I cannot add new repository with recipe "dart (proxy)", there is no such in the list.

  • Nexus OSS v 3.38.0-01 (in docker)
  • nexus-repository-dart v 1.0.1

Is there something broken with recipe registration?

Instalation on docker image

Hello,

How can I install the plugin on a given nexus docker image? I can't find the designated folder for the .kar file on the image contents.

Thanks in advance.

Unable to provide authentication while using on hosted NEXUS OSS

After following the instructions provided in README.md , I have successfully added the dart proxy mirror, but when I am using it through cli command "flutter pub get" it is giving me 401 (Unauthorized) error.Is there any way to use authentication with NEXUS OSS proxy.

DepShield encountered errors while building your project

The project could not be analyzed because of build errors. Please review the error messages here. Another build will be scheduled when a change to a manifest file* occurs. If the build is successful this issue will be closed, otherwise the error message will be updated.

This is an automated GitHub Issue created by Sonatype DepShield. GitHub Apps, including DepShield, can be managed from the Developer settings of the repository administrators.

* Supported manifest files are: pom.xml, package.json, package-lock.json, npm-shrinkwrap.json, Cargo.lock, Cargo.toml, main.rs, lib.rs, build.gradle, build.gradle.kts, settings.gradle, settings.gradle.kts, gradle.properties, gradle-wrapper.properties, go.mod, go.sum

[RFE] Expose configuration in Nexus API

Hi, is there a way to expose proxy configuration in Nexus API?
Is it something that needs work only on the plugin side or is it Nexus lack of appropriate interfaces to register new proxy under /service/rest/v1/repositories?

Authentication

I set my URLs with

export PUB_HOSTED_URL=https://${ACCOUNT}:${PASSWORD}@nexus.somewhere.com/repository/pub.dev/
export FLUTTER_STORAGE_BASE_URL=https://${ACCOUNT}:${PASSWORD}@nexus.somewhere.com/repository/pub.dev/

When I run flutter pub run build_runner build --delete-conflicting-outputs
I get

Flutter assets will be downloaded from https://proxies:@nexus.somewhere.com/repository/pub.dev/. Make sure you trust this source!
Invalid PUB_HOSTED_URL="https://proxies:[email protected]/repository/pub.dev/": user-info is not supported in url

Flutter update fails when using the repository proxy

Hi,

First of all : thanks for this plugin that saves us lots of downloading time. :)

I just run into an issue trying to upgrade flutter flutter upgrade thru the proxy.

My analysis of the issue:
flutter fails accessing following resource : {nexus-server-url}/repository/dart-proxy//flutter_infra_release/flutter/d3ea636dc5d16b56819f3266241e1f708979c233/flutter-web-sdk-linux-x64.zip
because nexus proxy seems to serve packages only under the following path: {nexus-server-url}/repository/dart-proxy/packages/

The workaround is to disable the proxy usage while upgrading.

Kind regards,
Renaud

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.