Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ProB Rodin Plugin
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
ProB Rodin Plugin
Commits
fcd6272c
Commit
fcd6272c
authored
13 years ago
by
birkhoff
Browse files
Options
Downloads
Patches
Plain Diff
Auto Generation of modules in parent.pom
parent
bf914255
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
build.gradle
+23
-3
23 additions, 3 deletions
build.gradle
de.prob.parent/build.gradle
+91
-12
91 additions, 12 deletions
de.prob.parent/build.gradle
with
114 additions
and
15 deletions
build.gradle
+
23
−
3
View file @
fcd6272c
...
...
@@ -60,6 +60,13 @@ def download(address,target) {
out
.
close
()
}
def
projects
(
int
i
){
return
subprojects
.
name
[
i
]
}
def
numberOfProjects
(){
return
subprojects
.
name
.
size
()
}
task
downloadCli
<<
{
dir
=
'de.prob.core/prob/'
...
...
@@ -83,14 +90,17 @@ task downloadCli << {
}
def
parentId
(){
return
"de.prob.parent"
}
subprojects
{
apply
plugin:
'base'
task
deploy
(){
description
=
"\tGenerating the Tycho Poms"
description
=
"\tGenerating the Tycho Poms
. Please remember to add a '.qualifier' to the version numbers!
"
versionNumber
=
'Version Number Error:
check Manifest for Bundle-Version Number'
versionNumber
=
'Version Number Error:
\t
check Manifest for Bundle-Version Number
and make sure to add a ".qualifier" to the version numbers!\n
'
/* -- In case of changed Manifest File in Eclipse:
*
* Version Numbers of the projects are collected via
...
...
@@ -119,6 +129,16 @@ clean {
}
task
install
(
dependsOn:
[
createPoms
,
downloadCli
]
,
type:
Exec
)
{
description
=
"\tExecutes a 'mvn install' of the parent pom.xml and auto-generates Tycho Poms"
commandLine
'mvn'
,
'install'
,
'-f'
,
'de.prob.parent/pom.xml'
}
// Build Script can be executed via gradle install
// Pom Generation can be executed via gradle deploy
...
...
This diff is collapsed.
Click to expand it.
de.prob.parent/build.gradle
+
91
−
12
View file @
fcd6272c
def
parentPom
()
{
"""
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">
<modelVersion>4.0.0</modelVersion>
<groupId>de.prob</groupId>
<artifactId>
de.prob.parent
</artifactId>
<artifactId>
${artifactId}
</artifactId>
<version>1.0.0.qualifier</version>
<packaging>pom</packaging>
...
...
@@ -46,29 +46,108 @@
<!-- the modules that should be built together -->
<modules>
<module>../de.prob.core</module>
"""
}
<module>../de.bmotionstudio.gef.editor</module>
<module>../de.bmotionstudio.rodin</module>
<module>../de.prob.ui</module>
<module>../de.prob.plugin</module>
<!-- <module>../de.prob.feature</module> -->
<module>../de.prob2.feature</module>
<module>../de.prob.repository</module>
//for(int i = 0; i < numberOfProjects(); i++)
def
module
(
int
i
){
if
(
projects
(
i
)!=
parentId
()){
""" <module>../${projects(i)}</module>
"""
}
else
{
""""""
}
}
def
endParent
()
{
"""
</modules>
</project>
"""
}
deploy
<<{
versionNumber
=
'1.0.0.qualifier'
artifactId
=
'de.prob.parent'
println
projects
(
2
)
+
numberOfProjects
()
+
projects
(
1
)
def
f
=
new
File
(
artifactId
+
'/pom.xml'
)
f
.
delete
()
f
<<
parentPom
()
f
<<
parentPom
(
artifactId
)
for
(
int
i
=
0
;
i
<
numberOfProjects
();
i
++){
f
<<
module
(
i
)
}
f
<<
endParent
()
}
/*
!!!!! In case of problems the old parernt Pom Defenintion: !!!!
def parentPom() { """
<?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>de.prob</groupId>
<artifactId>de.prob.parent</artifactId>
<version>1.0.0.qualifier</version>
<packaging>pom</packaging>
<!-- this is the parent POM from which all modules inherit common settings -->
<properties>
<tycho-version>0.14.1</tycho-version>
</properties>
<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>
<build>
<plugins>
<plugin>
<!-- enable tycho build extension -->
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.14.1</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<!-- the modules that should be built together -->
<modules>
<module>../de.prob.core</module>
<module>../de.bmotionstudio.gef.editor</module>
<module>../de.bmotionstudio.rodin</module>
<module>../de.prob.ui</module>
<module>../de.prob.plugin</module>
<!-- <module>../de.prob.feature</module> -->
<module>../de.prob2.feature</module>
<module>../de.prob.repository</module>
</modules>
</project>
"""}
*/
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment