| 1 |
#!/usr/bin/python |
|---|
| 2 |
# $Id$ |
|---|
| 3 |
"""Builds a maven repository for Nuxeo 5 |
|---|
| 4 |
|
|---|
| 5 |
Usage: ./build-repo [options] |
|---|
| 6 |
|
|---|
| 7 |
Options: |
|---|
| 8 |
-h / --help |
|---|
| 9 |
Print this message and exit. |
|---|
| 10 |
|
|---|
| 11 |
-l / --local |
|---|
| 12 |
Use local repository |
|---|
| 13 |
|
|---|
| 14 |
-r / --repository=repo |
|---|
| 15 |
The repository url. |
|---|
| 16 |
|
|---|
| 17 |
Repository url defaults to "file:///var/www/svn.nuxeo.org/maven/repo/". |
|---|
| 18 |
Local url is "file:~/.m2/repository". |
|---|
| 19 |
""" |
|---|
| 20 |
|
|---|
| 21 |
print "Not used anymore, kept for historical reasons" |
|---|
| 22 |
import sys |
|---|
| 23 |
sys.exit() |
|---|
| 24 |
|
|---|
| 25 |
import os |
|---|
| 26 |
import sys |
|---|
| 27 |
|
|---|
| 28 |
JARS = [ |
|---|
| 29 |
('jmimemagic-0.1.0.jar', 'jmimemagic', 'jmimemagic', '0.1.0'), |
|---|
| 30 |
('el-api.jar', 'javax.el', 'el-api', 'unknown'), |
|---|
| 31 |
('el-ri.jar', 'javax.el', 'el-ri', 'unknown'), |
|---|
| 32 |
('jackrabbit-core-1.0.1.jar', 'org.apache.jackrabbit', 'jackrabbit-core', '1.0.1'), |
|---|
| 33 |
('jackrabbit-jcr-commons-1.0.1.jar', 'org.apache.jackrabbit', 'jackrabbit-jcr-commons', '1.0.1'), |
|---|
| 34 |
('ejb3-persistence.jar', 'javax.persistence', 'persistence', '3.0'), |
|---|
| 35 |
('jboss-test.jar', 'jboss', 'jboss-test', '4.0.4.CR2'), |
|---|
| 36 |
('jca-api.jar', 'javax.ressource', 'jca-api', '1.5'), |
|---|
| 37 |
('jboss-ejb3x.jar', 'javax.ejb', 'ejb', '3.0-RC8'), |
|---|
| 38 |
('jboss-ejb3.jar', 'jboss', 'ejb3', '3.0-RC8'), |
|---|
| 39 |
|
|---|
| 40 |
('jboss-annotations-ejb3.jar', 'jboss', 'jboss-annotations-ejb3', '3.0-RC8'), |
|---|
| 41 |
('jms-api.jar', 'javax.jms', 'jms', '1.1'), |
|---|
| 42 |
('jsr181.jar', 'javax.jws', 'jsr181', '1.0'), |
|---|
| 43 |
('java-cup-v11a.jar', 'cup', 'java-cup', '0.11a'), |
|---|
| 44 |
('jcr-1.0.jar', 'jsr170', 'jcr', '1.0'), |
|---|
| 45 |
('jcr-1.0.jar', 'javax.jcr', 'jcr', '1.0'), |
|---|
| 46 |
('jboss.jar', 'jboss', 'jboss', '4.0.4.GA'), |
|---|
| 47 |
('jboss-common.jar', 'jboss', 'jboss-common', '4.0.4.GA'), |
|---|
| 48 |
('jboss-jmx.jar', 'jboss', 'jboss-jmx', '4.0.4.GA'), |
|---|
| 49 |
('jboss-system.jar', 'jboss', 'jboss-system', '4.0.4.GA'), |
|---|
| 50 |
('jboss-j2ee.jar', 'jboss', 'jboss-j2ee', '4.0.4.GA'), |
|---|
| 51 |
('jbosssx.jar', 'jboss', 'jbosssx', '4.0.4.GA'), |
|---|
| 52 |
('jboss-remoting.jar', 'jboss', 'jboss-remoting', '4.0.4.GA'), |
|---|
| 53 |
('jboss-transaction-client.jar', 'jboss', 'jboss-transaction-client', '4.0.4.GA'), |
|---|
| 54 |
# Don't know the right version number -> putting the JEMS version instead |
|---|
| 55 |
('javassist.jar', 'jboss', 'javassist', '4.0.4.GA'), |
|---|
| 56 |
|
|---|
| 57 |
('jboss-seam.jar', 'jboss', 'jboss-seam', '1.0.1'), |
|---|
| 58 |
('jboss-seam-1.1.0.jar', 'jboss', 'jboss-seam', '1.1.0'), |
|---|
| 59 |
('jboss-seam-1.1.1.jar', 'jboss', 'jboss-seam', '1.1.1'), |
|---|
| 60 |
('jboss-seam-1.1.1-src.jar', 'jboss', 'jboss-seam-src', '1.1.1'), |
|---|
| 61 |
('jboss-seam-1.1.5.jar', 'jboss', 'jboss-seam', '1.1.5'), |
|---|
| 62 |
('jboss-seam-1.1.5-src.jar', 'jboss', 'jboss-seam-src', '1.1.5'), |
|---|
| 63 |
('jboss-seam-1.2.0.jar', 'jboss', 'jboss-seam', '1.2.0'), |
|---|
| 64 |
('jboss-seam-1.2.0-src.jar', 'jboss', 'jboss-seam-src', '1.2.0'), |
|---|
| 65 |
|
|---|
| 66 |
('jboss-cache-jdk50.jar', 'jboss', 'jboss-cache-jdk50', '1.4.0.SP1'), |
|---|
| 67 |
('jboss-aop-jdk50.jar', 'jboss', 'jboss-aop-jdk50', '1.4.0.SP1'), |
|---|
| 68 |
('jboss-aspect-jdk50-client.jar', 'jboss', 'jboss-aspect-jdk50-client', '1.5'), |
|---|
| 69 |
|
|---|
| 70 |
('jboss-serialization.jar', 'jboss', 'jboss-serialization', '1.0.0-RC1'), |
|---|
| 71 |
('jgroups.jar', 'jboss', 'jgroups', '2.2.9'), |
|---|
| 72 |
|
|---|
| 73 |
('jbpm-3.1.1.jar', 'jboss', 'jbpm', '3.1.1'), |
|---|
| 74 |
('jbpm-3.1.2.jar', 'jboss', 'jbpm', '3.1.2'), |
|---|
| 75 |
('jbpm-3.1.3.jar', 'jboss', 'jbpm', '3.1.3'), |
|---|
| 76 |
('jbpm-3.1.4.jar', 'jboss', 'jbpm', '3.1.4'), |
|---|
| 77 |
('jbpm-jpdl-3.2-GA.jar', 'jboss', 'jbpm-jpdl', '3.2.GA'), |
|---|
| 78 |
|
|---|
| 79 |
('jbpm-src-3.1.3.jar', 'jboss', 'jbpm-src', '3.1.3'), |
|---|
| 80 |
('jbpm-src-3.1.4.jar', 'jboss', 'jbpm-src', '3.1.4'), |
|---|
| 81 |
|
|---|
| 82 |
('jbpm-identity-3.1.3.jar', 'jboss', 'jbpm-identity', '3.1.3'), |
|---|
| 83 |
('jbpm-identity-3.1.4.jar', 'jboss', 'jbpm-identity', '3.1.4'), |
|---|
| 84 |
('jbpm-identity-3.2-GA.jar', 'jboss', 'jbpm-identity', '3.2.GA'), |
|---|
| 85 |
|
|---|
| 86 |
('jbpm-identity-src-3.1.3.jar', 'jboss', 'jbpm-identity-src', '3.1.3'), |
|---|
| 87 |
('jbpm-identity-src-3.1.4.jar', 'jboss', 'jbpm-identity-src', '3.1.4'), |
|---|
| 88 |
|
|---|
| 89 |
('jbpm-webapp-3.1.3.jar', 'jboss', 'jbpm-webapp', '3.1.3'), |
|---|
| 90 |
('jbpm-webapp-3.1.4.jar', 'jboss', 'jbpm-webapp', '3.1.4'), |
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 |
('dom4j-1.6.1.jar', 'dom4j', 'dom4j', '1.6.1'), |
|---|
| 94 |
|
|---|
| 95 |
('hibernate3.jar', 'hibernate', 'hibernate', '3.1-final'), |
|---|
| 96 |
('hibernate3.2.1-GA.jar', 'hibernate', 'hibernate', '3.2.1.GA'), |
|---|
| 97 |
|
|---|
| 98 |
('jta-1_0_1B-classes.zip', 'javax.transaction', 'jta', '1.0.1B'), |
|---|
| 99 |
('jdbc2_0-stdext.jar', 'hibernate', 'jdbc-stdext' ,'2.0'), |
|---|
| 100 |
('cglib-2.1_2jboss.jar', 'jboss', 'cglib-jboss', '2.1.2'), |
|---|
| 101 |
('asm-attrs.jar', 'hibernate', 'asm', '3.1-final'), |
|---|
| 102 |
('asm.jar', 'hibernate', 'asm-attrs', '3.1-final'), |
|---|
| 103 |
|
|---|
| 104 |
('xsom.jar', 'com.sun.xml', 'xsom', '20060306'), |
|---|
| 105 |
('jooconverter-2.1rc2.jar', 'net.sf', 'jooconverter', '2.1rc2'), |
|---|
| 106 |
('jodconverter-2.1.1.jar', 'com.artofsolving', 'jodconverter', '2.1.1'), |
|---|
| 107 |
('ehcache-1.2.3.jar', 'net.sf', 'ehcache', '1.2.3'), |
|---|
| 108 |
('activation.jar', 'javax.activation', 'activation', '1.0.2'), |
|---|
| 109 |
('PDFBox-0.7.2.jar', 'pdfbox', 'pdfbox', '0.7.2'), |
|---|
| 110 |
|
|---|
| 111 |
# Adobe pdfgenerator 7.0 deps |
|---|
| 112 |
('pdfgapi-ejb.jar', 'com.adobe', 'pdfgapi-ejb', '7.0'), |
|---|
| 113 |
('adobe-common.jar', 'com.adobe', 'adobe-common', '7.0'), |
|---|
| 114 |
('DocumentServicesLibrary.jar', 'com.adobe', 'DocumentServicesLibrary', '7.0'), |
|---|
| 115 |
('um.jar', 'com.adobe', 'um', '7.0'), |
|---|
| 116 |
('AdobeCSAUtils.jar', 'com.adobe', 'AdobeCSAUtils', '7.0'), |
|---|
| 117 |
('datamanager-client.jar', 'com.adobe', 'datamanager-client', '7.0'), |
|---|
| 118 |
|
|---|
| 119 |
('tomahawk-1.1.5-SNAPSHOT.jar', 'myfaces', 'tomahawk', '1.1.5-SNAPSHOT'), |
|---|
| 120 |
('tomahawk-sandbox-1.1.5-SNAPSHOT.jar', 'myfaces', 'tomahawk-sandbox', '1.1.5-SNAPSHOT'), |
|---|
| 121 |
('myfaces-api-1.1.5-SNAPSHOT.jar', 'myfaces', 'myfaces-api', '1.1.5-SNAPSHOT'), |
|---|
| 122 |
('myfaces-impl-1.1.5-SNAPSHOT.jar', 'myfaces', 'myfaces-impl', '1.1.5-SNAPSHOT'), |
|---|
| 123 |
|
|---|
| 124 |
('myfaces-api-1.1.4.jar', 'myfaces', 'myfaces-api', '1.1.4'), |
|---|
| 125 |
('myfaces-impl-1.1.4.jar', 'myfaces', 'myfaces-impl', '1.1.4'), |
|---|
| 126 |
|
|---|
| 127 |
# Jena libs |
|---|
| 128 |
('jena-2.4.jar', 'net.sourceforge.jena', 'jena', '2.4'), |
|---|
| 129 |
('arq-2.4.jar', 'net.sourceforge.jena', 'arq', '2.4'), |
|---|
| 130 |
('iri-2.4.jar', 'net.sourceforge.jena', 'iri', '2.4'), |
|---|
| 131 |
('icu4j-3.4.jar', 'icu4j', 'icu4j', '3.4'), |
|---|
| 132 |
|
|---|
| 133 |
('jackrabbit-index-filters-1.1.jar', 'org.apache.jackrabbit', 'index-filters', '1.1'), |
|---|
| 134 |
('tm-extractors-0.4.jar', 'org.apache.poi', 'tm-extractors', '0.4'), |
|---|
| 135 |
|
|---|
| 136 |
('casclient-2.0.11.jar', 'cas', 'casclient', '2.0.11'), |
|---|
| 137 |
|
|---|
| 138 |
# Maven plugins |
|---|
| 139 |
|
|---|
| 140 |
('maven-osgi-plugin-0.8.0-SNAPSHOT.jar', 'org.apache.felix.plugins', 'maven-osgi-plugin', '0.8.0-SNAPSHOT'), |
|---|
| 141 |
|
|---|
| 142 |
# Some image processing libraries that are part of the Mistral 0.9.4.446 release |
|---|
| 143 |
('mistral-0.9.4.446/EditableImage/dist/EditableImage.jar', 'net.java.dev.mistral', 'EditableImage', '0.9.4.446'), |
|---|
| 144 |
('mistral-0.9.4.446/JAI-Adapter/dist/JAI-Adapter.jar', 'net.java.dev.mistral', 'JAI-Adapter', '0.9.4.446'), |
|---|
| 145 |
('mistral-0.9.4.446/Examples/FaxManagerExample/dist/lib/jai_imageio.jar', 'net.java.dev.mistral', 'jai_imageio', '0.9.4.446'), |
|---|
| 146 |
('mistral-0.9.4.446/Examples/FaxManagerExample/dist/lib/metadata-extractor-2.3.1.jar', 'net.java.dev.mistral', 'metadata-extractor', '2.3.1'), |
|---|
| 147 |
('mistral-0.9.4.446/Examples/HistogramViewerExample/dist/lib/jai_core.jar', 'net.java.dev.mistral', 'jai_core', '0.9.4.446'), |
|---|
| 148 |
('mistral-0.9.4.446/ImageJ-Adapter/dist/ImageJ-Adapter.jar', 'net.java.dev.mistral', 'ImageJ-Adapter', '0.9.4.446'), |
|---|
| 149 |
|
|---|
| 150 |
# .raw image format support |
|---|
| 151 |
('jrawio-1.0.RC5.jar', 'net.java.dev.jrawio', 'jrawio', '1.0.RC5'), |
|---|
| 152 |
|
|---|
| 153 |
# testng |
|---|
| 154 |
|
|---|
| 155 |
('testng-5.5-jdk15.jar', 'org.testng', 'testng', '5.5-jdk15'), |
|---|
| 156 |
|
|---|
| 157 |
# Compass 1.1 |
|---|
| 158 |
('compass-annotations.jar', 'opensymphony', 'compass-annotations', '1.1'), |
|---|
| 159 |
('compass-core.jar', 'opensymphony', 'compass-core', '1.1'), |
|---|
| 160 |
('compass-gps.jar', 'opensymphony', 'compass-gps', '1.1'), |
|---|
| 161 |
('compass-vocabulary.jar', 'opensymphony', 'compass-vocabulary', '1.1'), |
|---|
| 162 |
|
|---|
| 163 |
('lucene-core.jar', 'org.apache.lucene', 'lucene-core', '2.0'), |
|---|
| 164 |
('lucene-analyzers.jar', 'org.apache.lucene', 'lucene-analyzers', '2.0'), |
|---|
| 165 |
('lucene-snowball.jar', 'org.apache.lucene', 'lucene-snowball', '2.0'), |
|---|
| 166 |
('lucene-highlighter.jar', 'org.apache.lucene', 'lucene-highlighter', '2.0'), |
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 |
# newsml parsing support from newsml.org |
|---|
| 170 |
('newsml-toolkit.jar', 'org.newsml.toolkit', 'newsml-toolkit', '2.0'), |
|---|
| 171 |
|
|---|
| 172 |
# CSS parsing |
|---|
| 173 |
('cssparser-0.9.4.jar', 'cssparser', 'cssparser', '0.9.4'), |
|---|
| 174 |
|
|---|
| 175 |
] |
|---|
| 176 |
|
|---|
| 177 |
CMD = """ |
|---|
| 178 |
mvn deploy:deploy-file -DgroupId=%(groupId)s \ |
|---|
| 179 |
-DartifactId=%(artifactId)s \ |
|---|
| 180 |
-Dversion=%(version)s \ |
|---|
| 181 |
-Dpackaging=jar \ |
|---|
| 182 |
-Dfile=%(path)s \ |
|---|
| 183 |
-DrepositoryId=Nuxeo \ |
|---|
| 184 |
-Durl=%(repo_url)s |
|---|
| 185 |
""" |
|---|
| 186 |
|
|---|
| 187 |
LOCAL_URL = "file:~/.m2/repository" |
|---|
| 188 |
DEFAULT_REPO_URL = "file:///var/www/svn.nuxeo.org/maven/repo/" |
|---|
| 189 |
|
|---|
| 190 |
def usage(code, msg=''): |
|---|
| 191 |
print >> sys.stderr, __doc__ |
|---|
| 192 |
if msg: |
|---|
| 193 |
print >> sys.stderr, msg |
|---|
| 194 |
sys.exit(code) |
|---|
| 195 |
|
|---|
| 196 |
def main(): |
|---|
| 197 |
|
|---|
| 198 |
import getopt |
|---|
| 199 |
try: |
|---|
| 200 |
opts, paths = getopt.getopt(sys.argv[1:], |
|---|
| 201 |
'l') |
|---|
| 202 |
opts, args = getopt.getopt(sys.argv[1:], 'hlr:', |
|---|
| 203 |
['help', 'local', |
|---|
| 204 |
'repository=']) |
|---|
| 205 |
except getopt.GetoptError, e: |
|---|
| 206 |
print e.msg |
|---|
| 207 |
usage(1) |
|---|
| 208 |
|
|---|
| 209 |
repo_url = DEFAULT_REPO_URL |
|---|
| 210 |
for opt, value in opts: |
|---|
| 211 |
if opt in ('-h', '--help'): |
|---|
| 212 |
usage(0) |
|---|
| 213 |
elif opt in ('-l', '--local'): |
|---|
| 214 |
repo_url = LOCAL_URL |
|---|
| 215 |
elif opt in ('-r', '--repository'): |
|---|
| 216 |
repo_url = value |
|---|
| 217 |
|
|---|
| 218 |
print "Building repository %s" % repo_url |
|---|
| 219 |
for path, groupId, artifactId, version in JARS: |
|---|
| 220 |
print CMD % locals() |
|---|
| 221 |
#return_code = os.system(CMD % locals()) |
|---|
| 222 |
#if return_code != 0: |
|---|
| 223 |
# sys.exit(return_code) |
|---|
| 224 |
|
|---|
| 225 |
if __name__ == "__main__": |
|---|
| 226 |
main() |
|---|