Skip to content
Snippets Groups Projects
Commit 3fd8ae2e authored by birkhoff's avatar birkhoff
Browse files

relative Path to workspace added

parent 47a2fba8
Branches
No related tags found
No related merge requests found
groupID = "de.prob"
features = ["de.prob2.feature"] // must be the same as the folder name
features = ["de.prob2.feature"] // must be the same as the folder name Please remember to add '../' if necessary
descriptions = [["de.prob2.feature": "ProB Rodin Plugin"],["de.prob2.feature": """ProB is an animator and model checker for the B-Method. It allows
descriptions = [["../de.prob2.feature": "ProB Rodin Plugin"],["../de.prob2.feature": """ProB is an animator and model checker for the B-Method. It allows
fully automatic animation of many B specifications, and can be
used to systematically check a specification for errors.
Part of the research and development was conducted within the
......@@ -17,6 +17,8 @@ parentID = groupID+".parent" // will be the same as the folder name
targetRepositories = ["http://cobra.cs.uni-duesseldorf.de/prob_dev_target/","http://download.eclipse.org/releases/indigo/"] // ps Repository with Target Definition File
workspacePath = "" // Relative Path to workspace directory e.g. your build is located in the folder workspace/buildscript please set relativePath to ".../"
apply from: 'tycho_build.gradle'
// Local tasks
......
......@@ -3,7 +3,10 @@ apply plugin: 'base'
def projects(int i){
return subprojects.name[i]
///
String subprojectsName = subprojects.name[i]
subprojectsName = subprojectsName.replace(workspacePath,'')
return subprojectsName
}
// returns the name of a subproject listed in the settings.gradle file
......@@ -85,7 +88,10 @@ subprojects {
if( it ==~ /Bundle-SymbolicName:.+/ ){
artifactId = it.substring(21)
artifactId = artifactId.replace(";singleton:=true",'')
artifactId = artifactId.replace(";",'')
artifactId = artifactId.replace(" ",'')
artifactId = artifactId.replace("singleton:=true",'')
}
/* Artifact ID is taken from Bundle-SymbolicName minus the
* 16 chars ';singleton:=true'
......@@ -98,7 +104,7 @@ subprojects {
println artifactId
println "\t"+versionNumber
def f = new File(artifactId+'/pom.xml')
def f = new File(workspacePath+artifactId+'/pom.xml')
f.delete()
f << start()+elder()+artifact(artifactId, versionNumber)+end()
/*
......@@ -146,7 +152,7 @@ subprojects {
println "\t"+versionNumber
def f = new File(artifactId+'/pom.xml')
def f = new File(workspacePath+artifactId+'/pom.xml')
f.delete()
f << feature(artifactId, versionNumber)
......@@ -167,11 +173,11 @@ clean {
task createParent() << {
// --------- define Parent --------- //
new File("${parentID}").mkdir()
new File(workspacePath+"${parentID}").mkdir()
versionNumber = '1.0.0.qualifier'
artifactId = parentId()
def f = new File(artifactId+'/pom.xml')
def f = new File(workspacePath+artifactId+'/pom.xml')
f.delete()
f << parentPom(artifactId)
for(int i = 0; i < targetRepositories.size(); i++){
......@@ -192,12 +198,12 @@ task createRepository() << {
// ------------ define Repository --------- //
new File("${repositoryName}").mkdir()
new File(workspacePath+"${repositoryName}").mkdir()
versionNumber = '1.0.0.qualifier'
artifactId = repositoryName
featureVersionNumber = '1.0.0.qualifier'
def f = new File(artifactId+'/category.xml')
def f = new File(workspacePath+artifactId+'/category.xml')
f.delete()
f << categoryHead()
for(int i = 0; i < features.size(); i++){
......@@ -215,7 +221,7 @@ task createRepository() << {
}
}
content.eachLine( printFileLine )
f << categoryFeatures(features[i], featureVersionNumber)
f << categoryFeatures(features[i].replace(workspacePath,''), featureVersionNumber)
}// for
for(int i = 0; i < features.size(); i++){
......@@ -226,7 +232,7 @@ task createRepository() << {
f << categoryEnd()
def pom = new File(artifactId+'/pom.xml')
def pom = new File(workspacePath+artifactId+'/pom.xml')
pom.delete()
pom << reposi()
}// end of repository definition
......@@ -237,7 +243,7 @@ task createPoms(dependsOn: [createParent, createRepository, subprojects.deploy])
task install(dependsOn: [createPoms] , type:Exec) {
description = "\tExecutes a 'mvn install' of the parent pom.xml and auto-generates Tycho Poms"
commandLine 'mvn', 'install', '-f', parentID+'/pom.xml'
commandLine 'mvn', 'install', '-f', workspacePath+parentID+'/pom.xml'
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment