Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Tycho Maven antlr not found(org.antlr.runtime not found)
Tycho Maven antlr not found [message #1728275] Fri, 01 April 2016 14:21 Go to next message
Alex Gor is currently offline Alex GorFriend
Messages: 159
Registered: November 2014
Location: Russia
Senior Member
I cannot export product based on xtext via Maven+Tycho
I use latest version of xtext 2.9.2
Maven version 3.2.3
Tycho 0.24

I observed the following error while maven exports my product

[ERROR] Cannot resolve dependencies of product com.psl.atom.build.product:
[ERROR]   eclipse-plugin artifact with ID "org.antlr.runtime" and version matching "3.2.0" was not found in the target platform

I've cheked corresponded plugin is located in xtext repository for 2.9.2 release.I've looked through xtext platform and find out that xtext requires concrete version of antlr. this version is 3.2.0 .

In my project use the third party repository, for example Oracle repositories and this repositories correctly processed and return corresponded jdbc plugin without problem. For example oracle plugin definitly is not exist in tycho target, and its located in third party repositories,but correctly retreived. I cannot understand what is mistik of antlr plugin, that cannot be retreived. I undrstand that eclipse repository and target platform is not the same things. Target platform can include several repositories


I tried to create target file. I generated a project and use target file from this dummy project. Certanly I've corrected name of artifacts. I see that it contains, commonle speaking the list of the same repository that were mentioned in my parent pom, so seems to me it cannot help me to resolve issue with unknown plugin antlr.

Via Eclipse IDE product exported without problem.
Does anybody can help me?

build logs and some additonal file has been attached

  • Attachment: build2.log
    (Size: 100.65KB, Downloaded 74 times)
  • Attachment: pom.xml
    (Size: 5.07KB, Downloaded 69 times)
  • Attachment: com.psl.atom.target.target
    (Size: 1.69KB, Downloaded 149 times)
  • Attachment: pom.xml
    (Size: 1.57KB, Downloaded 80 times)
Re: Tycho Maven antlr not found [message #1728280 is a reply to message #1728275] Fri, 01 April 2016 15:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
where do you use the target?

this is usually done by the target-platform-configuration plugin

did you have a look at the stuff the xtext 2.9.x wizard creates for maven?

<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>
	<groupId>org.xtext.example.mydsl2</groupId>
	<version>1.0.0-SNAPSHOT</version>
	<artifactId>org.xtext.example.mydsl2.parent</artifactId>
	<packaging>pom</packaging>

	<properties>
		<tycho-version>0.23.1</tycho-version>
		<xtextVersion>2.9.2</xtextVersion>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>
	<modules>
		<module>org.xtext.example.mydsl2</module>
		<module>org.xtext.example.mydsl2.ide</module>
		<module>org.xtext.example.mydsl2.ui</module>
		<module>org.xtext.example.mydsl2.target</module>
		<module>org.xtext.example.mydsl2.tests</module>
		<module>org.xtext.example.mydsl2.ui.tests</module>
	</modules>
	<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>target-platform-configuration</artifactId>
				<version>${tycho-version}</version>
				<configuration>
					<target>
						<artifact>
							<groupId>org.xtext.example.mydsl2</groupId>
							<artifactId>org.xtext.example.mydsl2.target</artifactId>
							<version>${project.version}</version>
						</artifact>
					</target>
					<environments>
						<environment>
							<os>macosx</os>
							<ws>cocoa</ws>
							<arch>x86_64</arch>
						</environment>
						<environment>
							<os>win32</os>
							<ws>win32</ws>
							<arch>x86_64</arch>
						</environment>
						<environment>
							<os>linux</os>
							<ws>gtk</ws>
							<arch>x86_64</arch>
						</environment>
					</environments>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.eclipse.xtend</groupId>
					<artifactId>xtend-maven-plugin</artifactId>
					<version>${xtextVersion}</version>
					<executions>
						<execution>
							<goals>
								<goal>compile</goal>
								<goal>testCompile</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<outputDirectory>${basedir}/xtend-gen</outputDirectory>
						<testOutputDirectory>${basedir}/xtend-gen</testOutputDirectory>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>2.5</version>
					<configuration>
						<filesets>
							<fileset>
								<directory>${basedir}/xtend-gen</directory>
								<includes>
									<include>**/*</include>
								</includes>
								<directory>${basedir}/xtend-gen</directory>
								<includes>
									<include>**/*</include>
								</includes>
							</fileset>
						</filesets>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											build-helper-maven-plugin
										</artifactId>
										<versionRange>
											[1.9.1,)
										</versionRange>
										<goals>
											<goal>add-resource</goal>
											<goal>add-source</goal>
											<goal>add-test-resource</goal>
											<goal>add-test-source</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.eclipse.tycho
										</groupId>
										<artifactId>
											tycho-compiler-plugin
										</artifactId>
										<versionRange>
											[0.23.1,)
										</versionRange>
										<goals>
											<goal>compile</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.eclipse.tycho
										</groupId>
										<artifactId>
											tycho-packaging-plugin
										</artifactId>
										<versionRange>
											[0.23.1,)
										</versionRange>
										<goals>
											<goal>build-qualifier</goal>
											<goal>validate-id</goal>
											<goal>validate-version</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				<plugin>
					<!-- 
						Can be removed after first generator execution
						https://bugs.eclipse.org/bugs/show_bug.cgi?id=480097
					-->
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-compiler-plugin</artifactId>
					<version>${tycho-version}</version>
					<configuration>
						<compilerArgument>-err:-forbidden</compilerArgument>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	<repositories>
		<repository>
			<id>codehaus-snapshots</id>
			<name>disable dead 'Codehaus Snapshots' repository, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=481478</name>
			<url>http://nexus.codehaus.org/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>codehaus-snapshots</id>
			<name>disable dead 'Codehaus Snapshots' repository, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=481478</name>
			<url>http://nexus.codehaus.org/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>

	<dependencies>
	</dependencies>
</project>



Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tycho Maven antlr not found [message #1728294 is a reply to message #1728280] Fri, 01 April 2016 17:15 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 159
Registered: November 2014
Location: Russia
Senior Member
Hello Christian

You are right I had missprints in my parent pom. I've correct it and add mentioned plugin. But it does not help. I observed the same error
  • Attachment: pom.xml
    (Size: 5.31KB, Downloaded 69 times)
Re: Tycho Maven antlr not found [message #1728295 is a reply to message #1728294] Fri, 01 April 2016 17:23 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
can you please share a complete hello world project i can checkout and run

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tycho Maven antlr not found [message #1728437 is a reply to message #1728295] Mon, 04 April 2016 11:16 Go to previous message
Alex Gor is currently offline Alex GorFriend
Messages: 159
Registered: November 2014
Location: Russia
Senior Member
Thank you Cristian. I'll do this at weekend. Now other urgent task was appeared agaisnt me
Previous Topic:own scoping fragment with 2.9 generator
Next Topic:Is the XText Buckminster wizard still available/supported?
Goto Forum:
  


Current Time: Thu Apr 25 18:02:42 GMT 2024

Powered by FUDForum. Page generated in 5.03326 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top