Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Problem with automatic update of a P2 repository(How to prevent the automatic update of a P2 repositories; how to configure the Nexus to do a proper update to the newest P2 libraries)
Problem with automatic update of a P2 repository [message #1245952] Fri, 14 February 2014 14:10 Go to next message
Adrian Pollak is currently offline Adrian PollakFriend
Messages: 27
Registered: August 2013
Junior Member
Hello,

I have a problem with an automatic update of the P2 Xtext libraries.

I am referencing a P2 repository within a Nexus (http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/).

Each time a new Xtext version (like yesterday with 2.5.2) is published my build runs into an error (see log)
although I am using a specific Xtext version 2.5.0 in the pom.xml (see poms)

As a manual workaround I created a new Xtext Repository within the Nexus.
This repository is directly filled with the actual Xtext version 2.5.2.

The problem is that this workaround is a bad solution for a productive system.

Has anybody an idea how to prevent the automatic download of the newest libraries for the build or
how to configure the Nexus to do a proper update to the newest P2 libraries?

Any help is appreciated.

Regards

Adrian


Error log:
C:\workspaces\head\com.my.ba.generator>mvn install
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: com.my.ba:com.my.ba.dsl:1.0.0 @ C:\workspaces\head\com.my.ba.dsl\p
om.xml
[INFO] Fetching p2.index from http://m.g.w.net:8084/nexus/content/groups/p2public/ (0B of 134B at 0B/s)
[INFO] Fetching p2.index from http://m.g.w.net:8084/nexus/content/groups/p2public/ (134B of 134B at 0B/s)
[INFO] 1 operation remaining.
[INFO] Adding repository http://m.g.w.net:8084/nexus/content/groups/p2public
[INFO] Resolving dependencies of MavenProject: com.my.ba:com.my.ba.dsl:1.0.0 @ C:\workspaces\head\com.my.ba.dsl\pom.x
ml
[ERROR] All attempts to read artifact osgi.bundle,org.eclipse.xtext,2.5.2.v201402120812 failed:
[ERROR]    An error occurred while transferring artifact packed: osgi.bundle,org.eclipse.xtext,2.5.2.v201402120812 from repository http://m.g
.w.net:8084/nexus/content/repositories/eclipse.xtext:
[ERROR]       Artifact not found: http://m.g.w.net:8084/nexus/content/repositories/eclipse.xtext/plugins/org.eclipse.xtext_2.5.2.v201402
120812.jar.pack.gz.
[ERROR]    An error occurred while transferring artifact canonical: osgi.bundle,org.eclipse.xtext,2.5.2.v201402120812 from repository http://m.
g.w.net:8084/nexus/content/repositories/eclipse.xtext:
[ERROR]       Artifact not found: http://m.g.w.net:8084/nexus/content/repositories/eclipse.xtext/plugins/org.eclipse.xtext_2.5.2.v201402
120812.jar.
[ERROR] Internal error: org.eclipse.tycho.repository.local.MirroringArtifactProvider$MirroringFailedException: Could not mirror artifact osgi.bundle,o
rg.eclipse.xtext,2.5.2.v201402120812 into the local Maven repository.See log output for details. http://m.g.w.net:8084/nexus/content/rep
ositories/eclipse.xtext/plugins/org.eclipse.xtext_2.5.2.v201402120812.jar.pack.gz -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: org.eclipse.tycho.repository.local.MirroringArtifactProvider$MirroringFailedException: Could
not mirror artifact osgi.bundle,org.eclipse.xtext,2.5.2.v201402120812 into the local Maven repository.See log output for details.
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.eclipse.tycho.repository.local.MirroringArtifactProvider$MirroringFailedException: Could not mirror artifact osgi.bundle,org.eclipse.xt
ext,2.5.2.v201402120812 into the local Maven repository.See log output for details.
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadArtifact(MirroringArtifactProvider.java:217)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.makeOneFormatLocallyAvailable(MirroringArtifactProvider.java:202)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.makeLocallyAvailable(MirroringArtifactProvider.java:173)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.getArtifactFile(MirroringArtifactProvider.java:117)
        at org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProvider.getArtifactFile(CompositeArtifactProvider.java:70)
        at org.eclipse.tycho.p2.target.TargetPlatformImpl.getLocalArtifactFile(TargetPlatformImpl.java:167)
        at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.toResolutionResult(P2ResolverImpl.java:162)
        at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:140)
        at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:87)
        at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:369)
        at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:345)
        at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:109)
        at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:75)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        ... 11 more
Caused by: java.io.FileNotFoundException: http://m.g.w.net:8084/nexus/content/repositories/eclipse.xtext/plugins/org.eclipse.xtext_2.5.2
.v201402120812.jar.pack.gz
        at org.eclipse.equinox.internal.p2.transport.ecf.RepositoryStatusHelper.checkFileNotFound(RepositoryStatusHelper.java:297)
        at org.eclipse.equinox.internal.p2.transport.ecf.FileReader.checkException(FileReader.java:474)
        at org.eclipse.equinox.internal.p2.transport.ecf.FileReader.sendRetrieveRequest(FileReader.java:431)
        at org.eclipse.equinox.internal.p2.transport.ecf.FileReader.readInto(FileReader.java:355)
        at org.eclipse.equinox.internal.p2.transport.ecf.RepositoryTransport.download(RepositoryTransport.java:101)
        at org.eclipse.equinox.internal.p2.transport.ecf.RepositoryTransport.download(RepositoryTransport.java:156)
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:668)
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:590)
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:723)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromOneMirror(RepositoryArtifactProvider.java
:209)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnyMirror(RepositoryArtifactProvider.java
:192)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.access$1(RepositoryArtifactProvider.java:187)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider$1.perform(RepositoryArtifactProvider.java:167)
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:707)
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifacts(SimpleArtifactRepository.java:778)
        at org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getArtifacts(CompositeArtifactRepository.java:342)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnyChildRepository(RepositoryArtifactProv
ider.java:179)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnyFormatAvailableInRepository(Repository
ArtifactProvider.java:149)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnySource(RepositoryArtifactProvider.java
:135)
        at org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProviderBaseImpl.getArtifact(CompositeArtifactProviderBaseImpl.java:
50)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadCanonicalArtifact(MirroringArtifactProvider.java:235)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadMostSpecificNeededFormatOfArtifact(MirroringArtifactProvider.java:228)

        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadArtifact(MirroringArtifactProvider.java:213)
        ... 25 more
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException



Parent pom.xml:
...
<groupId>com.my.ba</groupId>
<artifactId>com.my.ba.generator</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>BA DSL/BAM Generator Module</name>

<modules>
	<module>../com.my.ba.dsl</module>
	<module>../com.my.ba.bam</module>
	<module>../com.my.ba.dsl.ui</module>
	<module>../com.my.ba.dsl.tests</module>
</modules>

<repositories>
 	<repository>
		<id>p2public</id>
		<url>http://localhost:8081/nexus/content/groups/p2.repositories</url>
		<layout>p2</layout>
	</repository>
</repositories>

<properties>
	<tycho.version>0.19.0</tycho.version>
	<xtext-maven-plugin.version>2.5.0</xtext-maven-plugin.version>
	<maven-clean-plugin.version>2.4.1</maven-clean-plugin.version>
	<compilerSourceLevel.version>1.6</compilerSourceLevel.version>
	<compilerTargetLevel.version>1.6</compilerTargetLevel.version>
</properties>

<build>
	<plugins>

		<plugin>
			<groupId>org.eclipse.tycho</groupId>
			<artifactId>tycho-maven-plugin</artifactId>
			<extensions>true</extensions>
			<version>${tycho.version}</version>
		</plugin>

		<plugin>
			<groupId>org.eclipse.tycho</groupId>
			<artifactId>target-platform-configuration</artifactId>
			<version>${tycho.version}</version>
			<configuration>
				<resolver>p2</resolver>
				<environments>
					<environment>
						<os>linux</os>
						<ws>gtk</ws>
						<arch>x86</arch>
					</environment>
					<environment>
						<os>linux</os>
						<ws>gtk</ws>
						<arch>x86_64</arch>
					</environment>
					<environment>
						<os>win32</os>
						<ws>win32</ws>
						<arch>x86</arch>
					</environment>
					<environment>
						<os>win32</os>
						<ws>win32</ws>
						<arch>x86_64</arch>
					</environment>
					<environment>
						<os>macosx</os>
						<ws>cocoa</ws>
						<arch>x86_64</arch>
					</environment>
				</environments>
			</configuration>
		</plugin>
	</plugins>
...
<build>


DSL Module pom.xml:
...
<parent>
	<relativePath>../com.my.ba.generator/pom.xml</relativePath>
	<groupId>com.my.ba</groupId>
	<artifactId>com.my.ba.generator</artifactId>
	<version>1.0.0</version>
</parent>

<artifactId>com.my.ba.dsl</artifactId>
<name>BA DSL Module</name>
<packaging>eclipse-plugin</packaging>

<build>
	<sourceDirectory>src</sourceDirectory>

	<resources>
		<resource>
			<directory>src</directory>
			<includes>
				<include>**/*.xtext</include>
			</includes>
		</resource>
	</resources>

	<plugins>
		<plugin>
			<artifactId>maven-clean-plugin</artifactId>
			<version>${maven-clean-plugin.version}</version>
			<configuration>
				<filesets>
					<fileset>
						<directory>src-gen</directory>
						<includes>
							<include>**</include>
						</includes>
					</fileset>
					<fileset>
						<directory>src/main</directory>
						<includes>
							<include>**/**</include>
						</includes>
					</fileset>
					<fileset>
						<directory>xtend-gen</directory>
						<includes>
							<include>**/**</include>
						</includes>
					</fileset>
				</filesets>
			</configuration>
		</plugin>

		<plugin>
			<groupId>org.codehaus.mojo</groupId>
			<artifactId>build-helper-maven-plugin</artifactId>
			<version>1.8</version>
			<executions>
				<execution>
					<id>add-source</id>
					<phase>generate-sources</phase>
					<goals>
						<goal>add-source</goal>
					</goals>
					<configuration>
						<sources>
							<source>src-gen</source>
							<source>src</source>
							<source>xtend-gen</source>
						</sources>
					</configuration>
				</execution>
			</executions>
		</plugin>

		<plugin>
			<groupId>org.fornax.toolsupport</groupId>
			<artifactId>fornax-oaw-m2-plugin</artifactId>
			<version>3.4.0</version>
			<configuration>
				<workflowEngine>mwe2</workflowEngine>
				<workflowDescriptor>src/com/my/ba/dsl/GenerateTypeModel.mwe2</workflowDescriptor>
			</configuration>
			<executions>
				<execution>
					<phase>generate-sources</phase>
					<goals>
						<goal>run-workflow</goal>
					</goals>
				</execution>
			</executions>
		</plugin>

		<plugin>
			<groupId>org.eclipse.xtend</groupId>
			<artifactId>xtend-maven-plugin</artifactId>
			<version>${xtext-maven-plugin.version}</version>
			<configuration>
				<encoding>Cp1252</encoding>
			</configuration>
			<executions>
				<execution>
					<phase>generate-sources</phase>
					<goals>
						<goal>compile</goal>
					</goals>
					<configuration>
						<outputDirectory>xtend-gen</outputDirectory>
					</configuration>
				</execution>
			</executions>
		</plugin>
	</plugins>
	...
</build>


BAM Module pom.xml
...
<parent>
	<relativePath>../com.my.ba.generator/pom.xml</relativePath>
	<groupId>com.my.ba</groupId>
	<artifactId>com.my.ba.generator</artifactId>
	<version>1.0.0</version>
</parent>

<artifactId>com.my.ba.bam</artifactId>
<name>BA BAM Module</name>
<packaging>eclipse-plugin</packaging>

<build>
	<resources>
		<resource>
			<directory>src-gen</directory>
			<includes>
				<include>**/*.xml</include>
			</includes>
		</resource>
	</resources>
	
	<sourceDirectory>src</sourceDirectory>

	<plugins>
		<plugin>
			<groupId>org.codehaus.mojo</groupId>
			<artifactId>build-helper-maven-plugin</artifactId>
			<version>1.8</version>
			<executions>
				<execution>
					<id>add-source-xtext</id>
					<phase>generate-sources</phase>
					<goals>
						<goal>add-source</goal>
					</goals>
					<configuration>
						<sources>
							<source>${project.build.directory}/target/xtext-temp</source>
						</sources>
					</configuration>
				</execution>
			</executions>
		</plugin>

		<plugin>
			<groupId>org.eclipse.xtext</groupId>
			<artifactId>xtext-maven-plugin</artifactId>
			<version>${xtext-maven-plugin.version}</version>

			<executions>
				<execution>
					<id>generate-model-artifacts</id>
					<phase>generate-sources</phase>
					<goals>
						<goal>generate</goal>
					</goals>
				</execution>
			</executions>
			
			<configuration>
				<compilerSourceLevel>${compilerSourceLevel.version}</compilerSourceLevel>
				<compilerTargetLevel>${compilerTargetLevel.version}</compilerTargetLevel>

				<languages>
					<language>
						<setup>com.my.ba.dsl.TypeModelStandaloneSetup</setup>
						<outputConfigurations>
							<outputConfiguration>
								<outputDirectory>../com.my.ba.bam/src-gen/</outputDirectory>
								<createOutputDirectory>true</createOutputDirectory>
								<overrideExistingResources>true</overrideExistingResources>
								<cleanUpDerivedResources>true</cleanUpDerivedResources>
							</outputConfiguration>
						</outputConfigurations>
					</language>
				</languages>
			</configuration>

			<dependencies>
				<dependency>
					<groupId>com.my.ba</groupId>
					<artifactId>com.my.ba.dsl</artifactId>
					<version>1.0.0</version>
				</dependency>
			</dependencies>
		</plugin>
	</plugins>

...
</build>

[Updated on: Fri, 14 February 2014 15:35]

Report message to a moderator

Re: Problem with automatic update of a P2 repository [message #1246066 is a reply to message #1245952] Fri, 14 February 2014 17:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13628
Registered: July 2009
Senior Member
We have problems with nexus too. It should be investigated there why
it cannot download / offer the files it has metadata for

As a workaround you could specify a specific Xtext version in the
manifest e.g. [2.5.0,2.5.1)

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Problem with automatic update of a P2 repository [message #1248900 is a reply to message #1246066] Mon, 17 February 2014 19:34 Go to previous messageGo to next message
Adrian Pollak is currently offline Adrian PollakFriend
Messages: 27
Registered: August 2013
Junior Member
Hello Christian,

thank you for your help.

Through your advice I managed it to get the maven build run without errors.

But when I turn to the eclipse IDE and try to Run As... MWE2 Workflow the mwe2 file I get the following eclipse error: "Please put bundle 'org.eclipse.emf.mwe2.launch' on your project's classpath."

Is there a way to combine both worlds?
Preferable by only adapting the MANIFEST.MF file.

The MANIFEST.MF from the DSL Module:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.my.ba.dsl
Bundle-Vendor: My Company
Bundle-Version: 1.0.0
Bundle-SymbolicName: com.my.ba.dsl; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext;bundle-version="[2.4.2,2.5.1)";visibility:=reexport,
 org.eclipse.xtext.xbase;bundle-version="[2.4.2,2.5.1)";resolution:=optional;visibility:=reexport,
 org.eclipse.xtext.xbase.lib;bundle-version="[2.4.2,2.5.1)",
 org.eclipse.xtext.generator;bundle-version="[2.4.2,2.5.1)";resolution:=optional,
 org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional,
 org.eclipse.emf.codegen.ecore;bundle-version="2.9.0";resolution:=optional,
 org.eclipse.emf.codegen;bundle-version="2.9.0",
 org.eclipse.emf.mwe.utils;bundle-version="1.3.0";resolution:=optional,
 org.eclipse.emf.mwe.core;bundle-version="1.2.1",
 org.eclipse.emf.mwe2.launch;bundle-version="[2.4.2,2.5.1)";resolution:=optional,
 org.eclipse.emf.mwe2.lib;bundle-version="[2.4.2,2.5.1)",
 org.eclipse.emf.mwe2.language;bundle-version="[2.4.2,2.5.1)";resolution:=optional,
 org.eclipse.xtext.util;bundle-version="[2.4.2,2.5.1)",
 org.eclipse.emf.ecore;bundle-version="2.9.0",
 org.eclipse.emf.common;bundle-version="2.9.1",
 org.antlr.runtime;bundle-version="3.2.0",
 org.eclipse.xtend.lib;bundle-version="[2.4.2,2.5.1)",
 org.eclipse.xtext.smap;bundle-version="[2.4.2,2.5.1)",
 org.eclipse.xtext.common.types;bundle-version="[2.4.2,2.5.1)"
Import-Package: org.apache.log4j,
 org.eclipse.xtext.xbase.lib;bundle-version="[2.4.2,2.5.1)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: com.my.ba.dsl,
 com.my.ba.dsl.services,
 com.my.ba.dsl.model,
 com.my.ba.dsl.model.impl,
 com.my.ba.dsl.model.util,
 com.my.ba.dsl.serializer,
 com.my.ba.dsl.parser.antlr,
 com.my.ba.dsl.parser.antlr.internal,
 com.my.ba.dsl.validation,
 com.my.ba.dsl.scoping,
 com.my.ba.dsl.generator,
 com.my.ba.dsl.formatting
Re: Problem with automatic update of a P2 repository [message #1248933 is a reply to message #1248900] Mon, 17 February 2014 20:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13628
Registered: July 2009
Senior Member
the error message is clear, so add a dependency to mwe.launch

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
icon5.gif  Re: Problem with automatic update of a P2 repository [message #1248959 is a reply to message #1248933] Mon, 17 February 2014 20:59 Go to previous messageGo to next message
Adrian Pollak is currently offline Adrian PollakFriend
Messages: 27
Registered: August 2013
Junior Member
How and where can I add the dependency?
Re: Problem with automatic update of a P2 repository [message #1248963 is a reply to message #1248959] Mon, 17 February 2014 21:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13628
Registered: July 2009
Senior Member
in the manifest?!? under required bundles?!?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Problem with automatic update of a P2 repository [message #1248967 is a reply to message #1248963] Mon, 17 February 2014 21:07 Go to previous messageGo to next message
Adrian Pollak is currently offline Adrian PollakFriend
Messages: 27
Registered: August 2013
Junior Member
As shown in the MANIFEST.MF I already added the mwe2.launch dependency:
org.eclipse.emf.mwe2.launch;bundle-version="[2.4.2,2.5.1)";resolution:=optional,

But through the bundle-version restriction eclipse gets confused.
Re: Problem with automatic update of a P2 repository [message #1248996 is a reply to message #1248967] Mon, 17 February 2014 21:50 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13628
Registered: July 2009
Senior Member
I don't understand this. I thought you use the same target platform
in your eclipse and in the build. At least you should

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Problem with automatic update of a P2 repository [message #1249804 is a reply to message #1248996] Tue, 18 February 2014 16:52 Go to previous messageGo to next message
Adrian Pollak is currently offline Adrian PollakFriend
Messages: 27
Registered: August 2013
Junior Member
To make it more clear:

I'm using a Nexus that has the problem that it is not able to make updates to P2 repositories when a new Xtext version is available. This problem belongs to a missing Nexus capability (bug).

So the only Xtext version available by the Nexus is the one that was available on the first access when the P2 repository was created. In my case it was 2.5.1.
The actual Xtext version is 2.5.2. So I had to put the "bundel-version="[2.4.2,2.5.1]" restriction to the manifest file to get a proper Maven build.

The problem I suffered then was that eclipse does not get along with this restriction.
I also used the Xtext version 2.5.1 within eclipse but I was not able to use the "Run As... MWE2 Workflow" functionality.

But I found the reason for the problem. Eclipse does not process the included version 2.5.1. So I changed the bundle version to the next higher version 2.5.2 and excluded it ("bundel-version="[2.4.2,2.5.2)"). Now everything is ok.

By the way:
It is interesting that the manifest file has to be extended by several libraries (e.g. org.eclipse.emf.mwe2.language) and its version restrictions when starting from an Xtext generated eclipse manifest file (see code snippet).
If I don't do this the Maven build tries to get the newest library for one of the extended libraries what then leads again to a download of the newest libraries (e.g. "org.eclipse.xtext.xbase.lib") from the Nexus.

Adapted MANIFEST.MF file
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.my.ba.dsl
Bundle-Vendor: My Company
Bundle-Version: 1.0.0
Bundle-SymbolicName: com.my.ba.dsl; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext;bundle-version="[2.4.2,2.5.2)";visibility:=reexport,
 org.eclipse.xtext.xbase;bundle-version="[2.4.2,2.5.2)";resolution:=optional;visibility:=reexport,
 org.eclipse.xtext.xbase.lib;bundle-version="[2.4.2,2.5.2)",
 org.eclipse.xtext.generator;bundle-version="[2.4.2,2.5.2)";resolution:=optional,
 org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional,
 org.eclipse.emf.codegen.ecore;bundle-version="2.9.0";resolution:=optional,
 org.eclipse.emf.codegen;bundle-version="2.9.0",
 org.eclipse.emf.mwe.utils;bundle-version="1.3.0";resolution:=optional,
 org.eclipse.emf.mwe.core;bundle-version="1.2.1",
 org.eclipse.emf.mwe2.launch;bundle-version="[2.4.2,2.5.2)";resolution:=optional,
 org.eclipse.emf.mwe2.lib;bundle-version="[2.4.2,2.5.2)",
 org.eclipse.emf.mwe2.language;bundle-version="[2.4.2,2.5.2)";resolution:=optional,
 org.eclipse.xtext.util;bundle-version="[2.4.2,2.5.2)",
 org.eclipse.emf.ecore;bundle-version="2.9.1",
 org.eclipse.emf.common;bundle-version="2.9.1",
 org.antlr.runtime;bundle-version="3.2.0",
 org.eclipse.xtend.lib;bundle-version="[2.4.2,2.5.2)",
 org.eclipse.xtext.smap;bundle-version="[2.4.2,2.5.2)",
 org.eclipse.xtext.common.types;bundle-version="[2.4.2,2.5.2)"
Import-Package: org.apache.log4j,
 org.eclipse.xtext.xbase.lib;bundle-version="[2.4.2,2.5.2)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: com.my.ba.dsl,
 com.my.ba.dsl.services,
 com.my.ba.dsl.model,
 com.my.ba.dsl.model.impl,
 com.my.ba.dsl.model.util,
 com.my.ba.dsl.serializer,
 com.my.ba.dsl.parser.antlr,
 com.my.ba.dsl.parser.antlr.internal,
 com.my.ba.dsl.validation,
 com.my.ba.dsl.scoping,
 com.my.ba.dsl.generator,
 com.my.ba.dsl.formatting



MANIFEST.MF file when creating Xtext project from within eclipse
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.my.ba.dsl
Bundle-Vendor: My Company
Bundle-Version: 1.0.0
Bundle-SymbolicName: com.my.ba.dsl; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext;visibility:=reexport,
 org.eclipse.xtext.xbase;resolution:=optional;visibility:=reexport,
 org.eclipse.xtext.generator;resolution:=optional,
 org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional,
 org.eclipse.emf.codegen.ecore;resolution:=optional,
 org.eclipse.emf.mwe.utils;resolution:=optional,
 org.eclipse.emf.mwe2.launch;resolution:=optional,
 org.eclipse.xtext.util,
 org.eclipse.emf.ecore,
 org.eclipse.emf.common,
 org.antlr.runtime,
 org.eclipse.xtext.common.types
Import-Package: org.apache.log4j,
 org.eclipse.xtext.xbase.lib
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: com.my.ba.dsl,
 com.my.ba.dsl.services,
 com.my.ba.dsl.model,
 com.my.ba.dsl.model.impl,
 com.my.ba.dsl.model.util,
 com.my.ba.dsl.serializer,
 com.my.ba.dsl.parser.antlr,
 com.my.ba.dsl.parser.antlr.internal,
 com.my.ba.dsl.validation,
 com.my.ba.dsl.scoping,
 com.my.ba.dsl.generator,
 com.my.ba.dsl.formatting


[Updated on: Tue, 18 February 2014 16:53]

Report message to a moderator

Re: Problem with automatic update of a P2 repository [message #1265838 is a reply to message #1249804] Thu, 06 March 2014 16:20 Go to previous message
Adrian Pollak is currently offline Adrian PollakFriend
Messages: 27
Registered: August 2013
Junior Member
An addition/remark:

I get a further problem because of an update of the Eclipse Kepler P2 libraries.

I found out that the nexus sets a standard parameter (Artifact Max Age = -1) which prevents the update of the downloaded jars.

Setting the "Artifact Max Age" to an positive value leads to the necessary update!

Nexus configuration:
index.php/fa/17660/0/
Previous Topic:XbaseInterpreter evaluation
Next Topic:Null-Pointer-Exception in EMFGeneratorFragment
Goto Forum:
  


Current Time: Wed Oct 21 11:36:53 GMT 2020

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

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

Back to the top