[
https://issues.apache.org/jira/browse/CB-9704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16897532#comment-16897532
]
Lee Meador commented on CB-9704:
--------------------------------
Its a shame this issue has been sitting here for almost 4 years as it makes it
difficult for Enterprise teams to use Cordova for their apps. Many Enterprises
want to build their apps inside their data centers (using CI tools) or the
desktop/laptop networks are limited as to where they can access.
If a way was made to specify the alternative repositories (perhaps by URL) that
would be used when building the build.gradle files, the various workarounds
would not have to be reworked periodically when a new version comes out that
needs another repo or a different repo. No init scripts that change per
version. And no prebuild hook scripts to alter the build.gradle files that
change per version.
This sort of thing can be done with a magic environment variable (say
CORDOVA_MAVEN_REPO_LIST) that contains a list of the repo or repos that should
be used. Specify some URL like
https://artifacts.mycompany.com/cordova-repo-group and set up a Nexus or
Artifactory repo group to proxy out to the desired repos. Or specify multiple
repo URLs with commas or spaces to delimit.
Perhaps two environment variable should be used for the
buildscript.repositories and the project repositories as they can be different.
> Apache Cordova 5 does not support using a custom nexus repository for android
> builds
> ------------------------------------------------------------------------------------
>
> Key: CB-9704
> URL: https://issues.apache.org/jira/browse/CB-9704
> Project: Apache Cordova
> Issue Type: New Feature
> Components: Ionic
> Reporter: Ajay Gupta
> Priority: Major
>
> We are using AngularJS and Ionic for writing a mobile application supported
> both on IOS and Android. When we do "ionic build android --release", it
> creates a build.gradle file in both platforms/android directory and
> platforms/android/CordovaLib directory. Both of these files point to
> mavenCentral() as the repository which tries to download artifacts directly
> from the maven central repo (http://repo1.maven.org/maven2). We are trying
> to build our mobile apps as part of a Jenkins build behind company proxy and
> would like to have gradle reach out to our internal Maven nexus repository
> instead of reaching out to the central maven repository directly. Our
> internal Neux repository would then proxy everything to the maven central
> repository.
> We cannot hand edit the build.gradle file as it is a generated file and so
> any custom changes made to it would be lost in the next build. Cordova 5
> supports adding custom extensions using build-extras.gradle file but it does
> not support overriding repositories.
> As a workaround, we have defined a pre-build Cordova hook to search replace
> mavenCentral() references to our local maven repository before doing an
> android build. It works but is a unnecessary workaround and not a very clean
> solution.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]