Offline all material of idempiere by artifactory

From iDempiere en
Jump to navigation Jump to search


Setup Artifactory

1. install Artifactory

You can install ARTIFACTORY for your OS.

But i prefer download zip file and extract it, because it's portable, don't need setup each time i re-install PC

2. run Artifactory

if you install it will run like any service. so run it like run service and normal it's auto start

for zip method: [Artifactory]/bin/artifactory.sh

first time you're requested to setup password for admin user

Create maven repository

do it for set of repository:

Repository keyrepository link Url
atlassian-3rd https://maven.atlassian.com/3rdparty
clojars http://clojars.org/repo
jenkins http://repo.jenkins-ci.org/releases
jr-ce https://jaspersoft.jfrog.io/jaspersoft/jr-ce-releases
jr-third-party https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts
maven-central http://central.maven.org/maven2
netbeans http://bits.netbeans.org/maven2
opennms http://repo.opennms.org/maven2
org.jfree.chart http://nexus.orbisgis.org/content/repositories/osgi-maven
redhat-ga https://maven.repository.redhat.com/ga
zkoss http://mavensync.zkoss.org/maven2

Create p2 repository

do it for set of repository:

Repository keyrepository link Url
eclipse-root http://download.eclipse.org/eclipse/updates
jetty-root http://download.eclipse.org/jetty/updates
orbit-root http://download.eclipse.org/tools/orbit/downloads
restlet http://p2.restlet.com/2.3
sourceforge-idempiere https://sourceforge.net/projects/idempiere/files
sourceforge-jasperstudio https://nchc.dl.sourceforge.net/project/jasperstudio

setting for maven to use mirror repository

create file ~/.m2/settings.xml with bellow content or append it to exists file

settings.xml for maven
<settings>
   <mirrors>
       <mirror>
           <id>main-cental-lc</id>
           <url>http://localhost:8081/artifactory/maven-central</url>
           <mirrorOf>central</mirrorOf>
       </mirror>
       <mirror>
           <id>repo.exist.com-lc</id>
           <url>http://localhost:8081/artifactory/maven-central</url>
           <mirrorOf>repo.exist.com</mirrorOf>
       </mirror>
       <mirror>
           <id>ibiblio.org-lc</id>
           <url>http://localhost:8081/artifactory/maven-central</url>
           <mirrorOf>ibiblio.org</mirrorOf>
       </mirror>
       <mirror>
           <id>ibiblio.net-lc</id>
           <url>http://localhost:8081/artifactory/maven-central</url>
           <mirrorOf>ibiblio.net</mirrorOf>
       </mirror>
       <mirror>
           <id>uk.maven.org-lc</id>
           <url>http://localhost:8081/artifactory/maven-central</url>
           <mirrorOf>uk.maven.org</mirrorOf>
       </mirror>
       <mirror>
           <id>cental-lc</id>
           <url>http://localhost:8081/artifactory/maven-central</url>
           <mirrorOf>Central</mirrorOf>
       </mirror>
       <mirror>
           <id>Redhat-GA-lc</id>
           <url>http://localhost:8081/artifactory/redhat-ga</url>
           <mirrorOf>Redhat-GA</mirrorOf>
       </mirror>
       <mirror>
           <id>OpenNMS-lc</id>
           <url>http://localhost:8081/artifactory/opennms</url>
           <mirrorOf>OpenNMS</mirrorOf>
       </mirror>
       <mirror>
           <id>jr-ce-releases-lc</id>
           <url>http://localhost:8081/artifactory/jr-ce</url>
           <mirrorOf>jr-ce-releases</mirrorOf>
       </mirror>
       <mirror>
           <id>jp-third-party-ce-lc</id>
           <url>http://localhost:8081/artifactory/jr-third-party</url>
           <mirrorOf>jp-third-party-ce</mirrorOf>
       </mirror>
       <mirror>
           <id>NetBeans-lc</id>
           <url>http://localhost:8081/artifactory/netbeans</url>
           <mirrorOf>NetBeans</mirrorOf>
       </mirror>
       <mirror>
           <id>Clojars-lc</id>
           <url>http://localhost:8081/artifactory/clojars</url>
           <mirrorOf>Clojars</mirrorOf>
       </mirror>
       <mirror>
           <id>atlassian-3rdparty-lc</id>
           <url>http://localhost:8081/artifactory/atlassian-3rd</url>
           <mirrorOf>atlassian-3rdparty</mirrorOf>
       </mirror>
       <mirror>
           <id>zkoss-lc</id>
           <url>http://localhost:8081/artifactory/zkoss</url>
           <mirrorOf>zkoss</mirrorOf>
       </mirror>
       <mirror>
           <id>jenkins-lc</id>
           <url>http://localhost:8081/artifactory/jenkins</url>
           <mirrorOf>jenkins</mirrorOf>
       </mirror>
       <mirror>
           <id>org.jfree.chart-lc</id>
           <url>http://localhost:8081/artifactory/org.jfree.chart</url>
           <mirrorOf>org.jfree.chart</mirrorOf>
       </mirror>
       <mirror>
           <id>jasperstudio-6.6.0-lc</id>
           <url>http://localhost:8081/artifactory/jasperstudio-6.6.0</url>
           <mirrorOf>jasperstudio-6.6.0</mirrorOf>
       </mirror>
       <mirror>
           <id>orbit-photon-R20180905201904-lc</id>
           <mirrorOf>orbit-photon-R20180905201904</mirrorOf>
           <name>Local Mirror orbit-photon-R20180905201904</name>
           <url>http://localhost:8081/artifactory/orbit-root/drops/R20180905201904/repository</url>
           <layout>p2</layout>
           <mirrorOfLayouts>p2</mirrorOfLayouts>
       </mirror>
       <mirror>
           <id>orbit-photon-R20180531190352-lc</id>
           <mirrorOf>orbit-photon-R20180531190352</mirrorOf>
           <name>Local Mirror orbit-photon-R20180531190352</name>
           <url>http://localhost:8081/artifactory/orbit-root/drops2/R20180531190352/repository</url>
           <layout>p2</layout>
           <mirrorOfLayouts>p2</mirrorOfLayouts>
       </mirror>
       <mirror>
           <id>eclipse-photon-201809-lc</id>
           <mirrorOf>eclipse-photon-201809</mirrorOf>
           <name>Local Mirror of eclipse-photon-201809 repository.</name>
           <url>http://localhost:8081/artifactory/eclipse-root/4.9</url>
           <layout>p2</layout>
           <mirrorOfLayouts>p2</mirrorOfLayouts>
       </mirror>
       <mirror>
           <id>jasperstudio-lc</id>
           <mirrorOf>jasperstudio-6.6.0</mirrorOf>
           <name>Local Mirror of jasperstudio-6.6.0 repository.</name>
           <url>http://localhost:8081/artifactory/list/sourceforge-jasperstudio/updatesite/6.6.0</url>
           <layout>p2</layout>
           <mirrorOfLayouts>p2</mirrorOfLayouts>
       </mirror>
    </mirrors>

</settings>

setting for p2

above steps enough to use local server for all stuff relate to maven ever p2 repository use inside maven.

it's also same effect of ".m2/repository"

for p2 use on target platform need to configuration somethings like proxy or hosts,... but i use simpler solution.

run bellow script to change url on target platform to use local

script to switch url on target platform to local

IDEMPIERE_ROOT=/home/hieplq/1Dev/project/native/idempiere-dev-11 targetplatform=${IDEMPIERE_ROOT}/org.idempiere.p2.targetplatform/org.idempiere.p2.targetplatform.target

sed -i 's|<repository location="http://p2.restlet.com/2.3"/>|<repository location="http://localhost:8081/artifactory/restlet"/>|g' ${targetplatform}

sed -i 's|<repository location="http://download.eclipse.org/eclipse/updates|<repository location="http://localhost:8081/artifactory/eclipse-root|g' ${targetplatform}

sed -i 's|<repository location="http://download.eclipse.org/tools/orbit/downloads|<repository location="http://localhost:8081/artifactory/orbit-root|g' ${targetplatform}

sed -i 's|<repository location="http://download.eclipse.org/jetty/updates|<repository location="http://localhost:8081/artifactory/jetty-root|g' ${targetplatform}

sed -i 's|<repository location="https://sourceforge.net/projects/idempiere/files|<repository location="http://localhost:8081/artifactory/sourceforge-idempiere|g' ${targetplatform}

know issue

sourceforge

in case you're unlucky you still get issue with sourceforge, almost reason by that time sourceforge do mirror server

try it some time, or do it on other day. after you success one time you will always success next time

p2 mirror

ever you point target to use localhost, it sometime still download from internet. reason by p2.mirrorsURL

you have three option:

1. let it be in case nothing slow

2. temp turn of your network until you complete load target platform on eclipse or complete run mvn verify

3. run eclipse with -Declipse.p2.mirrors=false on eclipse.ini (it also effect to other action relate eclipse like update) Avoiding mirrors, even when using p2.mirrorsURL

-Dtycho.disableP2Mirrors=true for maven tycho command disable P2 mirrors https://wiki.eclipse.org/Equinox/p2/p2.mirrorsURL