use of org.eclipse.xtext.util.XtextVersion in project xtext-core by eclipse.
the class WebIntegrationFragment method generateIndexDoc.
protected void generateIndexDoc(final String hlModName) {
boolean _isFile = this.getProjectConfig().getWeb().getAssets().isFile("index.html");
if (_isFile) {
return;
}
final TextFileAccess indexFile = this.fileAccessFactory.createTextFile();
indexFile.setPath("index.html");
StringConcatenationClient _client = new StringConcatenationClient() {
@Override
protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
_builder.append("<html>");
_builder.newLine();
_builder.append("<head>");
_builder.newLine();
_builder.append("\t");
_builder.append("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">");
_builder.newLine();
_builder.append("\t");
_builder.append("<meta http-equiv=\"Content-Language\" content=\"en-us\">");
_builder.newLine();
_builder.append("\t");
_builder.append("<title>Example Web Editor</title>");
_builder.newLine();
{
WebIntegrationFragment.Framework _get = WebIntegrationFragment.this.framework.get();
boolean _equals = Objects.equal(_get, WebIntegrationFragment.Framework.ORION);
if (_equals) {
_builder.append("\t");
_builder.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"orion/code_edit/built-codeEdit.css\"/>");
_builder.newLine();
_builder.append("\t");
_builder.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"xtext/");
XtextVersion _xtextVersion = WebIntegrationFragment.this.codeConfig.getXtextVersion();
_builder.append(_xtextVersion, "\t");
_builder.append("/xtext-orion.css\"/>");
_builder.newLineIfNotEmpty();
} else {
WebIntegrationFragment.Framework _get_1 = WebIntegrationFragment.this.framework.get();
boolean _equals_1 = Objects.equal(_get_1, WebIntegrationFragment.Framework.ACE);
if (_equals_1) {
_builder.append("\t");
_builder.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"xtext/");
XtextVersion _xtextVersion_1 = WebIntegrationFragment.this.codeConfig.getXtextVersion();
_builder.append(_xtextVersion_1, "\t");
_builder.append("/xtext-ace.css\"/>");
_builder.newLineIfNotEmpty();
} else {
WebIntegrationFragment.Framework _get_2 = WebIntegrationFragment.this.framework.get();
boolean _equals_2 = Objects.equal(_get_2, WebIntegrationFragment.Framework.CODEMIRROR);
if (_equals_2) {
_builder.append("\t");
_builder.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"webjars/codemirror/");
_builder.append(WebIntegrationFragment.this.codeMirrorVersion, "\t");
_builder.append("/lib/codemirror.css\"/>");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"webjars/codemirror/");
_builder.append(WebIntegrationFragment.this.codeMirrorVersion, "\t");
_builder.append("/addon/hint/show-hint.css\"/>");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"xtext/");
XtextVersion _xtextVersion_2 = WebIntegrationFragment.this.codeConfig.getXtextVersion();
_builder.append(_xtextVersion_2, "\t");
_builder.append("/xtext-codemirror.css\"/>");
_builder.newLineIfNotEmpty();
}
}
}
}
_builder.append("\t");
_builder.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\"/>");
_builder.newLine();
_builder.append("\t");
_builder.append("<script src=\"webjars/requirejs/");
_builder.append(WebIntegrationFragment.this.requireJsVersion, "\t");
_builder.append("/require.min.js\"></script>");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("<script type=\"text/javascript\">");
_builder.newLine();
_builder.append("\t\t");
_builder.append("var baseUrl = window.location.pathname;");
_builder.newLine();
_builder.append("\t\t");
_builder.append("var fileIndex = baseUrl.indexOf(\"index.html\");");
_builder.newLine();
_builder.append("\t\t");
_builder.append("if (fileIndex > 0)");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("baseUrl = baseUrl.slice(0, fileIndex);");
_builder.newLine();
{
WebIntegrationFragment.Framework _get_3 = WebIntegrationFragment.this.framework.get();
boolean _equals_3 = Objects.equal(_get_3, WebIntegrationFragment.Framework.ORION);
if (_equals_3) {
_builder.append("\t\t");
_builder.append("require.config({");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("baseUrl: baseUrl,");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("paths: {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("\"text\": \"webjars/requirejs-text/");
_builder.append(WebIntegrationFragment.this.requireJsTextVersion, "\t\t\t\t");
_builder.append("/text\",");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("\"jquery\": \"webjars/jquery/");
_builder.append(WebIntegrationFragment.this.jQueryVersion, "\t\t\t\t");
_builder.append("/jquery.min\",");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("\"xtext/xtext-orion\": \"xtext/");
XtextVersion _xtextVersion_3 = WebIntegrationFragment.this.codeConfig.getXtextVersion();
_builder.append(_xtextVersion_3, "\t\t\t\t");
_builder.append("/xtext-orion\"");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("\t\t");
_builder.append("});");
_builder.newLine();
_builder.append("\t\t");
_builder.append("require([\"orion/code_edit/built-codeEdit-amd\"], function() {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("require([\"xtext/xtext-orion\"], function(xtext) {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("xtext.createEditor({");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t");
_builder.append("baseUrl: baseUrl,");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t");
_builder.append("syntaxDefinition: \"");
String _xifexpression = null;
boolean _get_4 = WebIntegrationFragment.this.generateJsHighlighting.get();
if (_get_4) {
_xifexpression = hlModName;
} else {
_xifexpression = "none";
}
_builder.append(_xifexpression, "\t\t\t\t\t");
_builder.append("\"");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("});");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("});");
_builder.newLine();
_builder.append("\t\t");
_builder.append("});");
_builder.newLine();
} else {
WebIntegrationFragment.Framework _get_5 = WebIntegrationFragment.this.framework.get();
boolean _equals_4 = Objects.equal(_get_5, WebIntegrationFragment.Framework.ACE);
if (_equals_4) {
_builder.append("\t\t");
_builder.append("require.config({");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("baseUrl: baseUrl,");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("paths: {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("\"jquery\": \"webjars/jquery/");
_builder.append(WebIntegrationFragment.this.jQueryVersion, "\t\t\t\t");
_builder.append("/jquery.min\",");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("\"ace/ext/language_tools\": \"webjars/ace/");
_builder.append(WebIntegrationFragment.this.aceVersion, "\t\t\t\t");
_builder.append("/src/ext-language_tools\",");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("\"xtext/xtext-ace\": \"xtext/");
XtextVersion _xtextVersion_4 = WebIntegrationFragment.this.codeConfig.getXtextVersion();
_builder.append(_xtextVersion_4, "\t\t\t\t");
_builder.append("/xtext-ace\"");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("\t\t");
_builder.append("});");
_builder.newLine();
_builder.append("\t\t");
_builder.append("require([\"webjars/ace/");
_builder.append(WebIntegrationFragment.this.aceVersion, "\t\t");
_builder.append("/src/ace\"], function() {");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("require([\"xtext/xtext-ace\"], function(xtext) {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("xtext.createEditor({");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t");
_builder.append("baseUrl: baseUrl,");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t");
_builder.append("syntaxDefinition: \"");
String _xifexpression_1 = null;
boolean _get_6 = WebIntegrationFragment.this.generateJsHighlighting.get();
if (_get_6) {
_xifexpression_1 = hlModName;
} else {
_xifexpression_1 = "none";
}
_builder.append(_xifexpression_1, "\t\t\t\t\t");
_builder.append("\"");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("});");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("});");
_builder.newLine();
_builder.append("\t\t");
_builder.append("});");
_builder.newLine();
} else {
WebIntegrationFragment.Framework _get_7 = WebIntegrationFragment.this.framework.get();
boolean _equals_5 = Objects.equal(_get_7, WebIntegrationFragment.Framework.CODEMIRROR);
if (_equals_5) {
_builder.append("\t\t");
_builder.append("require.config({");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("baseUrl: baseUrl,");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("paths: {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("\"jquery\": \"webjars/jquery/");
_builder.append(WebIntegrationFragment.this.jQueryVersion, "\t\t\t\t");
_builder.append("/jquery.min\",");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("\"xtext/xtext-codemirror\": \"xtext/");
XtextVersion _xtextVersion_5 = WebIntegrationFragment.this.codeConfig.getXtextVersion();
_builder.append(_xtextVersion_5, "\t\t\t\t");
_builder.append("/xtext-codemirror\"");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("},");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("packages: [{");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("name: \"codemirror\",");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("location: \"webjars/codemirror/");
_builder.append(WebIntegrationFragment.this.codeMirrorVersion, "\t\t\t\t");
_builder.append("\",");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("main: \"lib/codemirror\"");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("}]");
_builder.newLine();
_builder.append("\t\t");
_builder.append("});");
_builder.newLine();
_builder.append("\t\t");
_builder.append("require([");
{
boolean _get_8 = WebIntegrationFragment.this.generateJsHighlighting.get();
if (_get_8) {
_builder.append("\"");
_builder.append(hlModName, "\t\t");
_builder.append("\", ");
}
}
_builder.append("\"xtext/xtext-codemirror\"], function(");
{
boolean _get_9 = WebIntegrationFragment.this.generateJsHighlighting.get();
if (_get_9) {
_builder.append("mode, ");
}
}
_builder.append("xtext) {");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("xtext.createEditor({");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("baseUrl: baseUrl");
{
boolean _get_10 = WebIntegrationFragment.this.generateJsHighlighting.get();
boolean _not = (!_get_10);
if (_not) {
_builder.append(",");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\t\t");
_builder.append("syntaxDefinition: \"none\"");
_builder.newLine();
}
}
_builder.append("\t\t");
_builder.append("\t");
_builder.append("});");
_builder.newLine();
_builder.append("\t\t");
_builder.append("});");
_builder.newLine();
}
}
}
}
_builder.append("\t");
_builder.append("</script>");
_builder.newLine();
_builder.append("</head>");
_builder.newLine();
_builder.append("<body>");
_builder.newLine();
_builder.newLine();
_builder.append("<div class=\"container\">");
_builder.newLine();
_builder.append("\t");
_builder.append("<div class=\"header\">");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<h1>Example ");
String _simpleName = GrammarUtil.getSimpleName(WebIntegrationFragment.this.getGrammar());
_builder.append(_simpleName, "\t\t");
_builder.append(" Web Editor</h1>");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("</div>");
_builder.newLine();
_builder.append("\t");
_builder.append("<div class=\"content\">");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<div id=\"xtext-editor\" data-editor-xtext-lang=\"");
String _head = IterableExtensions.<String>head(WebIntegrationFragment.this.getLanguage().getFileExtensions());
_builder.append(_head, "\t\t");
_builder.append("\"></div>");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("</div>");
_builder.newLine();
_builder.append("</div>");
_builder.newLine();
_builder.newLine();
_builder.append("</body>");
_builder.newLine();
_builder.append("</html>");
_builder.newLine();
}
};
indexFile.setContent(_client);
indexFile.writeTo(this.getProjectConfig().getWeb().getAssets());
}
use of org.eclipse.xtext.util.XtextVersion in project xtext-core by eclipse.
the class WizardConfigurationTest method projectsCanBeBuiltAgainstXtextReleases.
@Test
public void projectsCanBeBuiltAgainstXtextReleases() {
this.config.setPreferredBuildSystem(BuildSystem.GRADLE);
UiProjectDescriptor _uiProject = this.config.getUiProject();
_uiProject.setEnabled(true);
IntellijProjectDescriptor _intellijProject = this.config.getIntellijProject();
_intellijProject.setEnabled(true);
XtextVersion _xtextVersion = new XtextVersion("2.9.0");
this.config.setXtextVersion(_xtextVersion);
final String snapshotsRepo = "repositories/snapshots";
Assert.assertFalse(this.config.getParentProject().pom().getContent().contains(snapshotsRepo));
Assert.assertFalse(this.config.getParentProject().buildGradle().getContent().contains(snapshotsRepo));
final String xtextIntellijRelease = "xtext/idea/${xtextVersion}";
Assert.assertTrue(this.config.getIntellijProject().buildGradle().getContent().contains(xtextIntellijRelease));
final String releaseUpdateSite = "xtext/updates/releases/2.9.0";
Assert.assertTrue(this.config.getTargetPlatformProject().target().toString().contains(releaseUpdateSite));
}
use of org.eclipse.xtext.util.XtextVersion in project xtext-core by eclipse.
the class TargetPlatformProject method target.
public CharSequence target() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>");
_builder.newLine();
_builder.append("<?pde version=\"3.8\"?>");
_builder.newLine();
_builder.append("<target name=\"");
String _name = this.getName();
_builder.append(_name);
_builder.append("\" sequenceNumber=\"1\">");
_builder.newLineIfNotEmpty();
_builder.append("<locations>");
_builder.newLine();
_builder.append("<location includeAllPlatforms=\"false\" includeConfigurePhase=\"false\" includeMode=\"planner\" includeSource=\"true\" type=\"InstallableUnit\">");
_builder.newLine();
_builder.append("<unit id=\"org.eclipse.jdt.feature.group\" version=\"0.0.0\"/>");
_builder.newLine();
_builder.append("<unit id=\"org.eclipse.platform.feature.group\" version=\"0.0.0\"/>");
_builder.newLine();
_builder.append("<unit id=\"org.eclipse.pde.feature.group\" version=\"0.0.0\"/>");
_builder.newLine();
_builder.append("<unit id=\"org.eclipse.draw2d.feature.group\" version=\"0.0.0\"/>");
_builder.newLine();
_builder.append("<unit id=\"org.eclipse.emf.sdk.feature.group\" version=\"0.0.0\"/>");
_builder.newLine();
_builder.append("<unit id=\"org.eclipse.xpand\" version=\"0.0.0\"/>");
_builder.newLine();
_builder.append("<unit id=\"org.eclipse.xtend\" version=\"0.0.0\"/>");
_builder.newLine();
_builder.append("<unit id=\"org.eclipse.xtend.typesystem.emf\" version=\"0.0.0\"/>");
_builder.newLine();
_builder.append("<repository location=\"http://download.eclipse.org/releases/oxygen/201712201001\"/>");
_builder.newLine();
_builder.append("</location>");
_builder.newLine();
_builder.append("<location includeAllPlatforms=\"false\" includeConfigurePhase=\"false\" includeMode=\"planner\" includeSource=\"true\" type=\"InstallableUnit\">");
_builder.newLine();
_builder.append("<unit id=\"org.eclipse.emf.mwe2.launcher.feature.group\" version=\"0.0.0\"/>");
_builder.newLine();
_builder.append("<repository location=\"http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1/\"/>");
_builder.newLine();
_builder.append("</location>");
_builder.newLine();
_builder.append("<location includeAllPlatforms=\"false\" includeConfigurePhase=\"false\" includeMode=\"planner\" includeSource=\"true\" type=\"InstallableUnit\">");
_builder.newLine();
_builder.append("<unit id=\"org.eclipse.xtext.sdk.feature.group\" version=\"0.0.0\"/>");
_builder.newLine();
{
boolean _isSnapshot = this.getConfig().getXtextVersion().isSnapshot();
if (_isSnapshot) {
_builder.append("<repository location=\"http://download.eclipse.org/modeling/tmf/xtext/updates/nightly/\"/>");
_builder.newLine();
} else {
boolean _isStable = this.getConfig().getXtextVersion().isStable();
if (_isStable) {
_builder.append("<repository location=\"http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/\"/>");
_builder.newLine();
} else {
_builder.append("<repository location=\"http://download.eclipse.org/modeling/tmf/xtext/updates/releases/");
XtextVersion _xtextVersion = this.getConfig().getXtextVersion();
_builder.append(_xtextVersion);
_builder.append("/\"/>");
_builder.newLineIfNotEmpty();
}
}
}
_builder.append("</location>");
_builder.newLine();
_builder.append("</locations>");
_builder.newLine();
_builder.append("</target>");
_builder.newLine();
return _builder;
}
use of org.eclipse.xtext.util.XtextVersion in project xtext-core by eclipse.
the class ParentProjectDescriptor method pom.
@Override
public PomFile pom() {
PomFile _pom = super.pom();
final Procedure1<PomFile> _function = (PomFile it) -> {
it.setPackaging("pom");
StringConcatenation _builder = new StringConcatenation();
_builder.append("<properties>");
_builder.newLine();
_builder.append("\t");
_builder.append("<xtextVersion>");
XtextVersion _xtextVersion = this.getConfig().getXtextVersion();
_builder.append(_xtextVersion, "\t");
_builder.append("</xtextVersion>");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("<project.build.sourceEncoding>");
Charset _encoding = this.getConfig().getEncoding();
_builder.append(_encoding, "\t");
_builder.append("</project.build.sourceEncoding>");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("<maven.compiler.source>");
String _javaVersion = this.getJavaVersion();
_builder.append(_javaVersion, "\t");
_builder.append("</maven.compiler.source>");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("<maven.compiler.target>");
String _javaVersion_1 = this.getJavaVersion();
_builder.append(_javaVersion_1, "\t");
_builder.append("</maven.compiler.target>");
_builder.newLineIfNotEmpty();
{
boolean _needsTychoBuild = this.getConfig().needsTychoBuild();
if (_needsTychoBuild) {
_builder.append("\t");
_builder.append("<!-- Tycho settings -->");
_builder.newLine();
_builder.append("\t");
_builder.append("<tycho-version>1.1.0</tycho-version>");
_builder.newLine();
_builder.append("\t");
_builder.append("<!-- Define overridable properties for tycho-surefire-plugin -->");
_builder.newLine();
_builder.append("\t");
_builder.append("<platformSystemProperties></platformSystemProperties>");
_builder.newLine();
_builder.append("\t");
_builder.append("<moduleProperties></moduleProperties>");
_builder.newLine();
_builder.append("\t");
_builder.append("<systemProperties></systemProperties>");
_builder.newLine();
_builder.append("\t");
_builder.append("<tycho.testArgLine></tycho.testArgLine>");
_builder.newLine();
}
}
_builder.append("</properties>");
_builder.newLine();
_builder.append("<modules>");
_builder.newLine();
{
final Function1<ProjectDescriptor, Boolean> _function_1 = (ProjectDescriptor it_1) -> {
return Boolean.valueOf(((!Objects.equal(it_1, this)) && it_1.isPartOfMavenBuild()));
};
Iterable<ProjectDescriptor> _filter = IterableExtensions.<ProjectDescriptor>filter(this.getConfig().getEnabledProjects(), _function_1);
for (final ProjectDescriptor p : _filter) {
_builder.append("\t");
_builder.append("<module>");
{
ProjectLayout _projectLayout = this.getConfig().getProjectLayout();
boolean _equals = Objects.equal(_projectLayout, ProjectLayout.FLAT);
if (_equals) {
_builder.append("../");
}
}
String _name = p.getName();
_builder.append(_name, "\t");
_builder.append("</module>");
_builder.newLineIfNotEmpty();
}
}
_builder.append("</modules>");
_builder.newLine();
_builder.append("<build>");
_builder.newLine();
{
boolean _needsTychoBuild_1 = this.getConfig().needsTychoBuild();
if (_needsTychoBuild_1) {
_builder.append("\t");
_builder.append("<plugins>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<plugin>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<groupId>org.eclipse.tycho</groupId>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<artifactId>tycho-maven-plugin</artifactId>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<version>${tycho-version}</version>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<extensions>true</extensions>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("</plugin>");
_builder.newLine();
{
boolean _isEnabled = this.getConfig().getP2Project().isEnabled();
if (_isEnabled) {
_builder.append("\t");
_builder.append("\t");
_builder.append("<plugin>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<groupId>org.eclipse.tycho</groupId>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<artifactId>tycho-source-plugin</artifactId>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<version>${tycho-version}</version>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<executions>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<execution>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("<id>plugin-source</id>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("<goals>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("<goal>plugin-source</goal>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("</goals>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t");
_builder.append("</execution>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("</executions>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("</plugin>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<plugin>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<groupId>org.eclipse.tycho.extras</groupId>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<artifactId>tycho-source-feature-plugin</artifactId>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<version>${tycho-version}</version>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<executions>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<execution>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("<id>source-feature</id>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("<phase>package</phase>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("<goals>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("<goal>source-feature</goal>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("</goals>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t");
_builder.append("</execution>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("</executions>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("</plugin>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<plugin>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<groupId>org.eclipse.tycho</groupId>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<artifactId>tycho-p2-plugin</artifactId>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<version>${tycho-version}</version>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("<executions>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<execution>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("<id>attach-p2-metadata</id>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("<phase>package</phase>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("<goals>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("<goal>p2-metadata</goal>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("</goals>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t\t");
_builder.append("</execution>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("\t");
_builder.append("</executions>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("</plugin>");
_builder.newLine();
}
}
_builder.append("\t");
_builder.append("\t");
_builder.append("<plugin>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<groupId>org.eclipse.tycho</groupId>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<artifactId>target-platform-configuration</artifactId>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<version>${tycho-version}</version>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t");
_builder.append("<configuration>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("<target>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("<artifact>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<groupId>");
String _baseName = this.getConfig().getBaseName();
_builder.append(_baseName, "\t\t\t\t\t\t");
_builder.append("</groupId>");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<artifactId>");
String _name_1 = this.getConfig().getTargetPlatformProject().getName();
_builder.append(_name_1, "\t\t\t\t\t\t");
_builder.append("</artifactId>");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<version>${project.version}</version>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("</artifact>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("</target>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("<environments>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("<environment>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<os>macosx</os>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<ws>cocoa</ws>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<arch>x86_64</arch>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("</environment>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("<environment>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<os>win32</os>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<ws>win32</ws>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<arch>x86_64</arch>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("</environment>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("<environment>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<os>linux</os>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<ws>gtk</ws>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t\t");
_builder.append("<arch>x86_64</arch>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t\t");
_builder.append("</environment>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t\t");
_builder.append("</environments>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t\t");
_builder.append("</configuration>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("</plugin>");
_builder.newLine();
_builder.append("\t");
_builder.append("</plugins>");
_builder.newLine();
}
}
_builder.append("\t");
_builder.append("<pluginManagement>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<plugins>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<plugin>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<groupId>org.eclipse.xtend</groupId>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<artifactId>xtend-maven-plugin</artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<version>${xtextVersion}</version>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<executions>");
_builder.newLine();
_builder.append("\t\t\t\t\t");
_builder.append("<execution>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t");
_builder.append("<goals>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("<goal>compile</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("<goal>xtend-install-debug-info</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("<goal>testCompile</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("<goal>xtend-test-install-debug-info</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t");
_builder.append("</goals>");
_builder.newLine();
_builder.append("\t\t\t\t\t");
_builder.append("</execution>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("</executions>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<configuration>");
_builder.newLine();
_builder.append("\t\t\t\t\t");
_builder.append("<outputDirectory>${basedir}/");
String _sourceFolder = this.sourceFolder(Outlet.MAIN_XTEND_GEN);
_builder.append(_sourceFolder, "\t\t\t\t\t");
_builder.append("</outputDirectory>");
_builder.newLineIfNotEmpty();
_builder.append("\t\t\t\t\t");
_builder.append("<testOutputDirectory>${basedir}/");
String _sourceFolder_1 = this.sourceFolder(Outlet.TEST_XTEND_GEN);
_builder.append(_sourceFolder_1, "\t\t\t\t\t");
_builder.append("</testOutputDirectory>");
_builder.newLineIfNotEmpty();
_builder.append("\t\t\t\t");
_builder.append("</configuration>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("</plugin>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<plugin>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<groupId>org.apache.maven.plugins</groupId>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<artifactId>maven-clean-plugin</artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<version>2.5</version>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<configuration>");
_builder.newLine();
_builder.append("\t\t\t\t\t");
_builder.append("<filesets>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t");
_builder.append("<fileset>");
_builder.newLine();
{
final Function1<Outlet, String> _function_2 = (Outlet it_1) -> {
return this.sourceFolder(it_1);
};
Set<String> _set = IterableExtensions.<String>toSet(ListExtensions.<Outlet, String>map(Collections.<Outlet>unmodifiableList(CollectionLiterals.<Outlet>newArrayList(Outlet.MAIN_XTEND_GEN, Outlet.TEST_XTEND_GEN)), _function_2));
for (final String dir : _set) {
_builder.append("\t\t\t\t\t\t\t");
_builder.append("<directory>${basedir}/");
_builder.append(dir, "\t\t\t\t\t\t\t");
_builder.append("</directory>");
_builder.newLineIfNotEmpty();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("<includes>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t");
_builder.append("<include>**/*</include>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("</includes>");
_builder.newLine();
}
}
_builder.append("\t\t\t\t\t\t");
_builder.append("</fileset>");
_builder.newLine();
_builder.append("\t\t\t\t\t");
_builder.append("</filesets>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("</configuration>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("</plugin>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<plugin>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<groupId>org.eclipse.m2e</groupId>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<artifactId>lifecycle-mapping</artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<version>1.0.0</version>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<configuration>");
_builder.newLine();
_builder.append("\t\t\t\t\t");
_builder.append("<lifecycleMappingMetadata>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t");
_builder.append("<pluginExecutions>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("<pluginExecution>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t");
_builder.append("<pluginExecutionFilter>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("<groupId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("org.apache.maven.plugins");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("</groupId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("<artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("maven-resources-plugin");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("</artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("<versionRange>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("[2.4.3,)");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("</versionRange>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("<goals>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("<goal>resources</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("<goal>testResources</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("</goals>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t");
_builder.append("</pluginExecutionFilter>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t");
_builder.append("<action>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("<ignore></ignore>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t");
_builder.append("</action>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("</pluginExecution>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("<pluginExecution>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t");
_builder.append("<pluginExecutionFilter>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("<groupId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("org.codehaus.mojo");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("</groupId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("<artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("build-helper-maven-plugin");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("</artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("<versionRange>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("[1.9.1,)");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("</versionRange>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("<goals>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("<goal>add-resource</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("<goal>add-source</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("<goal>add-test-resource</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t\t");
_builder.append("<goal>add-test-source</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("</goals>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t");
_builder.append("</pluginExecutionFilter>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t");
_builder.append("<action>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t\t");
_builder.append("<ignore></ignore>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t\t");
_builder.append("</action>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("</pluginExecution>");
_builder.newLine();
{
boolean _needsTychoBuild_2 = this.getConfig().needsTychoBuild();
if (_needsTychoBuild_2) {
_builder.append("\t\t\t\t\t\t\t");
_builder.append("<pluginExecution>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t");
_builder.append("<pluginExecutionFilter>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("<groupId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("org.eclipse.tycho");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("</groupId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("<artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("tycho-compiler-plugin");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("</artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("<versionRange>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("[0.23.1,)");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("</versionRange>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("<goals>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("<goal>compile</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("</goals>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t");
_builder.append("</pluginExecutionFilter>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t");
_builder.append("<action>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("<ignore></ignore>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t");
_builder.append("</action>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("</pluginExecution>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("<pluginExecution>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t");
_builder.append("<pluginExecutionFilter>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("<groupId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("org.eclipse.tycho");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("</groupId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("<artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("tycho-packaging-plugin");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("</artifactId>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("<versionRange>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("[0.23.1,)");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("</versionRange>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("<goals>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("<goal>build-qualifier</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("<goal>build-qualifier-aggregator</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("<goal>validate-id</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t\t");
_builder.append("<goal>validate-version</goal>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("</goals>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t");
_builder.append("</pluginExecutionFilter>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t");
_builder.append("<action>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t\t");
_builder.append("<ignore></ignore>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("\t");
_builder.append("</action>");
_builder.newLine();
_builder.append("\t\t\t\t\t\t\t");
_builder.append("</pluginExecution>");
_builder.newLine();
}
}
_builder.append("\t\t\t\t\t\t");
_builder.append("</pluginExecutions>");
_builder.newLine();
_builder.append("\t\t\t\t\t");
_builder.append("</lifecycleMappingMetadata>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("</configuration>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("</plugin>");
_builder.newLine();
{
boolean _needsTychoBuild_3 = this.getConfig().needsTychoBuild();
if (_needsTychoBuild_3) {
_builder.append("\t\t\t");
_builder.append("<plugin>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("<!-- ");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t\t");
_builder.append("Can be removed after first generator execution");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t\t");
_builder.append("https://bugs.eclipse.org/bugs/show_bug.cgi?id=480097");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("-->");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("<groupId>org.eclipse.tycho</groupId>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("<artifactId>tycho-compiler-plugin</artifactId>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("<version>${tycho-version}</version>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("<configuration>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t\t");
_builder.append("<compilerArgument>-err:-forbidden</compilerArgument>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t\t");
_builder.append("<useProjectSettings>false</useProjectSettings>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("</configuration>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("</plugin>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<!-- to skip running (and compiling) tests use commandline flag: -Dmaven.test.skip");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("To skip tests, but still compile them, use: -DskipTests");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("To allow all tests in a pom to pass/fail, use commandline flag: -fae (fail");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("at end) -->");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<plugin>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("<groupId>org.eclipse.tycho</groupId>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("<artifactId>tycho-surefire-plugin</artifactId>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("<version>${tychoVersion}</version>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("<configuration>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t\t");
_builder.append("<!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t\t");
_builder.append("<argLine>${tycho.testArgLine} ${platformSystemProperties} ${systemProperties} ${moduleProperties}</argLine>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("\t");
_builder.append("</configuration>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("</plugin>");
_builder.newLine();
}
}
_builder.append("\t\t");
_builder.append("</plugins>");
_builder.newLine();
_builder.append("\t");
_builder.append("</pluginManagement>");
_builder.newLine();
_builder.append("</build>");
_builder.newLine();
_builder.append("<repositories>");
_builder.newLine();
_builder.append("\t");
_builder.append("<repository>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<id>codehaus-snapshots</id>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<name>disable dead \'Codehaus Snapshots\' repository, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=481478</name>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<url>http://nexus.codehaus.org/snapshots/</url>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<releases>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<enabled>false</enabled>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("</releases>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<snapshots>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<enabled>false</enabled>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("</snapshots>");
_builder.newLine();
_builder.append("\t");
_builder.append("</repository>");
_builder.newLine();
{
boolean _isSnapshot = this.getConfig().getXtextVersion().isSnapshot();
if (_isSnapshot) {
_builder.append("\t");
_builder.append("<repository>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<id>sonatype-snapshots</id>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<url>https://oss.sonatype.org/content/repositories/snapshots</url>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<releases><enabled>false</enabled></releases>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<snapshots><enabled>true</enabled></snapshots>");
_builder.newLine();
_builder.append("\t");
_builder.append("</repository>");
_builder.newLine();
}
}
_builder.append("</repositories>");
_builder.newLine();
_builder.append("<pluginRepositories>");
_builder.newLine();
_builder.append("\t");
_builder.append("<pluginRepository>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<id>codehaus-snapshots</id>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<name>disable dead \'Codehaus Snapshots\' repository, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=481478</name>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<url>http://nexus.codehaus.org/snapshots/</url>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<releases>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<enabled>false</enabled>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("</releases>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<snapshots>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<enabled>false</enabled>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("</snapshots>");
_builder.newLine();
_builder.append("\t");
_builder.append("</pluginRepository>");
_builder.newLine();
{
boolean _isSnapshot_1 = this.getConfig().getXtextVersion().isSnapshot();
if (_isSnapshot_1) {
_builder.append("\t");
_builder.append("<pluginRepository>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<id>sonatype-snapshots</id>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<url>https://oss.sonatype.org/content/repositories/snapshots</url>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<releases><enabled>false</enabled></releases>");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("<snapshots><enabled>true</enabled></snapshots>");
_builder.newLine();
_builder.append("\t");
_builder.append("</pluginRepository>");
_builder.newLine();
}
}
_builder.append("</pluginRepositories>");
_builder.newLine();
_builder.append("<profiles>");
_builder.newLine();
_builder.append("\t");
_builder.append("<profile>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<id>macos</id>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<activation>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<os>");
_builder.newLine();
_builder.append("\t\t\t\t");
_builder.append("<family>mac</family>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("</os>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("</activation>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<properties>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<platformSystemProperties>-XstartOnFirstThread</platformSystemProperties>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("</properties>");
_builder.newLine();
_builder.append("\t");
_builder.append("</profile>");
_builder.newLine();
_builder.append("\t");
_builder.append("<profile>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<id>jdk9-or-newer</id>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<activation>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<jdk>[9,)</jdk>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("</activation>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<properties>");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("<moduleProperties>--add-modules=ALL-SYSTEM</moduleProperties>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("</properties>");
_builder.newLine();
_builder.append("\t");
_builder.append("</profile>");
_builder.newLine();
_builder.append("</profiles>");
_builder.newLine();
it.setBuildSection(_builder.toString());
};
return ObjectExtensions.<PomFile>operator_doubleArrow(_pom, _function);
}
use of org.eclipse.xtext.util.XtextVersion in project xtext-core by eclipse.
the class WizardConfigurationTest method projectsCanBeBuiltAgainstXtextNightlies.
@Test
public void projectsCanBeBuiltAgainstXtextNightlies() {
this.config.setPreferredBuildSystem(BuildSystem.GRADLE);
UiProjectDescriptor _uiProject = this.config.getUiProject();
_uiProject.setEnabled(true);
IntellijProjectDescriptor _intellijProject = this.config.getIntellijProject();
_intellijProject.setEnabled(true);
XtextVersion _xtextVersion = new XtextVersion("2.9.0-SNAPSHOT");
this.config.setXtextVersion(_xtextVersion);
final String snapshotsRepo = "repositories/snapshots";
Assert.assertTrue(this.config.getParentProject().pom().getContent().contains(snapshotsRepo));
Assert.assertTrue(this.config.getParentProject().buildGradle().getContent().contains(snapshotsRepo));
final String xtextIntellijSnapshots = "/xtext-intellij/lastSuccessfulBuild/";
Assert.assertTrue(this.config.getIntellijProject().buildGradle().getContent().contains(xtextIntellijSnapshots));
final String nightlyUpdateSite = "xtext/updates/nightly";
Assert.assertTrue(this.config.getTargetPlatformProject().target().toString().contains(nightlyUpdateSite));
}
Aggregations