-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from sarahtattersall/develop
Bug fix for #10 and maven integration
- Loading branch information
Showing
908 changed files
with
481 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,6 @@ | |
# Maven | ||
log/ | ||
target/ | ||
|
||
#PIPE | ||
PipeTestFile.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import os | ||
import json | ||
|
||
# Loads JSON internal_libs.json file | ||
def get_internal_libs(): | ||
json_data=open('internal_libs.json') | ||
data = json.load(json_data) | ||
json_data.close() | ||
|
||
for (key, value) in data.iteritems(): | ||
print key | ||
|
||
return data | ||
|
||
def getMavenInstallCall(libFile, artifactId, versionId): | ||
commandLineCall = "mvn install:install-file" | ||
groupIdArg = "-DgroupId=uk.ac.imperial" | ||
packgingArg = "-Dpackaging=jar" | ||
|
||
fileArg = "-Dfile=" + libFile | ||
artifactIdArg = "-DartifactId=" + artifactId | ||
versionArg = "-Dversion=" + versionId | ||
|
||
commandLine = (" ").join([commandLineCall, | ||
fileArg, | ||
groupIdArg, | ||
artifactIdArg, | ||
versionArg, | ||
packgingArg]) | ||
|
||
return commandLine | ||
|
||
|
||
# Expects data in format | ||
# { <jar_name> : { artifactId : <artifact>, version : <version>}, ...} | ||
def process_libs(libs, path): | ||
|
||
for (lib, value) in libs.iteritems(): | ||
libFile = path + "/" + lib + ".jar" | ||
commandLine = getMavenInstallCall(libFile, value.get('artifactId'), value.get('version')) | ||
os.system(commandLine) | ||
|
||
def print_pom_dependencies(libs): | ||
dependencyOpenTag = '<dependency>' | ||
dependencyCloseTag='</dependency>' | ||
groupIDTag = '<groupId>uk.ac.imperial</groupId>' | ||
for (lib, value) in libs.iteritems(): | ||
artifactIdTag = '<artifactId>' + value.get('artifactId') + '</artifactId>' | ||
versionTag = '<version>' + value.get('version') + '</version>' | ||
|
||
dependency = ('\n').join([dependencyOpenTag, | ||
" " + groupIDTag, | ||
" " + artifactIdTag, | ||
" " + versionTag, | ||
dependencyCloseTag]) | ||
print dependency | ||
|
||
if __name__ == '__main__': | ||
import sys | ||
if (len(sys.argv) < 2): | ||
print "Please enter library locations" | ||
sys.exit(1) | ||
|
||
libData = get_internal_libs(); | ||
process_libs(libData, sys.argv[1]) | ||
|
||
print "DEPENDENCIES TO INCLUDE IN POM.XML:" | ||
print_pom_dependencies(libData) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"Jama-1.0.2" : { | ||
"artifactId" : "jama", | ||
"version" : "1.0.2" | ||
}, | ||
"abbot" : { | ||
"artifactId" : "abbot", | ||
"version" : "1.0" | ||
}, | ||
"commons-logging-1.1" : { | ||
"artifactId" : "commons-logging", | ||
"version" : "1.1" | ||
}, | ||
"drmaa" : { | ||
"artifactId" : "drmaa", | ||
"version" : "1.0" | ||
}, | ||
"hadoop-0.13.1-dev-core" : { | ||
"artifactId" : "hadoop-dev-core", | ||
"version" : "0.13.1" | ||
}, | ||
"jcommon-1.0.10" : { | ||
"artifactId" : "jcommon", | ||
"version" : "1.0.10" | ||
}, | ||
"jfreechart-1.0.6" : { | ||
"artifactId" : "jfreechart", | ||
"version" : "1.0.6" | ||
}, | ||
"jpowergraph-0.2-common" : { | ||
"artifactId" : "jpowergraph-common", | ||
"version" : "0.2" | ||
}, | ||
"jpowergraph-0.2-swing" : { | ||
"artifactId" : "jpowergraph-swing", | ||
"version" : "0.2" | ||
}, | ||
"log4j-1.2.13" : { | ||
"artifactId" : "log4j", | ||
"version" : "1.2.13" | ||
}, | ||
"netcdf-4.2" : { | ||
"artifactId" : "netcdf", | ||
"version" : "4.2" | ||
}, | ||
"poi-3.7-20101029" : { | ||
"artifactId" : "poi", | ||
"version" : "3.7" | ||
}, | ||
"poi-examples-3.7-20101029" : { | ||
"artifactId" : "poi-examples", | ||
"version" : "3.7" | ||
}, | ||
"poi-ooxml-3.7-20101029" : { | ||
"artifactId" : "poi-ooxml", | ||
"version" : "3.7" | ||
}, | ||
"poi-ooxml-schemas-3.7-20101029" : { | ||
"artifactId" : "poi-ooxml-schemas", | ||
"version" : "3.7" | ||
}, | ||
"poi-scratchpad-3.7-20101029" : { | ||
"artifactId" : "poi-scratchpad", | ||
"version" : "3.7" | ||
}, | ||
"powerswing-0.3" : { | ||
"artifactId" : "powerswing", | ||
"version" : "0.3" | ||
}, | ||
"tools" : { | ||
"artifactId" : "tools", | ||
"version" : "1.0" | ||
}, | ||
"xmlunit-1.4" : { | ||
"artifactId" : "xmlunit", | ||
"version" : "1.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>uk.ac.imperial</groupId> | ||
<artifactId>PIPE</artifactId> | ||
<version>4.3.0</version> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>1.2.1</version> | ||
<configuration> | ||
<mainClass>Pipe</mainClass> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>maven</groupId> | ||
<artifactId>maven-abbot-plugin</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>uk.ac.imperial</groupId> | ||
<artifactId>tools</artifactId> | ||
<version>1.0</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>xmlunit</groupId> | ||
<artifactId>xmlunit</artifactId> | ||
<version>1.4</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>uk.ac.imperial</groupId> | ||
<artifactId>hadoop-dev-core</artifactId> | ||
<version>0.13.1</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
<version>1.1.3</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi</artifactId> | ||
<version>3.7</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi-ooxml</artifactId> | ||
<version>3.7</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi-ooxml-schemas</artifactId> | ||
<version>3.7</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi-scratchpad</artifactId> | ||
<version>3.7</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi-examples</artifactId> | ||
<version>3.7</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>uk.ac.imperial</groupId> | ||
<artifactId>drmaa</artifactId> | ||
<version>1.0</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>jfree</groupId> | ||
<artifactId>jfreechart</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>log4j</groupId> | ||
<artifactId>log4j</artifactId> | ||
<version>1.2.17</version> | ||
</dependency> | ||
|
||
|
||
<dependency> | ||
<groupId>jfree</groupId> | ||
<artifactId>jcommon</artifactId> | ||
<version>1.0.16</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>uk.ac.imperial</groupId> | ||
<artifactId>jama</artifactId> | ||
<version>1.0.2</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>uk.ac.imperial</groupId> | ||
<artifactId>powerswing</artifactId> | ||
<version>0.3</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>uk.ac.imperial</groupId> | ||
<artifactId>jpowergraph-swing</artifactId> | ||
<version>0.2</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>uk.ac.imperial</groupId> | ||
<artifactId>jpowergraph-common</artifactId> | ||
<version>0.2</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>edu.ucar</groupId> | ||
<artifactId>netcdf</artifactId> | ||
<version>4.2</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.11</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
|
||
</project> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
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.
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.
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.
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.
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.
Oops, something went wrong.