Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Regenerate on only new version of Scala IDE

If only a version of Scala IDE changes, the ecosystem is correctly regenerated.
  • Loading branch information...
commit a61d3d8fbc0ff13ce0c70835ba27c2b9bc497f28 1 parent 083f838
@skyluc skyluc authored
View
35 src/main/scala/org/scalaide/buildtools/EcosystemBuild.scala
@@ -1,5 +1,7 @@
package org.scalaide.buildtools
+import org.osgi.framework.Version
+
object EcosystemBuild {
import Ecosystem._
@@ -13,40 +15,51 @@ object EcosystemBuild {
val baseRepo = Repositories(ecosystemConf.base)
val baseScalaIDEVersions = findScalaIDEVersions(baseRepo, existingAddOns, availableAddOns, siteRepo, featureConfs)
val nextBaseRepo = Repositories(ecosystemConf.nextBase)
- val nextScalaIDEVersions = findScalaIDEVersions(nextBaseRepo, nextExistingAddOns, availableAddOns, nextSiteRepo, featureConfs)
+ val nextBaseScalaIDEVersions = findScalaIDEVersions(nextBaseRepo, nextExistingAddOns, availableAddOns, nextSiteRepo, featureConfs)
+ val nextSiteScalaIDEVersions = siteRepo.findIU(ScalaIDEFeatureIdOsgi)
EcosystemBuild(
ecosystemConf.id,
baseRepo,
baseScalaIDEVersions,
nextBaseRepo,
- nextScalaIDEVersions,
+ nextBaseScalaIDEVersions,
siteRepo,
nextSiteRepo,
existingAddOns,
- nextExistingAddOns)
+ nextExistingAddOns,
+ shouldBeRegenerated(baseScalaIDEVersions, siteRepo.findIU(ScalaIDEFeatureIdOsgi)),
+ shouldBeRegenerated(nextBaseScalaIDEVersions, nextSiteRepo.findIU(ScalaIDEFeatureIdOsgi)))
}
private def findScalaIDEVersions(baseRepo: P2Repository, existingAddOns: Map[PluginDescriptor, Seq[AddOn]], availableAddOns: Map[PluginDescriptor, Seq[AddOn]], siteRepo: P2Repository, featureConfs: Seq[PluginDescriptor]): Seq[ScalaIDEVersion] = {
baseRepo.findIU(ScalaIDEFeatureIdOsgi).toSeq.map(ScalaIDEVersion(_, baseRepo, existingAddOns, availableAddOns, siteRepo))
}
+ private def shouldBeRegenerated(baseScalaIDEVersions: Seq[ScalaIDEVersion], siteScalaIDEVersions: Set[InstallableUnit]): Boolean = {
+ if (!baseScalaIDEVersions.forall(_.associatedAvailableAddOns.isEmpty)) {
+ true
+ } else {
+ val baseVersions: Set[Version] = baseScalaIDEVersions.map(_.version).toSet
+ val siteVersions: Set[Version] = siteScalaIDEVersions.map(_.version).toSet
+ baseVersions != siteVersions
+ }
+ }
+
}
case class EcosystemBuild(
id: String,
baseRepo: P2Repository,
baseScalaIDEVersions: Seq[ScalaIDEVersion],
- nextRepo: P2Repository,
- nextScalaIDEVersions: Seq[ScalaIDEVersion],
+ nextBaseRepo: P2Repository,
+ nextBaseScalaIDEVersions: Seq[ScalaIDEVersion],
siteRepo: P2Repository,
nextSiteRepo: P2Repository,
existingAddOns: Map[PluginDescriptor, Seq[AddOn]],
- nextExistingAddOns: Map[PluginDescriptor, Seq[AddOn]]) {
-
- val regenerateEcosystem: Boolean = !baseScalaIDEVersions.forall(_.associatedAvailableAddOns.isEmpty)
-
- val regenerateNextEcosystem: Boolean = !nextScalaIDEVersions.forall(_.associatedAvailableAddOns.isEmpty)
-
+ nextExistingAddOns: Map[PluginDescriptor, Seq[AddOn]],
+ val regenerateEcosystem: Boolean,
+ val regenerateNextEcosystem: Boolean) {
+
val zippedVersion: Option[ScalaIDEVersion] = baseScalaIDEVersions.sortBy(_.version).lastOption
}
View
2  src/main/scala/org/scalaide/buildtools/EcosystemBuildsMavenProjects.scala
@@ -34,7 +34,7 @@ object EcosystemBuildsMavenProjects {
}
val nextFolder = if (ecosystemBuild.regenerateNextEcosystem) {
- generateEcosystemProject(ecosystemBuild.nextScalaIDEVersions, "%s-next".format(ecosystemBuild.id), ecosystemBuild.nextRepo, buildFolder, None)
+ generateEcosystemProject(ecosystemBuild.nextBaseScalaIDEVersions, "%s-next".format(ecosystemBuild.id), ecosystemBuild.nextBaseRepo, buildFolder, None)
} else {
Nil
}
View
6 src/main/scala/org/scalaide/buildtools/EcosystemBuildsReport.scala
@@ -77,7 +77,7 @@ h4 {margin: 0.2em 0 0 0; margin-right: 3em;}
<div class="currentNextAvailableScalaIDEVersions">
<h2>Available Scala IDE versions:</h2>
{ availableScalaIDEVersions(build.baseRepo, build.baseScalaIDEVersions) }
- { availableScalaIDEVersions(build.nextRepo, build.nextScalaIDEVersions) }
+ { availableScalaIDEVersions(build.nextBaseRepo, build.nextBaseScalaIDEVersions) }
</div>
<div class="currentNextExistingAddOns">
<h2>Existing add-ons</h2>
@@ -89,14 +89,14 @@ h4 {margin: 0.2em 0 0 0; margin-right: 3em;}
{ build.baseScalaIDEVersions.map(s => scalaIDEVersionWithAddOns(s, build.zippedVersion.exists(_ == s))) }
</div>
{
- if (build.nextScalaIDEVersions.isEmpty)
+ if (build.nextBaseScalaIDEVersions.isEmpty)
<div class="nextEcosystem notAvailable">
<h2>Next ecosystem</h2>
</div>
else
<div class="nextEcosystem">
<h2>Next ecosystem { rebuiltComment(build.regenerateNextEcosystem) }</h2>
- { build.nextScalaIDEVersions.map(scalaIDEVersionWithAddOns(_, false)) }
+ { build.nextBaseScalaIDEVersions.map(scalaIDEVersionWithAddOns(_, false)) }
</div>
}
</div>
View
215 src/main/scala/org/scalaide/buildtools/GenerateEcosystemBuildsTake1.scala
@@ -1,215 +0,0 @@
-package org.scalaide.buildtools
-
-import java.io.File
-import scala.annotation.tailrec
-import scala.collection.mutable.HashMap
-import java.net.URL
-import org.osgi.framework.Version
-import scala.collection.immutable.TreeSet
-import dispatch.Http
-
-object GenerateEcosystemBuildsTake1 {
- import Ecosystem._
-
- def main(args: Array[String]) {
- // parse arguments
-
- val rootFolder = args.collectFirst {
- case RootOption(root) =>
- root
- }.getOrElse(System.getProperty("user.dir"))
-
- new GenerateEcosystemBuildsTake1(rootFolder)()
- }
-
-}
-
-class GenerateEcosystemBuildsTake1(rootFolder: String) {
- import Ecosystem._
-
- def apply(): Either[String, AnyRef] = {
-
- val ecosystems = EcosystemsDescriptor.load(new File(rootFolder, EcosystemConfigFile)).ecosystems
- val requestedFeatures = PluginDescriptor.loadAll(new File(rootFolder, "features")).flatMap(_ match {
- case Right(conf) =>
- Some(conf)
- case Left(_) =>
- None
- })
-
- val res = for {
- availableFeatures <- findFeatures(requestedFeatures.toList).right
- ecosystemToScalaIDEToAvailableFeatures <- getAvailableScalaIDEs(ecosystems, requestedFeatures.toList, availableFeatures).right
- } yield MavenProject2.generateEcosystemsProjects(ecosystemToScalaIDEToAvailableFeatures, new File(rootFolder, "target/builds"))
-
- // need to stop Dispatch in any cases
- Http.shutdown()
- res
-
- }
-
- private def getAvailableScalaIDEs(ecosystems: List[EcosystemDescriptor], requestedFeatures: List[PluginDescriptor], availableFeatures: List[FeatureDefinition]): Either[String, Map[EcosystemDescriptor, Map[ScalaIDEDefinition, Features]]] = {
- @tailrec
- def loop(repositories: List[EcosystemDescriptor], definitions: Map[EcosystemDescriptor, Map[ScalaIDEDefinition, Features]]): Either[String, Map[EcosystemDescriptor, Map[ScalaIDEDefinition, Features]]] = {
- repositories match {
- case Nil =>
- Right(definitions)
- case head :: tail =>
- loop(tail, definitions + (head -> findScalaIDEsAndResolvedAvailableFeatures(head, requestedFeatures, availableFeatures)))
- }
- }
- loop(ecosystems, Map())
- }
-
- private def findScalaIDEsAndResolvedAvailableFeatures(ecosystem: EcosystemDescriptor, requestedFeatures: List[PluginDescriptor], availableFeatures: List[FeatureDefinition]): Map[ScalaIDEDefinition, Features] = {
- val repository = Repositories(ecosystem.site)
- val baseRepository = Repositories(ecosystem.base)
- findScalaIDEsAndResolvedAvailableFeatures(repository, baseRepository, requestedFeatures, availableFeatures)
- }
-
- private def findScalaIDEsAndResolvedAvailableFeatures(repository: P2Repository, baseRepository: P2Repository, requestedFeatures: List[PluginDescriptor], availableFeatures: List[FeatureDefinition]): Map[ScalaIDEDefinition, Features] = {
- val allAvailableFeatures = mergeFeatureList(findExistingFeatures(requestedFeatures, repository), availableFeatures)
-
- baseRepository.findIU(ScalaIDEFeatureIdOsgi).foldLeft(Map[ScalaIDEDefinition, Features]())((m, ui) =>
- // TODO: might be a nice place to check versions
- m + (ScalaIDEDefinition(ui, baseRepository) -> filterFeaturesFor(ui, allAvailableFeatures, repository)))
- }
-
- private def filterFeaturesFor(scalaIDE: InstallableUnit, availableFeatures: List[FeatureDefinition], baseRepository: P2Repository): Features = {
- val lists = availableFeatures.filter(f => ScalaIDEDefinition.matches(scalaIDE.version, f.sdtFeatureRange.range)).groupBy(_.details.featureId).map(t => TreeSet(t._2: _*)(FeatureDefinition.DescendingOrdering).head).toList.partition(_.repository == baseRepository)
- Features(lists._2, lists._1)
- }
-
- private def findFeatures(requestedFeatures: List[PluginDescriptor]): Either[String, List[FeatureDefinition]] = {
- Right(requestedFeatures.flatMap(findFeatures(_)))
- }
-
- private def findFeatures(requestedFeature: PluginDescriptor): List[FeatureDefinition] = {
- requestedFeature.updateSites.flatMap { location =>
- findFeatures(requestedFeature, Repositories(location))
- }
- }
-
- private def findFeatures(feature: PluginDescriptor, repository: P2Repository): List[FeatureDefinition] = {
- repository.findIU(feature.featureId + FeatureSuffix).toList.map(FeatureDefinition(feature, _, repository))
- }
-
- private def mergeFeatureList(base: List[FeatureDefinition], toMerge: List[FeatureDefinition]): List[FeatureDefinition] = {
-
- def loop(toProcess: List[FeatureDefinition]): List[FeatureDefinition] = {
- toProcess match {
- case Nil =>
- base
- case head :: tail =>
- if (base.exists(f => f.details == head.details && f.version == head.version)) {
- loop(tail)
- } else {
- loop(tail) :+ head
- }
- }
- }
- val res = loop(toMerge)
- res
- }
-
- private def findExistingFeatures(requestedFeatures: List[PluginDescriptor], repository: P2Repository): List[FeatureDefinition] = {
- requestedFeatures.flatMap(findFeatures(_, repository))
- }
-
- private def findAssociatedFeatures() {
-
- }
-
-}
-
-case class ScalaIDEDefinition(
- sdtFeatureVersion: Version,
- sdtCoreVersion: Option[DependencyUnit],
- scalaLibraryVersion: Option[DependencyUnit],
- scalaCompilerVersion: Option[DependencyUnit], repository: P2Repository)
-
-object ScalaIDEDefinition {
- import Ecosystem._
-
- private val RangeRegex = "\\[([^,]*),([^\\]]*)\\]".r
-
- def apply(feature: InstallableUnit, repository: P2Repository): ScalaIDEDefinition = {
-
- val dependencies = allDependencies(feature, repository)
-
- val sdtCore = dependencies.find(_.id == ScalaIDEId)
- val scalaLibrary = dependencies.find(_.id == ScalaLibraryId)
- val scalaCompiler = dependencies.find(_.id == ScalaCompilerId)
-
- new ScalaIDEDefinition(feature.version, sdtCore, scalaLibrary, scalaCompiler, repository)
- }
-
- def allDependencies(iu: InstallableUnit, repository: P2Repository): List[DependencyUnit] = {
- iu.dependencies ++ iu.dependencies.flatMap(allDependencies(_, repository))
- }
-
- def allDependencies(du: DependencyUnit, repository: P2Repository): List[DependencyUnit] = {
- repository.findIU(du.id).toList.filter(iu => matches(iu.version, du.range)) match {
- case Nil =>
- // not part of this repository, fine
- Nil
- case List(iu) =>
- // this is the one we are looking for
- val dep = allDependencies(iu, repository)
- dep
- case _ =>
- // more than one?
- Nil // TODO: better return value?
- }
- }
-
- def matches(version: Version, range: String): Boolean = {
- range match {
- case RangeRegex(low, high) if (low == high) =>
- // we care only about strict versions so far
- // TODO: may need to improve that
- version.equals(new Version(low))
- case _ =>
- false
- }
- }
-}
-
-case class FeatureDefinition(
- details: PluginDescriptor,
- version: Version,
- sdtFeatureRange: DependencyUnit,
- sdtCoreRange: DependencyUnit,
- scalaLibraryRange: DependencyUnit,
- scalaCompilerRange: DependencyUnit,
- repository: P2Repository)
-
-object FeatureDefinition {
- import Ecosystem._
-
- def apply(details: PluginDescriptor, iu: InstallableUnit, repository: P2Repository): FeatureDefinition = {
- val dependencies = ScalaIDEDefinition.allDependencies(iu, repository)
-
- val sdtCore = dependencies.find(_.id == ScalaIDEId)
- val scalaLibrary = dependencies.find(_.id == ScalaLibraryId)
- val scalaCompiler = dependencies.find(_.id == ScalaCompilerId)
- val sdtFeature = dependencies.find(_.id == ScalaIDEFeatureIdOsgi)
-
- // TODO: add support for source features
-
- // TODO: need to handle error cases, and check versions ...
-
- new FeatureDefinition(details, iu.version, sdtFeature.get, sdtCore.get, scalaLibrary.get, scalaCompiler.get, repository)
- }
-
- implicit object DescendingOrdering extends Ordering[FeatureDefinition] {
- override def compare(x: FeatureDefinition, y: FeatureDefinition): Int = {
- val diffId = x.details.featureId.compareTo(y.details.featureId)
- if (diffId == 0) -1 * x.version.compareTo(y.version) // same bundle name, compare versions
- else diffId
- }
- }
-
-}
-
-case class Features(available: List[FeatureDefinition], existing: List[FeatureDefinition])
View
285 src/main/scala/org/scalaide/buildtools/MavenProject2.scala
@@ -1,285 +0,0 @@
-package org.scalaide.buildtools
-
-import java.io.File
-import java.net.URL
-import scala.xml.Elem
-import scala.xml.XML
-import scala.collection.immutable.TreeSet
-
-object MavenProject2 {
-
- val artifactIdSuffix = Iterator.from(1)
-
- def generateEcosystemsProjects(ecosystemToScalaIDEToAvailableFeatures: Map[EcosystemDescriptor, Map[ScalaIDEDefinition, Features]], baseFolder: File): String = {
-
- println(ecosystemToScalaIDEToAvailableFeatures)
-
- if (baseFolder.exists()) {
- FileUtils.deleteFull(baseFolder)
- }
- baseFolder.mkdirs()
-
- val ecosystemFolders = ecosystemToScalaIDEToAvailableFeatures.flatMap(e => generateEcosystemProject(e._1, e._2, baseFolder)).toSeq
-
- if (ecosystemFolders isEmpty) {
- "Nothing to do"
- } else {
- FileUtils.saveXml(new File(baseFolder, "pom.xml"), createTopPomXml(ecosystemFolders))
-
- "OK"
- }
- }
-
- def generateEcosystemProject(ecosystem: EcosystemDescriptor, scalaIDEToAvailableFeatures: Map[ScalaIDEDefinition, Features], baseFolder: File): Option[File] = {
- // check if it makes sense to regenerate the ecosystem
- if (hasNewContent(ecosystem, scalaIDEToAvailableFeatures)) {
-
- val ecosystemFolder = new File(baseFolder, ecosystem.id)
- ecosystemFolder.mkdir()
-
- val artifactId = "ecosystem.%s".format(ecosystem.id)
-
- val featureFolders: Seq[File] = scalaIDEToAvailableFeatures.flatMap(s => generateScalaIDEProjects(s._1, s._2, artifactId, ecosystemFolder)).toSeq
- FileUtils.saveXml(new File(ecosystemFolder, "pom.xml"), createEcosystemPomXml(artifactId, ecosystem.base, ecosystemFolder, featureFolders))
-
- Some(ecosystemFolder)
-
- } else {
- None
- }
- }
-
- private def hasNewContent(ecosystem: EcosystemDescriptor, scalaIDEToAvailableFeatures: Map[ScalaIDEDefinition, Features]): Boolean = {
-
- // at this point, the sites exist
- val siteRepo = Repositories(ecosystem.site)
- val stagingRepo = Repositories(ecosystem.base)
-
- existsMissing(stagingRepo.uis, siteRepo.uis) || existsMissing(scalaIDEToAvailableFeatures)
- }
-
- /**
- * Check if all content of the staging site is already part of the public site.
- * Returns <code>true</code> if some are missing, <code>false</code> otherwise.
- */
- private def existsMissing(stagingUIs: Map[String, TreeSet[InstallableUnit]], siteUIs: Map[String, TreeSet[InstallableUnit]]): Boolean = {
- stagingUIs.exists((stagingFeature) => {
- siteUIs.get(stagingFeature._1) match {
- case Some(siteFeatureIUs) =>
- // the list of versions is different
- stagingFeature._2.map(_.version) != siteFeatureIUs.map(_.version)
- case None =>
- // UI defined in staging, but not in site
- true
- }
- })
- }
-
- /**
- * Check if it exists any add-on version to add or refresh.
- */
- private def existsMissing(scalaIDEToAvailableFeatures: Map[ScalaIDEDefinition, Features]): Boolean = {
- scalaIDEToAvailableFeatures.exists(s => {
- !s._2.available.isEmpty
- })
- }
-
- def generateScalaIDEProjects(scalaIDE: ScalaIDEDefinition, features: Features, parentId: String, baseFolder: File): Seq[File] = {
- val scalaIDEFolder = new File(baseFolder, scalaIDE.sdtFeatureVersion.toString())
- scalaIDEFolder.mkdir()
-
- (features.available ::: features.existing).map(f => generateFeatureProject(f, parentId, scalaIDE.repository, scalaIDEFolder))
- }
-
- def generateFeatureProject(feature: FeatureDefinition, parentId: String, scalaIDERepository: P2Repository, baseFolder: File): File = {
- val featureFolder = new File(baseFolder, feature.details.featureId)
- featureFolder.mkdir()
-
- FileUtils.saveXml(new File(featureFolder, "pom.xml"), createFeaturePomXml(feature.repository, scalaIDERepository, parentId))
- FileUtils.saveXml(new File(featureFolder, "site.xml"), createSiteXml(feature))
-
- featureFolder
- }
-
- def createTopPomXml(ecosystemFolders: Seq[File]) = {
- <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
- <groupId>org.scalaide</groupId>
- <artifactId>ecosystem.build</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- <description>Build a repository containing multiple versions</description>
- <packaging>pom</packaging>
- <properties>
- <encoding>UTF-8</encoding>
- <tycho.version>0.15.0</tycho.version>
- </properties>
- <modules>
- {
- ecosystemFolders.map { f =>
- <module>{ f.getName }</module>
- }
- }
- </modules>
- </project>
- }
-
- def createEcosystemPomXml(id: String, baseSite: URL, ecosystemFolder: File, featureFolders: Seq[File]) = {
- <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
- <parent>
- <groupId>org.scalaide</groupId>
- <artifactId>ecosystem.build</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- </parent>
- <artifactId>{ id }</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- <description>Build a repository containing multiple versions</description>
- <packaging>pom</packaging>
- <properties>
- <encoding>UTF-8</encoding>
- <tycho.version>0.15.0</tycho.version>
- </properties>
- <profiles>
- <profile>
- <id>package</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-p2-extras-plugin</artifactId>
- <version>${{tycho.version}}</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>mirror</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <source>
- <repository>
- <url>{ baseSite }</url>
- <layout>p2</layout>
- </repository>
- {
- featureFolders.map { f =>
- <repository>
- <url>{ new File(f, "target/site").toURI() }</url>
- <layout>p2</layout>
- </repository>
-
- }
- }
- </source>
- <destination>${{project.build.directory}}/site</destination>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>build</id>
- <modules>
- {
- featureFolders.map { f =>
- <module>{ "%s/%s".format(f.getParentFile.getName, f.getName) }</module>
- }
- }
- </modules>
- </profile>
- </profiles>
- </project>
- }
-
- def createFeaturePomXml(featureRepository: P2Repository, scalaIDERepository: P2Repository, parentId: String) = {
- // TODO: support for non-indigo build
- <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
- <parent>
- <groupId>org.scalaide</groupId>
- <artifactId>{ parentId }</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
- <artifactId>org.scala-ide.ecosystem.generated{ artifactIdSuffix.next }</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- <description>Build project for the scalatest support in Scala IDE</description>
- <packaging>eclipse-update-site</packaging>
- <properties>
- <encoding>UTF-8</encoding>
- <tycho.version>0.15.0</tycho.version>
- <!-- p2 repositories location -->
- <repo.eclipse.indigo>http://download.eclipse.org/releases/indigo/</repo.eclipse.indigo>
- <!-- dependencies repos -->
- <eclipse.codename>indigo</eclipse.codename>
- </properties>
- <repositories>
- <repository>
- <id>eclipse.indigo</id>
- <name>Eclipse p2 repository</name>
- <layout>p2</layout>
- <url>http://download.eclipse.org/releases/indigo/</url>
- </repository>
- <repository>
- <id>scalaide.repo</id>
- <layout>p2</layout>
- <url>{ scalaIDERepository.location }</url>
- </repository>
- <repository>
- <id>feature.repo</id>
- <layout>p2</layout>
- <url>{ featureRepository.location }</url>
- </repository>
- </repositories>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${{tycho.version}}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-packaging-plugin</artifactId>
- <version>${{tycho.version}}</version>
- <configuration>
- <archiveSite>true</archiveSite>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>
- }
-
- private def createSiteXml(feature: FeatureDefinition) = {
- <site>
- { featureXml(feature) }
- <category-def name="stable" label="Scala IDE plugins"/>
- <category-def name="incubation" label="Scala IDE plugins (incubation)"/>
- <category-def name="source" label="Sources"/>
- </site>
- }
-
- private def featureXml(feature: FeatureDefinition): List[Elem] =
- // TODO: fix category
- // TODO: fix sourceFeatureId, should be option
- List(featureXml(feature.details.featureId, feature.version.toString, "incubation")) :+ featureXml(feature.details.sourceFeatureId, feature.version.toString, "source")
-
- private def featureXml(id: String, version: String, category: String): Elem = {
- <feature url={ "features/" + id + "_0.0.0.jar" } id={ id } version={ version }>
- <category name={ category }/>
- </feature>
- }
-
-}
View
13 src/test/scala/org/scalaide/buildtools/DebugTest.scala
@@ -1,13 +0,0 @@
-package org.scalaide.buildtools
-
-import java.io.File
-
-object DebugTest {
-
- def main(args: Array[String]) {
- new GenerateEcosystemBuilds(new File("/home/luc/dev/scala-ide/ecosystem"))()
- println("done")
-
- }
-
-}
Please sign in to comment.
Something went wrong with that request. Please try again.