-
Notifications
You must be signed in to change notification settings - Fork 77
Adding a project to the Rascal libraries
Jurgen J. Vinju edited this page Oct 20, 2017
·
7 revisions
At https://update.rascal-mpl.org/libs/ we publish a set of Eclipse features which bundle Rascal projects that contain generic and reusable library feature or specific language support for programming languages.
- Create a Rascal project in Eclipse and add your Rascal and Java source code files.
- Make sure the project has a META-INF/RASCAL.MF file with the right information. If the project has a main function for example to register an Eclipse IDE language, this needs to be specified right there.
- Add a plugin.xml file with this extension:
<extension id="rascal-ecore-library" point="rascal_eclipse.rascalLibrary"> </extension>
- Copy a Jenkinsfile from an existing plugin, like
clair
- Copy a pom.xml from an existing plugin like
clair
and change the name of the project inside. -
git push
your project with the new pom.xml and Jenkinsfile - Go to http://ci.usethesource.io/ and edit the configuration of the SWAT organisation to include the new project name as one of the projects to search for a Jenkinsfile.
- Edit
rascal-eclipse-libraries/pom.xml
and add your new project as a module - Copy
-r
an existing feature project to a new project:cp -r rascal-eclipse-libraries/clair rascal-eclipse-libraries/my-project
- Edit
rascal-eclipse-libraries/my-project/feature.xml
to contain the right information (pay attention to the title, the license, the URL) - update
update-site/{site,category}.xml
by adding the new feature git commit -am "added new feature"; git push
- Done.
If your project contains Java code then it is imperative to have configured build.properties
in such a way that:
- All Rascal source files en up in the jar in a sub-folder called
src
- All class files end up in the top-level jar
bin.includes = META-INF/,\
src/,\
plugin.xml,\
LICENSE,\
CITATION,\
.
source.. = src/
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
>
<extension
point="rascal_eclipse.rascalLibrary">
</extension>
</plugin>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: clair
Bundle-SymbolicName: clair;singleton:=true
Bundle-Version: 0.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.cdt.core;bundle-version="6.2.0",
rascal_eclipse;bundle-version="0.8.4",
org.eclipse.core.runtime;bundle-version="3.12.0",
org.apache.commons.lang;bundle-version="2.6.0"
Manifest-Version: 0.0.1
Main-Function: main
Main-Module: Plugin
Source: src
<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>
<parent>
<groupId>io.usethesource</groupId>
<artifactId>pom-parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
</parent>
<artifactId>clair</artifactId>
<groupId>org.rascalmpl</groupId>
<version>0.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<scm>
<developerConnection>scm:git:https://github.com/cwi-swat/clair.git</developerConnection>
</scm>
</project>
node {
stage 'Clone'
checkout scm
stage 'Build and Test'
def mvnHome = tool 'M3'
sh "${mvnHome}/bin/mvn -B clean install"
build job: '../rascal-eclipse-libraries/master', wait: false
}