Skip to content
Snippets Groups Projects
Commit 627770d4 authored by birkhoff's avatar birkhoff
Browse files

multiple Target Repositories

parent 7d627522
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,8 @@ and is now being used within Siemens."""] ] // label and descriptions of the fe ...@@ -21,6 +21,8 @@ and is now being used within Siemens."""] ] // label and descriptions of the fe
repositoryName = "de.prob.repository" // will be the folder name repositoryName = "de.prob.repository" // will be the folder name
parentID = "de.prob.parent" // will be the same as the folder name parentID = "de.prob.parent" // will be the same as the folder name
targetRepositories = ["http://cobra.cs.uni-duesseldorf.de/prob_dev_target/"] // ps Repository with Target Definition File
def download(address,target) { def download(address,target) {
def file = new FileOutputStream(target) def file = new FileOutputStream(target)
...@@ -147,7 +149,7 @@ subprojects { ...@@ -147,7 +149,7 @@ subprojects {
def f = new File(artifactId+'/pom.xml') def f = new File(artifactId+'/pom.xml')
f.delete() f.delete()
f << start()+elder()+repos()+artifact(artifactId, versionNumber)+end() f << start()+elder()+artifact(artifactId, versionNumber)+end()
/* /*
* old pom.xml files are deleted and replaced by new auto generated Tycho pom.xml files * old pom.xml files are deleted and replaced by new auto generated Tycho pom.xml files
*/ */
...@@ -221,6 +223,11 @@ task createParent() << { ...@@ -221,6 +223,11 @@ task createParent() << {
def f = new File(artifactId+'/pom.xml') def f = new File(artifactId+'/pom.xml')
f.delete() f.delete()
f << parentPom(artifactId) f << parentPom(artifactId)
for(int i = 0; i < targetRepositories.size(); i++){
f << repos(targetRepositories[i])
}
f << endRepos()
f << moduleStart()
for(int i = 0; i < numberOfProjects(); i++){ for(int i = 0; i < numberOfProjects(); i++){
f << module(projects(i)) f << module(projects(i))
} }
...@@ -318,24 +325,6 @@ task install(dependsOn: [createPoms, downloadCli] , type:Exec) { ...@@ -318,24 +325,6 @@ task install(dependsOn: [createPoms, downloadCli] , type:Exec) {
</parent> </parent>
"""} """}
def repos() {"""
<repositories>
<!-- configure p2 repository to resolve against -->
<repository>
<id>prob_target</id>
<layout>p2</layout>
<url>http://cobra.cs.uni-duesseldorf.de/prob_dev_target/</url>
</repository>
<repository>
<id>indigo</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/indigo/</url>
</repository>
</repositories>
"""}
def end() {""" def end() {"""
</project> </project>
...@@ -343,6 +332,9 @@ task install(dependsOn: [createPoms, downloadCli] , type:Exec) { ...@@ -343,6 +332,9 @@ task install(dependsOn: [createPoms, downloadCli] , type:Exec) {
// -- defining Parent Pom -- // // -- defining Parent Pom -- //
def parentPom(artifactId) { """<?xml version="1.0" encoding="UTF-8"?> def parentPom(artifactId) { """<?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"> <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> <modelVersion>4.0.0</modelVersion>
...@@ -358,22 +350,30 @@ def parentPom(artifactId) { """<?xml version="1.0" encoding="UTF-8"?> ...@@ -358,22 +350,30 @@ def parentPom(artifactId) { """<?xml version="1.0" encoding="UTF-8"?>
<tycho-version>0.14.1</tycho-version> <tycho-version>0.14.1</tycho-version>
</properties> </properties>
<repositories> <repositories>
<!-- configure p2 repository to resolve against --> <!-- configure p2 repository to resolve against -->
<repository> <repository>
<id>prob_target</id> <id>indigo</id>
<layout>p2</layout> <layout>p2</layout>
<url>http://cobra.cs.uni-duesseldorf.de/prob_dev_target/</url> <url>http://download.eclipse.org/releases/indigo/</url>
</repository> </repository>
"""}
def repos(String targetRepo) {"""
<repository> <repository>
<id>indigo</id> <id>prob_target</id>
<layout>p2</layout> <layout>p2</layout>
<url>http://download.eclipse.org/releases/indigo/</url> <url>${targetRepo}</url>
</repository> </repository>
"""}
def endRepos() {"""
</repositories> </repositories>
<build> <build>
...@@ -387,7 +387,9 @@ def parentPom(artifactId) { """<?xml version="1.0" encoding="UTF-8"?> ...@@ -387,7 +387,9 @@ def parentPom(artifactId) { """<?xml version="1.0" encoding="UTF-8"?>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
"""}
def moduleStart(){"""
<!-- the modules that should be built together --> <!-- the modules that should be built together -->
<modules> <modules>
"""} """}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment