Skip to content

Commit

Permalink
[releng] Added sources to the p2 repo. Use tycho 0.21.0 now.
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Huebner <[email protected]>
  • Loading branch information
dhuebner committed Jan 13, 2015
1 parent a3dea02 commit 47543f9
Show file tree
Hide file tree
Showing 9 changed files with 221 additions and 163 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ target

# ignore trace files
*.java._trace

# ignore temporary xtend bin files
*.xtendbin
3 changes: 2 additions & 1 deletion org.eclipse.xtext.xdoc.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
</license>

<requires>
<import feature="org.eclipse.xtext.sdk" version="2.0.0.qualifier" match="greaterOrEqual"/>
<import plugin="org.apache.commons.lang"/>
<import plugin="org.apache.commons.logging"/>
<import plugin="org.apache.log4j"/>
<import feature="org.eclipse.xtext.runtime" version="2.8.0.v201501110339"/>
<import feature="org.eclipse.xtext.ui" version="2.8.0.v201501110339"/>
</requires>

<plugin
Expand Down
89 changes: 59 additions & 30 deletions org.eclipse.xtext.xdoc.feature/pom.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,61 @@
<?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.eclipse.xtext.xdoc</groupId>
<artifactId>org.eclipse.xtext.xdoc.parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.xtext.xdoc</groupId>
<artifactId>org.eclipse.xtext.xdoc.feature</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
</plugins>
</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>
<parent>
<groupId>org.eclipse.xtext.xdoc</groupId>
<artifactId>org.eclipse.xtext.xdoc.parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.xtext.xdoc</groupId>
<artifactId>org.eclipse.xtext.xdoc.feature</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-source-feature-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<id>source-feature</id>
<phase>package</phase>
<goals>
<goal>source-feature</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<id>attach-p2-metadata</id>
<phase>package</phase>
<goals>
<goal>p2-metadata</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
10 changes: 10 additions & 0 deletions org.eclipse.xtext.xdoc.releng/category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="org.eclipse.xtext.xdoc.feature" version="0.1.0.qualifier">
<category name="xDoc"/>
</feature>
<feature id="org.eclipse.xtext.xdoc.feature.source" version="0.1.0.qualifier">
<category name="xDoc"/>
</feature>
<category-def name="xDoc" label="Xdoc"/>
</site>
2 changes: 1 addition & 1 deletion org.eclipse.xtext.xdoc.releng/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
<groupId>org.eclipse.xtext.xdoc</groupId>
<artifactId>org.eclipse.xtext.xdoc.releng</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
<packaging>eclipse-repository</packaging>
</project>
7 changes: 0 additions & 7 deletions org.eclipse.xtext.xdoc.releng/site.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,14 @@ class GitExtensions {
val packageName = qualifiedName.substring(0, qualifiedName.lastIndexOf('.'))
val javaFileName = qualifiedName.replace('.','/')+".class"
val url = getClass.getClassLoader.getResource(javaFileName)
var String traceFile = null;
if (url.toString.contains('bin/'+javaFileName)) {
val traceFile = url.file.replace('bin/'+javaFileName, 'xtend-gen/'+packageName.replace('.','/')+"/."+simpleName+".java._trace")
val traceRegion = new TraceRegionSerializer().readTraceRegionFrom(new FileInputStream(traceFile));
return traceRegion.associatedPath.toString
traceFile = url.file.replace('bin/'+javaFileName, 'xtend-gen/'+packageName.replace('.','/')+"/."+simpleName+".java._trace")
} else {
traceFile = url.file.replace('.class', ".java._trace")
}
val traceRegion = new TraceRegionSerializer().readTraceRegionFrom(new FileInputStream(traceFile));
return traceRegion.associatedPath.toString
} catch (IOException e) {
}
return qualifiedName.replace('.', '/')+'.java'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ public String findOriginalSource(final String qualifiedName) {
Class<? extends GitExtensions> _class = this.getClass();
ClassLoader _classLoader = _class.getClassLoader();
final URL url = _classLoader.getResource(javaFileName);
String traceFile = null;
String _string = url.toString();
boolean _contains = _string.contains(("bin/" + javaFileName));
if (_contains) {
Expand All @@ -414,21 +415,26 @@ public String findOriginalSource(final String qualifiedName) {
String _plus_2 = (_plus_1 + "/.");
String _plus_3 = (_plus_2 + simpleName);
String _plus_4 = (_plus_3 + ".java._trace");
final String traceFile = _file.replace(("bin/" + javaFileName), _plus_4);
TraceRegionSerializer _traceRegionSerializer = new TraceRegionSerializer();
FileInputStream _fileInputStream = new FileInputStream(traceFile);
final AbstractTraceRegion traceRegion = _traceRegionSerializer.readTraceRegionFrom(_fileInputStream);
URI _associatedPath = traceRegion.getAssociatedPath();
return _associatedPath.toString();
}
String _replace_2 = _file.replace(("bin/" + javaFileName), _plus_4);
traceFile = _replace_2;
} else {
String _file_1 = url.getFile();
String _replace_3 = _file_1.replace(".class", ".java._trace");
traceFile = _replace_3;
}
TraceRegionSerializer _traceRegionSerializer = new TraceRegionSerializer();
FileInputStream _fileInputStream = new FileInputStream(traceFile);
final AbstractTraceRegion traceRegion = _traceRegionSerializer.readTraceRegionFrom(_fileInputStream);
URI _associatedPath = traceRegion.getAssociatedPath();
return _associatedPath.toString();
} catch (final Throwable _t) {
if (_t instanceof IOException) {
final IOException e = (IOException)_t;
} else {
throw Exceptions.sneakyThrow(_t);
}
}
String _replace_2 = qualifiedName.replace(".", "/");
return (_replace_2 + ".java");
String _replace_4 = qualifiedName.replace(".", "/");
return (_replace_4 + ".java");
}
}
Loading

0 comments on commit 47543f9

Please sign in to comment.