Skip to content
Snippets Groups Projects
Commit 1d7009e3 authored by birkhoff's avatar birkhoff
Browse files

get ArtifactIds from Manifest file

parent 2bf012c7
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,10 @@ subprojects {
description = "\tGenerating the Tycho Poms. Please remember to add a '.qualifier' to the version numbers!"
versionNumber = 'Version Number Error:\tcheck Manifest for Bundle-Version Number and make sure to add a ".qualifier" to the version numbers!\n'
artifactId = 'Could not find Bundle-SymbolicName in Manifest.file'
/* -- In case of changed Manifest File in Eclipse:
*
* Version Numbers of the projects are collected via
......
apply plugin: 'base'
deploy <<{
content = new File("${project.name}/META-INF/MANIFEST.MF").getText("UTF-8")
printFileLine = {
if( it ==~ /Bundle-Version.+qualifier/ ){
versionNumber = it.substring(16) // possibile error: cuts off first 16 chars
/* Version Number is taken from Bundle-Version in Manifest.MF
* If there is no Bundle-Version or the versionnumber needs to
* be taken from a different key word, please change the
* regular expression and the substring above
*/
}
if( it ==~ /Bundle-SymbolicName:.+/ ){
artifactId = it.substring(21)
artifactId = artifactId.replace(";singleton:=true",'')
}
/* Artifact ID is taken from Bundle-SymbolicName minus the
* 16 chars ';singleton:=true'
*/
}
content.eachLine( printFileLine )
println artifactId
println "\t"+versionNumber
def f = new File(artifactId+'/pom.xml')
f.delete()
f << start()+elder()+repos()+artifact(artifactId, versionNumber)+end()
/*
* old pom.xml files are deleted and replaced by new auto generated Tycho pom.xml files
*/
}
/* -- In case of Error use old Build Script --
deploy <<{
......@@ -10,7 +58,7 @@ deploy <<{
* If there is no Bundle-Version or the versionnumber needs to
* be taken from a different key word, please change the
* regular expression and the substring above
*/
*//*
}
}
......@@ -26,4 +74,4 @@ deploy <<{
f.delete()
f << start()+elder()+repos()+artifact(artifactId, versionNumber)+end()
}
\ No newline at end of file
} */
\ No newline at end of file
apply plugin: 'base'
deploy <<{
content = new File("${project.name}/META-INF/MANIFEST.MF").getText("UTF-8")
printFileLine = {
if( it ==~ /Bundle-Version.+qualifier/ ){
versionNumber = it.substring(16) // possibile error: cuts off first 16 chars
/* Version Number is taken from Bundle-Version in Manifest.MF
* If there is no Bundle-Version or the versionnumber needs to
* be taken from a different key word, please change the
* regular expression and the substring above
*/
}
if( it ==~ /Bundle-SymbolicName:.+/ ){
artifactId = it.substring(21)
artifactId = artifactId.replace(";singleton:=true",'')
}
/* Artifact ID is taken from Bundle-SymbolicName minus the
* 16 chars ';singleton:=true'
*/
}
content.eachLine( printFileLine )
println artifactId
println "\t"+versionNumber
def f = new File(artifactId+'/pom.xml')
f.delete()
f << start()+elder()+repos()+artifact(artifactId, versionNumber)+end()
/*
* old pom.xml files are deleted and replaced by new auto generated Tycho pom.xml files
*/
}
/*
deploy <<{
content = new File("de.bmotionstudio.rodin/META-INF/MANIFEST.MF").getText("UTF-8")
......@@ -10,7 +55,7 @@ deploy <<{
* If there is no Bundle-Version or the versionnumber needs to
* be taken from a different key word, please change the
* regular expression and the substring above
*/
*//*
}
}
......@@ -28,3 +73,5 @@ deploy <<{
f << start()+elder()+repos()+artifact(artifactId, versionNumber)+end()
}
*/
\ No newline at end of file
......@@ -2,10 +2,12 @@ apply plugin: 'base'
deploy <<{
content = new File("${project.name}/META-INF/MANIFEST.MF").getText("UTF-8")
content = new File("de.prob.core/META-INF/MANIFEST.MF").getText("UTF-8")
printFileLine = { if( it ==~ /Bundle-Version.+qualifier/ ){
printFileLine = {
if( it ==~ /Bundle-Version.+qualifier/ ){
versionNumber = it.substring(16) // possibile error: cuts off first 16 chars
/* Version Number is taken from Bundle-Version in Manifest.MF
......@@ -15,13 +17,19 @@ deploy <<{
*/
}
if( it ==~ /Bundle-SymbolicName:.+/ ){
artifactId = it.substring(21)
artifactId = artifactId.replace(";singleton:=true",'')
}
/* Artifact ID is taken from Bundle-SymbolicName minus the
* 16 chars ';singleton:=true'
*/
}
content.eachLine( printFileLine )
artifactId = 'de.prob.core'
println artifactId
println "\t"+versionNumber
......
......@@ -67,9 +67,6 @@ deploy <<{
versionNumber = '1.0.0.qualifier'
artifactId = parentId()
println projects(2) + numberOfProjects() + projects(1)
def f = new File(artifactId+'/pom.xml')
f.delete()
f << parentPom(artifactId)
......
apply plugin: 'base'
deploy <<{
content = new File("${project.name}/META-INF/MANIFEST.MF").getText("UTF-8")
printFileLine = {
if( it ==~ /Bundle-Version.+qualifier/ ){
versionNumber = it.substring(16) // possibile error: cuts off first 16 chars
/* Version Number is taken from Bundle-Version in Manifest.MF
* If there is no Bundle-Version or the versionnumber needs to
* be taken from a different key word, please change the
* regular expression and the substring above
*/
}
if( it ==~ /Bundle-SymbolicName:.+/ ){
artifactId = it.substring(21)
artifactId = artifactId.replace(";singleton:=true",'')
}
/* Artifact ID is taken from Bundle-SymbolicName minus the
* 16 chars ';singleton:=true'
*/
}
content.eachLine( printFileLine )
println artifactId
println "\t"+versionNumber
def f = new File(artifactId+'/pom.xml')
f.delete()
f << start()+elder()+repos()+artifact(artifactId, versionNumber)+end()
/*
* old pom.xml files are deleted and replaced by new auto generated Tycho pom.xml files
*/
}
/*
deploy <<{
......@@ -11,7 +57,7 @@ deploy <<{
* If there is no Bundle-Version or the versionnumber needs to
* be taken from a different key word, please change the
* regular expression and the substring above
*/
*//*
}
}
......@@ -27,4 +73,4 @@ deploy <<{
f.delete()
f << start()+elder()+repos()+artifact(artifactId, versionNumber)+end()
}
\ No newline at end of file
}*/
\ No newline at end of file
......@@ -21,7 +21,7 @@ def reposi(artifact) { """
deploy <<{
versionNumber = '1.0.0.qualifier'
artifactId = 'de.prob.repository'
artifactId = project.name
println artifactId
......
apply plugin: 'base'
deploy <<{
content = new File("${project.name}/META-INF/MANIFEST.MF").getText("UTF-8")
printFileLine = {
if( it ==~ /Bundle-Version.+qualifier/ ){
versionNumber = it.substring(16) // possibile error: cuts off first 16 chars
/* Version Number is taken from Bundle-Version in Manifest.MF
* If there is no Bundle-Version or the versionnumber needs to
* be taken from a different key word, please change the
* regular expression and the substring above
*/
}
if( it ==~ /Bundle-SymbolicName:.+/ ){
artifactId = it.substring(21)
artifactId = artifactId.replace(";singleton:=true",'')
}
/* Artifact ID is taken from Bundle-SymbolicName minus the
* 16 chars ';singleton:=true'
*/
}
content.eachLine( printFileLine )
println artifactId
println "\t"+versionNumber
def f = new File(artifactId+'/pom.xml')
f.delete()
f << start()+elder()+repos()+artifact(artifactId, versionNumber)+end()
/*
* old pom.xml files are deleted and replaced by new auto generated Tycho pom.xml files
*/
}
/*
deploy <<{
content = new File("de.prob.ui/META-INF/MANIFEST.MF").getText("UTF-8")
......@@ -10,7 +55,7 @@ deploy <<{
* If there is no Bundle-Version or the versionnumber needs to
* be taken from a different key word, please change the
* regular expression and the substring above
*/
*//*
}
}
......@@ -27,3 +72,4 @@ deploy <<{
f << start()+elder()+repos()+artifact(artifactId, versionNumber)+end()
}
*/
\ No newline at end of file
......@@ -18,9 +18,13 @@ def feature(artifactId, versionNumber) { """
deploy <<{
content = new File("de.prob2.feature/feature.xml").getText("UTF-8")
boolean idfound = false
printFileLine = { if( it ==~ /.+version.+qualifier.+/ ){
content = new File("${project.name}/feature.xml").getText("UTF-8")
printFileLine = {
if( it ==~ /.+version.+qualifier.+/ ){
versionNumber = it.substring(15,it.size()-1)
// possibile error: cuts off first 15 chars and leaves out last '"'
......@@ -30,13 +34,20 @@ deploy <<{
*/
}
if( it ==~ /.+id=".+/ && idfound == false ){
artifactId = it.substring(10,it.length()-1)
idfound = true
}
/* Artifact ID is taken from Bundle-SymbolicName minus the
* 16 chars ';singleton:=true'
*/
}
content.eachLine( printFileLine )
artifactId = 'de.prob2.feature'
println artifactId
println "\t"+versionNumber
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment