Skip to content

Commit 2c86e70

Browse files
author
Sarah Tattersall
committed
Merge pull request #12 from sarahtattersall/develop
Bug fix for #10 and maven integration
2 parents 47bbef0 + a8ac05a commit 2c86e70

File tree

908 files changed

+481
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

908 files changed

+481
-12
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414
# Maven
1515
log/
1616
target/
17+
18+
#PIPE
19+
PipeTestFile.xml

README.md

+43-5

mvn_libs/add_maven_dependencies.py

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import os
2+
import json
3+
4+
# Loads JSON internal_libs.json file
5+
def get_internal_libs():
6+
json_data=open('internal_libs.json')
7+
data = json.load(json_data)
8+
json_data.close()
9+
10+
for (key, value) in data.iteritems():
11+
print key
12+
13+
return data
14+
15+
def getMavenInstallCall(libFile, artifactId, versionId):
16+
commandLineCall = "mvn install:install-file"
17+
groupIdArg = "-DgroupId=uk.ac.imperial"
18+
packgingArg = "-Dpackaging=jar"
19+
20+
fileArg = "-Dfile=" + libFile
21+
artifactIdArg = "-DartifactId=" + artifactId
22+
versionArg = "-Dversion=" + versionId
23+
24+
commandLine = (" ").join([commandLineCall,
25+
fileArg,
26+
groupIdArg,
27+
artifactIdArg,
28+
versionArg,
29+
packgingArg])
30+
31+
return commandLine
32+
33+
34+
# Expects data in format
35+
# { <jar_name> : { artifactId : <artifact>, version : <version>}, ...}
36+
def process_libs(libs, path):
37+
38+
for (lib, value) in libs.iteritems():
39+
libFile = path + "/" + lib + ".jar"
40+
commandLine = getMavenInstallCall(libFile, value.get('artifactId'), value.get('version'))
41+
os.system(commandLine)
42+
43+
def print_pom_dependencies(libs):
44+
dependencyOpenTag = '<dependency>'
45+
dependencyCloseTag='</dependency>'
46+
groupIDTag = '<groupId>uk.ac.imperial</groupId>'
47+
for (lib, value) in libs.iteritems():
48+
artifactIdTag = '<artifactId>' + value.get('artifactId') + '</artifactId>'
49+
versionTag = '<version>' + value.get('version') + '</version>'
50+
51+
dependency = ('\n').join([dependencyOpenTag,
52+
" " + groupIDTag,
53+
" " + artifactIdTag,
54+
" " + versionTag,
55+
dependencyCloseTag])
56+
print dependency
57+
print
58+
59+
if __name__ == '__main__':
60+
import sys
61+
if (len(sys.argv) < 2):
62+
print "Please enter library locations"
63+
sys.exit(1)
64+
65+
libData = get_internal_libs();
66+
process_libs(libData, sys.argv[1])
67+
68+
print "DEPENDENCIES TO INCLUDE IN POM.XML:"
69+
print_pom_dependencies(libData)

mvn_libs/internal_libs.json

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"Jama-1.0.2" : {
3+
"artifactId" : "jama",
4+
"version" : "1.0.2"
5+
},
6+
"abbot" : {
7+
"artifactId" : "abbot",
8+
"version" : "1.0"
9+
},
10+
"commons-logging-1.1" : {
11+
"artifactId" : "commons-logging",
12+
"version" : "1.1"
13+
},
14+
"drmaa" : {
15+
"artifactId" : "drmaa",
16+
"version" : "1.0"
17+
},
18+
"hadoop-0.13.1-dev-core" : {
19+
"artifactId" : "hadoop-dev-core",
20+
"version" : "0.13.1"
21+
},
22+
"jcommon-1.0.10" : {
23+
"artifactId" : "jcommon",
24+
"version" : "1.0.10"
25+
},
26+
"jfreechart-1.0.6" : {
27+
"artifactId" : "jfreechart",
28+
"version" : "1.0.6"
29+
},
30+
"jpowergraph-0.2-common" : {
31+
"artifactId" : "jpowergraph-common",
32+
"version" : "0.2"
33+
},
34+
"jpowergraph-0.2-swing" : {
35+
"artifactId" : "jpowergraph-swing",
36+
"version" : "0.2"
37+
},
38+
"log4j-1.2.13" : {
39+
"artifactId" : "log4j",
40+
"version" : "1.2.13"
41+
},
42+
"netcdf-4.2" : {
43+
"artifactId" : "netcdf",
44+
"version" : "4.2"
45+
},
46+
"poi-3.7-20101029" : {
47+
"artifactId" : "poi",
48+
"version" : "3.7"
49+
},
50+
"poi-examples-3.7-20101029" : {
51+
"artifactId" : "poi-examples",
52+
"version" : "3.7"
53+
},
54+
"poi-ooxml-3.7-20101029" : {
55+
"artifactId" : "poi-ooxml",
56+
"version" : "3.7"
57+
},
58+
"poi-ooxml-schemas-3.7-20101029" : {
59+
"artifactId" : "poi-ooxml-schemas",
60+
"version" : "3.7"
61+
},
62+
"poi-scratchpad-3.7-20101029" : {
63+
"artifactId" : "poi-scratchpad",
64+
"version" : "3.7"
65+
},
66+
"powerswing-0.3" : {
67+
"artifactId" : "powerswing",
68+
"version" : "0.3"
69+
},
70+
"tools" : {
71+
"artifactId" : "tools",
72+
"version" : "1.0"
73+
},
74+
"xmlunit-1.4" : {
75+
"artifactId" : "xmlunit",
76+
"version" : "1.4"
77+
}
78+
}

pom.xml

+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>uk.ac.imperial</groupId>
8+
<artifactId>PIPE</artifactId>
9+
<version>4.3.0</version>
10+
11+
<properties>
12+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13+
</properties>
14+
15+
<build>
16+
<plugins>
17+
<plugin>
18+
<groupId>org.codehaus.mojo</groupId>
19+
<artifactId>exec-maven-plugin</artifactId>
20+
<version>1.2.1</version>
21+
<configuration>
22+
<mainClass>Pipe</mainClass>
23+
</configuration>
24+
</plugin>
25+
</plugins>
26+
</build>
27+
28+
<dependencies>
29+
<dependency>
30+
<groupId>maven</groupId>
31+
<artifactId>maven-abbot-plugin</artifactId>
32+
<version>1.1</version>
33+
</dependency>
34+
35+
<dependency>
36+
<groupId>uk.ac.imperial</groupId>
37+
<artifactId>tools</artifactId>
38+
<version>1.0</version>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>xmlunit</groupId>
43+
<artifactId>xmlunit</artifactId>
44+
<version>1.4</version>
45+
</dependency>
46+
47+
<dependency>
48+
<groupId>uk.ac.imperial</groupId>
49+
<artifactId>hadoop-dev-core</artifactId>
50+
<version>0.13.1</version>
51+
</dependency>
52+
53+
<dependency>
54+
<groupId>commons-logging</groupId>
55+
<artifactId>commons-logging</artifactId>
56+
<version>1.1.3</version>
57+
</dependency>
58+
59+
<dependency>
60+
<groupId>org.apache.poi</groupId>
61+
<artifactId>poi</artifactId>
62+
<version>3.7</version>
63+
</dependency>
64+
65+
<dependency>
66+
<groupId>org.apache.poi</groupId>
67+
<artifactId>poi-ooxml</artifactId>
68+
<version>3.7</version>
69+
</dependency>
70+
71+
<dependency>
72+
<groupId>org.apache.poi</groupId>
73+
<artifactId>poi-ooxml-schemas</artifactId>
74+
<version>3.7</version>
75+
</dependency>
76+
77+
<dependency>
78+
<groupId>org.apache.poi</groupId>
79+
<artifactId>poi-scratchpad</artifactId>
80+
<version>3.7</version>
81+
</dependency>
82+
83+
<dependency>
84+
<groupId>org.apache.poi</groupId>
85+
<artifactId>poi-examples</artifactId>
86+
<version>3.7</version>
87+
</dependency>
88+
89+
<dependency>
90+
<groupId>uk.ac.imperial</groupId>
91+
<artifactId>drmaa</artifactId>
92+
<version>1.0</version>
93+
</dependency>
94+
95+
<dependency>
96+
<groupId>jfree</groupId>
97+
<artifactId>jfreechart</artifactId>
98+
<version>1.0.0</version>
99+
</dependency>
100+
101+
<dependency>
102+
<groupId>log4j</groupId>
103+
<artifactId>log4j</artifactId>
104+
<version>1.2.17</version>
105+
</dependency>
106+
107+
108+
<dependency>
109+
<groupId>jfree</groupId>
110+
<artifactId>jcommon</artifactId>
111+
<version>1.0.16</version>
112+
</dependency>
113+
114+
<dependency>
115+
<groupId>uk.ac.imperial</groupId>
116+
<artifactId>jama</artifactId>
117+
<version>1.0.2</version>
118+
</dependency>
119+
120+
<dependency>
121+
<groupId>uk.ac.imperial</groupId>
122+
<artifactId>powerswing</artifactId>
123+
<version>0.3</version>
124+
</dependency>
125+
126+
<dependency>
127+
<groupId>uk.ac.imperial</groupId>
128+
<artifactId>jpowergraph-swing</artifactId>
129+
<version>0.2</version>
130+
</dependency>
131+
132+
<dependency>
133+
<groupId>uk.ac.imperial</groupId>
134+
<artifactId>jpowergraph-common</artifactId>
135+
<version>0.2</version>
136+
</dependency>
137+
138+
<dependency>
139+
<groupId>edu.ucar</groupId>
140+
<artifactId>netcdf</artifactId>
141+
<version>4.2</version>
142+
</dependency>
143+
144+
<dependency>
145+
<groupId>junit</groupId>
146+
<artifactId>junit</artifactId>
147+
<version>4.11</version>
148+
<scope>test</scope>
149+
</dependency>
150+
</dependencies>
151+
152+
153+
</project>

src/lib/abbot.jar

-341 KB
Binary file not shown.

src/lib/commons-logging-1.1.jar

-51.7 KB
Binary file not shown.

src/lib/jcommon-1.0.10.jar

-304 KB
Binary file not shown.

src/lib/jfreechart-1.0.6.jar

-1.16 MB
Binary file not shown.

src/lib/log4j-1.2.13.jar

-350 KB
Binary file not shown.

src/lib/netcdf-4.2.jar

-10.9 MB
Binary file not shown.

src/lib/poi-3.7-20101029.jar

-1.6 MB
Binary file not shown.

src/lib/poi-examples-3.7-20101029.jar

-258 KB
Binary file not shown.

src/lib/poi-ooxml-3.7-20101029.jar

-487 KB
Binary file not shown.
-3.78 MB
Binary file not shown.
-821 KB
Binary file not shown.

src/lib/xmlunit-1.4.jar

-96.7 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)