Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
20 changed files
with
389 additions
and
335 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,129 @@ | ||
<?xml version="1.0"?> | ||
<project name="project"> | ||
|
||
<target name="getMajorMinorVersion"> | ||
<script language="javascript"> | ||
<![CDATA[ | ||
// getting the value | ||
buildnumber = project.getProperty("unqualifiedVersion"); | ||
index = buildnumber.lastIndexOf("."); | ||
counter = buildnumber.substring(0, index); | ||
project.setProperty("majorMinorVersion",counter); | ||
]]> | ||
</script> | ||
</target> | ||
|
||
<target name="test_getMajorMinor" depends="getMajorMinorVersion"> | ||
<echo message="majorMinorVersion: ${majorMinorVersion}" /> | ||
</target> | ||
|
||
<!-- | ||
site.label The name/title/label of the created composite site | ||
unqualifiedVersion The version without any qualifier replacement | ||
buildQualifier The build qualifier | ||
child.repository.path.prefix The path prefix to access the actual p2 repo from the | ||
child repo, e.g., if child repo is in /updates/1.0 and | ||
the p2 repo is in /releases/1.0.0.something then this property | ||
should be "../../releases/" | ||
child.repo An external repository to be added as a child | ||
--> | ||
<target name="compute.child.repository.data" depends="getMajorMinorVersion"> | ||
<property name="full.version" value="${unqualifiedVersion}.${buildQualifier}" /> | ||
|
||
<property name="site.composite.name" value="${site.label} ${majorMinorVersion}" /> | ||
<property name="main.site.composite.name" value="${site.label} All Versions" /> | ||
|
||
<!-- composite.base.dir The base directory for the local composite metadata, | ||
e.g., from Maven, ${project.build.directory} | ||
--> | ||
<property name="composite.base.dir" value="target"/> | ||
|
||
<property name="main.composite.repository.directory" location="${composite.base.dir}/composite-main" /> | ||
<property name="composite.repository.directory" location="${composite.base.dir}/composite-child" /> | ||
|
||
<property name="child.repository" value="${child.repository.path.prefix}${full.version}" /> | ||
</target> | ||
|
||
<target name="p2.composite.add" depends="compute.child.repository.data"> | ||
<add.composite.repository.internal | ||
composite.repository.location="${main.composite.repository.directory}" | ||
composite.repository.name="${main.site.composite.name}" | ||
composite.repository.child="${majorMinorVersion}" /> | ||
<add.composite.repository.internal | ||
composite.repository.location="${composite.repository.directory}" | ||
composite.repository.name="${site.composite.name}" | ||
composite.repository.child="${child.repository}" /> | ||
</target> | ||
|
||
<target name="p2.composite.add.external" depends="compute.child.repository.data"> | ||
<add.external.repository.internal | ||
composite.repository.location="${composite.repository.directory}" | ||
composite.repository.name="${site.composite.name}" | ||
composite.repository.child="${child.repo}" /> | ||
</target> | ||
|
||
<!-- = = = = = = = = = = = = = = = = = | ||
macrodef: add.composite.repository.internal | ||
= = = = = = = = = = = = = = = = = --> | ||
<macrodef name="add.composite.repository.internal"> | ||
<attribute name="composite.repository.location" /> | ||
<attribute name="composite.repository.name" /> | ||
<attribute name="composite.repository.child" /> | ||
<sequential> | ||
|
||
<echo message=" " /> | ||
<echo message="Composite repository : @{composite.repository.location}" /> | ||
<echo message="Composite name : @{composite.repository.name}" /> | ||
<echo message="Adding child repository : @{composite.repository.child}" /> | ||
|
||
<p2.composite.repository> | ||
<repository | ||
compressed="false" | ||
location="@{composite.repository.location}" | ||
name="@{composite.repository.name}" | ||
atomic="false" /> | ||
<add> | ||
<repository location="@{composite.repository.child}" /> | ||
</add> | ||
</p2.composite.repository> | ||
|
||
<echo file="@{composite.repository.location}/p2.index">version=1 | ||
metadata.repository.factory.order=compositeContent.xml,\! | ||
artifact.repository.factory.order=compositeArtifacts.xml,\! | ||
</echo> | ||
|
||
</sequential> | ||
</macrodef> | ||
|
||
<!-- = = = = = = = = = = = = = = = = = | ||
macrodef: add.external.repository.internal | ||
= = = = = = = = = = = = = = = = = --> | ||
<macrodef name="add.external.repository.internal"> | ||
<attribute name="composite.repository.location" /> | ||
<attribute name="composite.repository.name" /> | ||
<attribute name="composite.repository.child" /> | ||
<sequential> | ||
|
||
<echo message=" " /> | ||
<echo message="Composite repository : @{composite.repository.location}" /> | ||
<echo message="Composite name : @{composite.repository.name}" /> | ||
<echo message="Adding child repository : @{composite.repository.child}" /> | ||
|
||
<p2.composite.repository> | ||
<repository | ||
compressed="false" | ||
location="@{composite.repository.location}" | ||
name="@{composite.repository.name}" | ||
atomic="false" /> | ||
<add> | ||
<repository location="@{composite.repository.child}" /> | ||
</add> | ||
</p2.composite.repository> | ||
|
||
</sequential> | ||
</macrodef> | ||
|
||
|
||
</project> |
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.