Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a source bundle for the sbt library.
This commit allows debugging, hyperlinking, etc. towards sbt sources. Useful when working on the Sbt builder. * create a source bundle for the sbt library. I needed to inline the contents of sbt jars in order to get Eclipse to correctly associate sources with classfiles * created a new compiler.interface bundle, only for the compiler interface, together with the matching `compiler.interface.sources` bundle. Sbt requires this to be a separate jar and there was no way to build a single sbt bundle with only some of the dependencies inlined. A similar approach could be used for the Scala library/compiler bundles, but we should investigate the possibility of having the Scala team publish source bundles too (Re #1001889). (this was originally a commit from @dragos, which I have adapted based on the comments in #482) Fixes #1001888
- Loading branch information
Showing
11 changed files
with
374 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
**/.cache | ||
target/ |
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
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,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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> | ||
<parent> | ||
<groupId>org.scala-ide</groupId> | ||
<artifactId>org.scala-ide.build-toolchain</artifactId> | ||
<version>4.0.0-SNAPSHOT</version> | ||
<relativePath>../org.scala-ide.build-toolchain/pom.xml</relativePath> | ||
</parent> | ||
<artifactId>org.scala-ide.sbt.compiler.interface.source</artifactId> | ||
<packaging>bundle</packaging> | ||
|
||
<profiles> | ||
<profile> | ||
<id>sbt-new</id> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.typesafe.sbt</groupId> | ||
<artifactId>compiler-interface-precompiled</artifactId> | ||
<version>${sbt.ide.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
|
||
<profile> | ||
<id>sbt-legacy</id> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>compiler-interface_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
</profiles> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<!-- generate the MANIFEST.MF file, and create the bundle --> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/src</outputDirectory> | ||
<instructions> | ||
<Bundle-Name>Sbt Compiler Interface Sources for Eclipse</Bundle-Name> | ||
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> | ||
<Bundle-Version>${sbt.version}.${version.tag}-${version.suffix}-${maven.build.timestamp}</Bundle-Version> | ||
<!-- This defines the bundle we provide the source for --> | ||
<Eclipse-SourceBundle>org.scala-ide.sbt.compiler.interface;version="${sbt.version}.${version.tag}-${version.suffix}-${maven.build.timestamp}";roots:="."</Eclipse-SourceBundle> | ||
<!-- Extract all sources into this bundle --> | ||
<Embed-Dependency>classifier=sources;inline=true</Embed-Dependency> | ||
</instructions> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
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,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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> | ||
<parent> | ||
<groupId>org.scala-ide</groupId> | ||
<artifactId>org.scala-ide.build-toolchain</artifactId> | ||
<version>4.0.0-SNAPSHOT</version> | ||
<relativePath>../org.scala-ide.build-toolchain/pom.xml</relativePath> | ||
</parent> | ||
<artifactId>org.scala-ide.sbt.compiler.interface</artifactId> | ||
<packaging>bundle</packaging> | ||
|
||
<profiles> | ||
<profile> | ||
<id>sbt-new</id> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.typesafe.sbt</groupId> | ||
<artifactId>compiler-interface-precompiled</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
|
||
<profile> | ||
<id>sbt-legacy</id> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>compiler-interface_${sbt.compiled.version}</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
</profiles> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<!-- generate the MANIFEST.MF file, and create the bundle --> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/lib</outputDirectory> | ||
<instructions> | ||
<Bundle-Vendor>scala-ide.org</Bundle-Vendor> | ||
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> | ||
<Bundle-Name>Sbt ${sbt.ide.version} Compiler Interface for Eclipse</Bundle-Name> | ||
<!-- put a '-' after the sbt.version since it already has a '-scalaide-01' qualifier. Remove it the qualifier is gone. --> | ||
<Bundle-Version>${sbt.version}.${version.tag}-${version.suffix}-${maven.build.timestamp}</Bundle-Version> | ||
<Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency> | ||
<_exportcontents>xsbt.*;version=${sbt.version}</_exportcontents> | ||
<Embed-StripVersion>true</Embed-StripVersion> | ||
<Import-Package>!org.apache.ivy.*,!org.bouncycastle.*,!org.scalatools.testing.*,!com.craft.*,!com.jcraft.*,!sun.misc,!org.apache.commons.vfs,!org.apache.commons.vfs.impl,!org.apache.oro.text,!org.apache.oro.text | ||
.regex,*</Import-Package> | ||
</instructions> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
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,189 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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> | ||
<parent> | ||
<groupId>org.scala-ide</groupId> | ||
<artifactId>org.scala-ide.build-toolchain</artifactId> | ||
<version>4.0.0-SNAPSHOT</version> | ||
<relativePath>../org.scala-ide.build-toolchain/pom.xml</relativePath> | ||
</parent> | ||
<artifactId>org.scala-ide.sbt.full.library.source</artifactId> | ||
<packaging>bundle</packaging> | ||
|
||
<profiles> | ||
<profile> | ||
<id>sbt-new</id> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.typesafe.sbt</groupId> | ||
<artifactId>sbt-interface</artifactId> | ||
<version>${sbt.ide.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.typesafe.sbt</groupId> | ||
<artifactId>incremental-compiler</artifactId> | ||
<version>${sbt.ide.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
|
||
<profile> | ||
<id>sbt-legacy</id> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>classpath_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>logging_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>io_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>control_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>classfile_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>process_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>relation_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>interface_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>persist_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>api_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>compiler-integration_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>incremental-compiler_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-sbt</groupId> | ||
<artifactId>compile_${sbt.compiled.version}</artifactId> | ||
<version>${sbt.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<!-- all the dependencies necessary for running like sbinary, jline --> | ||
<dependency> | ||
<groupId>jline</groupId> | ||
<artifactId>jline</artifactId> | ||
<version>${jline.version}</version> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
<!-- No published sources for sbinary, yet --> | ||
<!-- <dependency> | ||
<groupId>org.scala-tools.sbinary</groupId> | ||
<artifactId>sbinary_${sbt.compiled.version}</artifactId> | ||
<classifier>sources</classifier> | ||
<optional>true</optional> | ||
</dependency> | ||
--> | ||
</dependencies> | ||
</profile> | ||
</profiles> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<!-- automatically clean up the generated META-INF folder --> | ||
<artifactId>maven-clean-plugin</artifactId> | ||
<configuration> | ||
<excludeDefaultDirectories>true</excludeDefaultDirectories> | ||
<filesets> | ||
<fileset> | ||
<directory>./</directory> | ||
<includes> | ||
<include>META-INF/**/*</include> | ||
<include>META-INF</include> | ||
<include>target/**/*</include> | ||
<include>target</include> | ||
</includes> | ||
<followSymlinks>false</followSymlinks> | ||
</fileset> | ||
</filesets> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/src</outputDirectory> | ||
<instructions> | ||
<Bundle-Vendor>scala-ide.org</Bundle-Vendor> | ||
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> | ||
<Bundle-Name>Sbt ${sbt.ide.version} Library Sources for Eclipse</Bundle-Name> | ||
<Bundle-Version>${sbt.version}.${version.tag}-${version.suffix}-${maven.build.timestamp}</Bundle-Version> | ||
<!-- This defines the bundle we provide the source for --> | ||
<Eclipse-SourceBundle>org.scala-ide.sbt.full.library;version="${sbt.version}.${version.tag}-${version.suffix}-${maven.build.timestamp}";roots:="."</Eclipse-SourceBundle> | ||
<!-- Extract all sources into this bundle --> | ||
<Embed-Dependency>classifier=sources;inline=true</Embed-Dependency> | ||
</instructions> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Oops, something went wrong.