We have Artifactory setup and we use Maven central repo for downloading
artifacts, which are then automatically cached in Artifactory. We also
upload/deploy our own artifacts in Artifactory.

I now want to replace Maven central repo with jcenter and would like to
continue using our Artifactory for uploading/deploying our own artifacts and
for also caching the jcenter (and any third-party) artifacts. I can ask all
developers to modify their settings.xml file as it will be a one-time
activity so that's not a problem.

I saw  this <http://stackoverflow.com/a/22081916/361089>   link by
@helmedeiros which describes making changes in <repositories> and
<pluginRepositories> section of settings.xml file. However, those are the
sections where i specify URL for our Artifactory server. If i replace my
Artifactory URL, then it would mean that i will be able to both fetch and
upload artifacts from jcenter which is not what i want.

How can i ensure that all developers are only able to pull (NOT
deploy/upload) from jcenter and deploy/upload ONLY to Artifactory?

Here's what we have right now in settings.xml:

<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0
http://maven.apache.org/xsd/settings-1.1.0.xsd";
xmlns="http://maven.apache.org/SETTINGS/1.1.0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <servers>
    <server>
      <username>${security.getCurrentUsername()}</username>
      <password>${security.getEscapedEncryptedPassword()!"*** Insert
encrypted password here ***"}</password>
      <id>central</id>
    </server>
    <server>
      <username>${security.getCurrentUsername()}</username>
      <password>${security.getEscapedEncryptedPassword()!"*** Insert
encrypted password here ***"}</password>
      <id>snapshots</id>
    </server>
  </servers>
  <profiles>
    <profile>
      <repositories>
        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>libs-release</name>
          <url>https://inhouse-artifactory/artifactory/libs-release</url>
        </repository>
        <repository>
          <snapshots />
          <id>snapshots</id>
          <name>libs-snapshot</name>
          <url>https://inhouse-artifactory/artifactory/libs-snapshot</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>plugins-release</name>
          <url>https://inhouse-artifactory/artifactory/plugins-release</url>
        </pluginRepository>
        <pluginRepository>
          <snapshots />
          <id>snapshots</id>
          <name>plugins-snapshot</name>
         
<url>https://inhouse-artifactory/artifactory/plugins-snapshot</url>
        </pluginRepository>
      </pluginRepositories>
      <id>artifactory</id>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>artifactory</activeProfile>
  </activeProfiles>
</settings>






--
View this message in context: 
http://forums.jfrog.org/Configure-jcenter-for-only-downloading-artifacts-and-Artifactory-for-deploying-artifacts-tp7581028.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to