Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext project build with Maven Tycho
Xtext project build with Maven Tycho [message #1730035] Thu, 21 April 2016 06:26 Go to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Hi guys!

I developed my own DSL project using Xtext and now I want to release them so the installation of my DSL plugin can be easily installed via an updated site.

https://eclipse.org/Xtext/documentation/350_continuous_integration.html#an-overview-of-the-example-projects
I came across this tutorial site but i think i needed some more guidance on how to setup and build my DSL project. I am currently using Xtext 2.9.1 and so the Maven build is auto-generated.

After i build my DSL project with Maven build system with Plain Layout, In that tutorial where they explain Maven and Tycho, they included an example with releng and updatesite project and etc. Is it some thing that i need to setup myself?

My goal is to setup and build my DSL plugin so it can be installed via an updated site. It would be a huge help for me if anyone could provide me a simple step explanation or any information regarding the direction I should go for.

Any help is greatly appreciated. Thanks in advance!
Re: Xtext project build with Maven Tycho [message #1730036 is a reply to message #1730035] Thu, 21 April 2016 06:41 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13186
Registered: July 2009
Senior Member
yes as of 2.9l.x you have to build it yourself. a better wizard for that will come with 2.10.x
but you can let you inspire by https://gitlab.com/cdietrich/xtext-maven-example


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext project build with Maven Tycho [message #1730038 is a reply to message #1730035] Thu, 21 April 2016 06:40 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1754
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 21/04/2016 08:26, Han Li Koay wrote:
> Hi guys!
>
> I developed my own DSL project using Xtext and now I want to release
> them so the installation of my DSL plugin can be easily installed via an
> updated site.
> https://eclipse.org/Xtext/documentation/350_continuous_integration.html#an-overview-of-the-example-projects
>
> I came across this tutorial site but i think i needed some more guidance
> on how to setup and build my DSL project. I am currently using Xtext
> 2.9.1 and so the Maven build is auto-generated.
> After i build my DSL project with Maven build system with Plain Layout,
> In that tutorial where they explain Maven and Tycho, they included an
> example with releng and updatesite project and etc. Is it some thing
> that i need to setup myself?
> My goal is to setup and build my DSL plugin so it can be installed via
> an updated site. It would be a huge help for me if anyone could provide
> me a simple step explanation or any information regarding the direction
> I should go for.
> Any help is greatly appreciated. Thanks in advance!

Hi

if you install Xtext 2.10 nightly, the project wizard lets you create
also an update site project and a feature project; if you selected Maven
as the build system, it will also generate the configurations for
building the update site during the build. You could install 2.10 from
the Xtext nightly update site and generate a new project, and then copy
and adapt the feature and the update site projects into your project.

cheers
Lorenzo

--
Prof. Lorenzo Bettini, Computer Science, DISIA, Univ. Firenze
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Xtext project build with Maven Tycho [message #1730043 is a reply to message #1730036] Thu, 21 April 2016 07:07 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Hi Christian and Lorenzo!

Thanks for the prompt response! Really appreciate it. I will go try it now. Smile

Thanks
Hanli Smile
Re: Xtext project build with Maven Tycho [message #1730065 is a reply to message #1730043] Thu, 21 April 2016 08:53 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Hi, i have a problem. I installed Xtext 2.10 nightly and create an update site project and a feature project for me. Then, i run my project using Maven Build without changing anything. But i got this error:

[INFO] Scanning for projects...
[ERROR] Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact hanlikoay.upfeditor.upf:hanlikoay.upfeditor.upf.target:target:1.0.0-SNAPSHOT -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact hanlikoay.upfeditor.upf:hanlikoay.upfeditor.upf.target:target:1.0.0-SNAPSHOT
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.RuntimeException: Could not resolve target platform specification artifact hanlikoay.upfeditor.upf:hanlikoay.upfeditor.upf.target:target:1.0.0-SNAPSHOT
	at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.addTargetArtifact(DefaultTargetPlatformConfigurationReader.java:389)
	at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.setTarget(DefaultTargetPlatformConfigurationReader.java:342)
	at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.getTargetPlatformConfiguration(DefaultTargetPlatformConfigurationReader.java:75)
	at org.eclipse.tycho.core.resolver.DefaultTychoResolver.setupProject(DefaultTychoResolver.java:86)
	at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:90)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	... 11 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


May i know what am i missing?

Thanks
Hanli Smile
Re: Xtext project build with Maven Tycho [message #1730069 is a reply to message #1730065] Thu, 21 April 2016 09:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13186
Registered: July 2009
Senior Member
how did you call maven? inside the parent?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext project build with Maven Tycho [message #1730071 is a reply to message #1730069] Thu, 21 April 2016 09:13 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Here is the pom file in my parent project.

<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>hanlikoay.upfeditor.upf</groupId>
	<version>1.0.0-SNAPSHOT</version>
	<artifactId>hanlikoay.upfeditor.upf.parent</artifactId>
	<packaging>pom</packaging>

	<properties>
		<tycho-version>0.23.1</tycho-version>
		<xtextVersion>2.10.0-SNAPSHOT</xtextVersion>
		<project.build.sourceEncoding>windows-1252</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>
	<modules>
		<module>hanlikoay.upfeditor.upf</module>
		<module>hanlikoay.upfeditor.upf.ide</module>
		<module>hanlikoay.upfeditor.upf.ui</module>
		<module>hanlikoay.upfeditor.upf.target</module>
		<module>hanlikoay.upfeditor.upf.feature</module>
		<module>hanlikoay.upfeditor.upf.repository</module>
		<module>hanlikoay.upfeditor.upf.tests</module>
		<module>hanlikoay.upfeditor.upf.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>tycho-source-plugin</artifactId>
				<version>${tycho-version}</version>
				<executions>
					<execution>
						<id>plugin-source</id>
						<goals>
							<goal>plugin-source</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho.extras</groupId>
				<artifactId>tycho-source-feature-plugin</artifactId>
				<version>${tycho-version}</version>
				<executions>
					<execution>
						<id>source-feature</id>
						<phase>package</phase>
						<goals>
							<goal>source-feature</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-p2-plugin</artifactId>
				<version>${tycho-version}</version>
				<executions>
					<execution>
						<id>attach-p2-metadata</id>
						<phase>package</phase>
						<goals>
							<goal>p2-metadata</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>target-platform-configuration</artifactId>
				<version>${tycho-version}</version>
				<configuration>
					<target>
						<artifact>
							<groupId>hanlikoay.upfeditor.upf</groupId>
							<artifactId>hanlikoay.upfeditor.upf.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>
		<repository>
			<id>sonatype-snapshots</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<releases><enabled>false</enabled></releases>
			<snapshots><enabled>true</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>
		<pluginRepository>
			<id>sonatype-snapshots</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<releases><enabled>false</enabled></releases>
			<snapshots><enabled>true</enabled></snapshots>
		</pluginRepository>
	</pluginRepositories>

	<dependencies>
	</dependencies>
</project>
Re: Xtext project build with Maven Tycho [message #1730073 is a reply to message #1730071] Thu, 21 April 2016 09:23 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13186
Registered: July 2009
Senior Member
How and where do you execute maven

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext project build with Maven Tycho [message #1730077 is a reply to message #1730073] Thu, 21 April 2016 09:37 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
I click on my main language project and run as Maven build. (I don't know how to execute the Maven so i just playing around)

Here is my project structure
hanlikoay.upfeditor.upf
hanlikoay.upfeditor.upf.feature
hanlikoay.upfeditor.upf.ide
hanlikoay.upfeditor.upf.parent
hanlikoay.upfeditor.upf.respository
hanlikoay.upfeditor.upf.target
hanlikoay.upfeditor.upf.tests
hanlikoay.upfeditor.upf.ui
hanlikoay.upfeditor.upf.ui.tests

Thanks
Hanli Smile
Re: Xtext project build with Maven Tycho [message #1730078 is a reply to message #1730077] Thu, 21 April 2016 09:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13186
Registered: July 2009
Senior Member
Run inside parent

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext project build with Maven Tycho [message #1730106 is a reply to message #1730078] Thu, 21 April 2016 11:52 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Thanks alot. i tried by executing maven install and the build is success.

But, I do not know how to use Maven-tycho to create the update site or even a complete product or where do i actually configure my URL of my site. (I am extremely new to Maven-tycho. Sorry if the question seems stupid)

I stumbled across this tutorial but i still don't understand the "Set up your update site" part:
http://www.schakko.de/2013/02/13/build-and-deploy-your-xtext-dsl-with-maven-tycho/

Is the steps in this tutorial link correct?

Thanks
Hanli Smile
Re: Xtext project build with Maven Tycho [message #1730110 is a reply to message #1730106] Thu, 21 April 2016 12:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13186
Registered: July 2009
Senior Member
tycho can create update sites (based on feature) and products. my maven example shows that

- https://gitlab.com/cdietrich/xtext-maven-example/tree/master/org.xtext.example.demodsl.sdk (for the feature)
- https://gitlab.com/cdietrich/xtext-maven-example/tree/master/org.xtext.example.demodsl.p2repo (for the p2 repo)
- https://gitlab.com/cdietrich/xtext-maven-example/tree/master/org.xtext.example.demodsl.product (for the product)

just from oversight yes.

deploying it into a webserver / repository etc is a different topic and depends highly on the "where to deploy to"
this is why "there is no url"


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext project build with Maven Tycho [message #1730112 is a reply to message #1730110] Thu, 21 April 2016 12:25 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
I see. That's why there is no url yet because I haven't publish/deploy my DSL project as a p2 repository.

Can i know what should i do from now on if i wanted to publish it so it can be installed via a url?

Thanks
Hanli Smile
Re: Xtext project build with Maven Tycho [message #1730114 is a reply to message #1730112] Thu, 21 April 2016 12:34 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13186
Registered: July 2009
Senior Member
answer the question about the "where" first and then Google how to upload stuff to "where" with maven
e.g. antrun src, mvn deploy into Nexus + Nexus unzip plugin + ....


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext project build with Maven Tycho [message #1730162 is a reply to message #1730114] Fri, 22 April 2016 00:11 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Thanks Christian! I will try to work on that. Really appreciate all your help.

Thanks
Hanli Smile
Re: Xtext project build with Maven Tycho [message #1730252 is a reply to message #1730112] Fri, 22 April 2016 15:42 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1754
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 21/04/2016 14:25, Han Li Koay wrote:
> I see. That's why there is no url yet because I haven't publish/deploy
> my DSL project as a p2 repository.
> Can i know what should i do from now on if i wanted to publish it so it
> can be installed via a url?
>
> Thanks
> Hanli :)

I published a few blog posts on how to publish p2 repositories on some
free services:

Sourceforge:
http://www.lorenzobettini.it/2015/01/publish-an-eclipse-p2-repository-on-sourceforge-with-rsync/

Bintray:
http://www.lorenzobettini.it/2016/02/publish-an-eclipse-p2-composite-repository-on-bintray/

--
Prof. Lorenzo Bettini, Computer Science, DISIA, Univ. Firenze
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Xtext project build with Maven Tycho [message #1730298 is a reply to message #1730252] Sun, 24 April 2016 03:08 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Thanks a lot for the amazing blog post, Lorenzo!
Will try on it later today Smile

Thanks
Hanli Smile
Re: Xtext project build with Maven Tycho [message #1730332 is a reply to message #1730298] Mon, 25 April 2016 05:56 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Hi Lorenzo,

Another quick question! I decided to publish my p2 repository using bintray. The p2 repository of my xtext project are built automatically using xtext 2.10.0 nightly version.

When i read through your blog post I realize that i need to create composite repositories for my project before I can proceed, is that correct? With that, I shall follow this blog post of yours. http://www.lorenzobettini.it/2015/01/creating-p2-composite-repositories-during-the-build/

Is that the direction i should go?

Thanks
Hanli Smile

[Updated on: Mon, 25 April 2016 06:00]

Report message to a moderator

Re: Xtext project build with Maven Tycho [message #1730397 is a reply to message #1730332] Mon, 25 April 2016 12:52 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Han Li Koay wrote on Mon, 25 April 2016 05:56
Hi Lorenzo,

Another quick question! I decided to publish my p2 repository using bintray. The p2 repository of my xtext project are built automatically using xtext 2.10.0 nightly version.

When i read through your blog post I realize that i need to create composite repositories for my project before I can proceed, is that correct? With that, I shall follow this blog post of yours. http://www.lorenzobettini.it/2015/01/creating-p2-composite-repositories-during-the-build/

Is that the direction i should go?

Thanks
Hanli Smile


I used your p2-composite.bintray-example and changed a few properties.
- In pom.xml, I replaced the value of bintray.repo, bintray.package and site.label
- In bintray.ant, I set the bintray.user, bintray.repo, bintray.apikey and bintray.package here just for convenience for testing (I will change it not to be public once this is working)

However, everything works fine except for p2composite.example.site.

Here is the error:
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[INFO] Computing target platform for MavenProject: p2composite.example:p2composite.example.plugin:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\p2composite.example.plugin\pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/releases/mars/ (0B at 0B/s)
[INFO] Adding repository http://download.eclipse.org/releases/mars
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/mars/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/releases/mars/201506241002/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/releases/mars/201510021000/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/releases/mars/201602261000/ (0B at 0B/s)
[INFO] Resolving dependencies of MavenProject: p2composite.example:p2composite.example.plugin:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\p2composite.example.plugin\pom.xml
[INFO] Resolving class path of MavenProject: p2composite.example:p2composite.example.plugin:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\p2composite.example.plugin\pom.xml
[INFO] Computing target platform for MavenProject: p2composite.example:p2composite.example.feature:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\p2composite.example.feature\pom.xml
[INFO] Resolving dependencies of MavenProject: p2composite.example:p2composite.example.feature:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\p2composite.example.feature\pom.xml
[INFO] Resolving class path of MavenProject: p2composite.example:p2composite.example.feature:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\p2composite.example.feature\pom.xml
[INFO] Computing target platform for MavenProject: p2composite.example:p2composite.example.site:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\p2composite.example.site\pom.xml
[INFO] Resolving dependencies of MavenProject: p2composite.example:p2composite.example.site:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\p2composite.example.site\pom.xml
[INFO] Resolving class path of MavenProject: p2composite.example:p2composite.example.site:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\p2composite.example.site\pom.xml
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] p2composite.example.tycho
[INFO] p2composite.example.plugin
[INFO] p2composite.example.feature
[INFO] p2composite.example.site
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building p2composite.example.tycho 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ p2composite.example.tycho ---
[INFO] 
[INFO] --- tycho-source-plugin:0.22.0:plugin-source (plugin-source) @ p2composite.example.tycho ---
[INFO] 
[INFO] --- tycho-source-feature-plugin:0.22.0:source-feature (source-feature) @ p2composite.example.tycho ---
[INFO] 
[INFO] --- tycho-p2-plugin:0.22.0:p2-metadata (attach-p2-metadata) @ p2composite.example.tycho ---
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building p2composite.example.plugin 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ p2composite.example.plugin ---
[INFO] Deleting D:\Users\Acer\workspace\p2composite.example.plugin\target
[INFO] 
[INFO] --- tycho-packaging-plugin:0.22.0:build-qualifier (default-build-qualifier) @ p2composite.example.plugin ---
[INFO] The project's OSGi version is 1.0.0.v20160425-1243
[INFO] 
[INFO] --- tycho-packaging-plugin:0.22.0:validate-id (default-validate-id) @ p2composite.example.plugin ---
[INFO] 
[INFO] --- tycho-packaging-plugin:0.22.0:validate-version (default-validate-version) @ p2composite.example.plugin ---
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ p2composite.example.plugin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Users\Acer\workspace\p2composite.example.plugin\src\main\resources
[INFO] 
[INFO] --- tycho-compiler-plugin:0.22.0:compile (default-compile) @ p2composite.example.plugin ---
[INFO] Compiling 2 source files to D:\Users\Acer\workspace\p2composite.example.plugin\target\classes
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ p2composite.example.plugin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Users\Acer\workspace\p2composite.example.plugin\src\test\resources
[INFO] 
[INFO] --- tycho-source-plugin:0.22.0:plugin-source (plugin-source) @ p2composite.example.plugin ---
[WARNING] bundle localization file D:\Users\Acer\workspace\p2composite.example.plugin\plugin.properties not found
[INFO] Building jar: D:\Users\Acer\workspace\p2composite.example.plugin\target\p2composite.example.plugin-1.0.0-SNAPSHOT-sources.jar
[INFO] 
[INFO] --- target-platform-configuration:0.22.0:target-platform (default-target-platform) @ p2composite.example.plugin ---
[INFO] 
[INFO] --- tycho-packaging-plugin:0.22.0:package-plugin (default-package-plugin) @ p2composite.example.plugin ---
[INFO] Building jar: D:\Users\Acer\workspace\p2composite.example.plugin\target\p2composite.example.plugin-1.0.0-SNAPSHOT.jar
[INFO] 
[INFO] --- tycho-p2-plugin:0.22.0:p2-metadata-default (default-p2-metadata-default) @ p2composite.example.plugin ---
[INFO] 
[INFO] --- tycho-source-feature-plugin:0.22.0:source-feature (source-feature) @ p2composite.example.plugin ---
[INFO] 
[INFO] --- tycho-p2-plugin:0.22.0:p2-metadata (attach-p2-metadata) @ p2composite.example.plugin ---
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building p2composite.example.feature 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ p2composite.example.feature ---
[INFO] Deleting D:\Users\Acer\workspace\p2composite.example.feature\target
[INFO] 
[INFO] --- tycho-packaging-plugin:0.22.0:build-qualifier-aggregator (default-build-qualifier-aggregator) @ p2composite.example.feature ---
[INFO] The project's OSGi version is 1.0.0.v20160425-1243
[INFO] 
[INFO] --- tycho-packaging-plugin:0.22.0:validate-id (default-validate-id) @ p2composite.example.feature ---
[INFO] 
[INFO] --- tycho-packaging-plugin:0.22.0:validate-version (default-validate-version) @ p2composite.example.feature ---
[INFO] 
[INFO] --- tycho-source-plugin:0.22.0:plugin-source (plugin-source) @ p2composite.example.feature ---
[INFO] 
[INFO] --- target-platform-configuration:0.22.0:target-platform (default-target-platform) @ p2composite.example.feature ---
[INFO] 
[INFO] --- tycho-packaging-plugin:0.22.0:package-feature (default-package-feature) @ p2composite.example.feature ---
[INFO] Building jar: D:\Users\Acer\workspace\p2composite.example.feature\target\p2composite.example.feature-1.0.0-SNAPSHOT.jar
[INFO] 
[INFO] --- tycho-p2-plugin:0.22.0:p2-metadata-default (default-p2-metadata-default) @ p2composite.example.feature ---
[INFO] 
[INFO] --- tycho-p2-plugin:0.22.0:feature-p2-metadata (default-feature-p2-metadata) @ p2composite.example.feature ---
[INFO] 
[INFO] --- tycho-source-feature-plugin:0.22.0:source-feature (source-feature) @ p2composite.example.feature ---
[INFO] Building jar: D:\Users\Acer\workspace\p2composite.example.feature\target\p2composite.example.feature-1.0.0-SNAPSHOT-sources-feature.jar
[INFO] 
[INFO] --- tycho-p2-plugin:0.22.0:p2-metadata (attach-p2-metadata) @ p2composite.example.feature ---
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building p2composite.example.site 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ p2composite.example.site ---
[INFO] Deleting D:\Users\Acer\workspace\p2composite.example.site\target
[INFO] 
[INFO] --- tycho-packaging-plugin:0.22.0:build-qualifier-aggregator (default-build-qualifier-aggregator) @ p2composite.example.site ---
[INFO] The project's OSGi version is 1.0.0.v20160425-1243
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean-1) @ p2composite.example.site ---
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ p2composite.example.site ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Users\Acer\workspace\p2composite.example.site\src\main\resources
[INFO] 
[INFO] --- tycho-source-plugin:0.22.0:plugin-source (plugin-source) @ p2composite.example.site ---
[INFO] 
[INFO] --- maven-antrun-plugin:1.7:run (update-local-repository) @ p2composite.example.site ---
[INFO] Executing tasks

main:

getMajorMinorVersion:

get-composite-metadata:
     [echo] Creating directory target/composite-main...
    [mkdir] Created dir: D:\Users\Acer\workspace\p2composite.example.site\target\composite-main
     [echo] Getting compositeArtifacts.xml from https://dl.bintray.com/hanlikoay/upf-editor/updates into target/composite-main...
      [get] Getting: https://dl.bintray.com/hanlikoay/upf-editor/updates/compositeArtifacts.xml
      [get] To: D:\Users\Acer\workspace\p2composite.example.site\target\composite-main\compositeArtifacts.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/compositeArtifacts.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/compositeArtifacts.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/compositeArtifacts.xml
      [get] Can't get https://dl.bintray.com/hanlikoay/upf-editor/updates/compositeArtifacts.xml to D:\Users\Acer\workspace\p2composite.example.site\target\composite-main\compositeArtifacts.xml
     [echo] Getting compositeContent.xml from https://dl.bintray.com/hanlikoay/upf-editor/updates into target/composite-main...
      [get] Getting: https://dl.bintray.com/hanlikoay/upf-editor/updates/compositeContent.xml
      [get] To: D:\Users\Acer\workspace\p2composite.example.site\target\composite-main\compositeContent.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/compositeContent.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/compositeContent.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/compositeContent.xml
      [get] Can't get https://dl.bintray.com/hanlikoay/upf-editor/updates/compositeContent.xml to D:\Users\Acer\workspace\p2composite.example.site\target\composite-main\compositeContent.xml
     [echo] Creating directory target/composite-child...
    [mkdir] Created dir: D:\Users\Acer\workspace\p2composite.example.site\target\composite-child
     [echo] Getting compositeArtifacts.xml from https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0 into target/composite-child...
      [get] Getting: https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0/compositeArtifacts.xml
      [get] To: D:\Users\Acer\workspace\p2composite.example.site\target\composite-child\compositeArtifacts.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0/compositeArtifacts.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0/compositeArtifacts.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0/compositeArtifacts.xml
      [get] Can't get https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0/compositeArtifacts.xml to D:\Users\Acer\workspace\p2composite.example.site\target\composite-child\compositeArtifacts.xml
     [echo] Getting compositeContent.xml from https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0 into target/composite-child...
      [get] Getting: https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0/compositeContent.xml
      [get] To: D:\Users\Acer\workspace\p2composite.example.site\target\composite-child\compositeContent.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0/compositeContent.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0/compositeContent.xml
      [get] Error opening connection java.io.FileNotFoundException: https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0/compositeContent.xml
      [get] Can't get https://dl.bintray.com/hanlikoay/upf-editor/updates/1.0/compositeContent.xml to D:\Users\Acer\workspace\p2composite.example.site\target\composite-child\compositeContent.xml

preprocess-metadata:
[INFO] Executed tasks
[INFO] 
[INFO] --- target-platform-configuration:0.22.0:target-platform (default-target-platform) @ p2composite.example.site ---
[INFO] 
[INFO] --- tycho-p2-publisher-plugin:0.22.0:publish-products (default-publish-products) @ p2composite.example.site ---
[INFO] 
[INFO] --- tycho-p2-publisher-plugin:0.22.0:publish-categories (default-publish-categories) @ p2composite.example.site ---
[INFO] 
[INFO] --- tycho-p2-publisher-plugin:0.22.0:attach-artifacts (default-attach-artifacts) @ p2composite.example.site ---
[INFO] 
[INFO] --- tycho-p2-repository-plugin:0.22.0:assemble-repository (default-assemble-repository) @ p2composite.example.site ---
[INFO] 
[INFO] --- tycho-p2-repository-plugin:0.22.0:archive-repository (default-archive-repository) @ p2composite.example.site ---
[INFO] Building zip: D:\Users\Acer\workspace\p2composite.example.site\target\p2composite.example.site-1.0.0.v20160425-1243.zip
[INFO] 
[INFO] --- tycho-source-feature-plugin:0.22.0:source-feature (source-feature) @ p2composite.example.site ---
[INFO] 
[INFO] --- tycho-p2-plugin:0.22.0:p2-metadata (attach-p2-metadata) @ p2composite.example.site ---
[INFO] 
[INFO] --- tycho-eclipserun-plugin:0.22.0:eclipse-run (add-p2-composite-repository) @ p2composite.example.site ---
[INFO] Expected eclipse log file: D:\Users\Acer\workspace\p2composite.example.site\target\eclipserun-work\data\.metadata\.log
[INFO] Command line:
	[D:\Program Files\Java\jre1.8.0_73\bin\java.exe, -jar, D:\Users\Acer\.m2\repository\p2\osgi\bundle\org.eclipse.equinox.launcher\1.3.100.v20150511-1540\org.eclipse.equinox.launcher-1.3.100.v20150511-1540.jar, -install, D:\Users\Acer\workspace\p2composite.example.site\target\eclipserun-work, -configuration, D:\Users\Acer\workspace\p2composite.example.site\target\eclipserun-work\configuration, -application, org.eclipse.ant.core.antRunner, -buildfile, packaging-p2composite.ant, p2.composite.add, -Dsite.label=UPF Editor plugin, -Dproject.build.directory=D:\Users\Acer\workspace\p2composite.example.site\target, -DunqualifiedVersion=1.0.0, -DbuildQualifier=v20160425-1243, -Dchild.repository.path.prefix=../../releases/]
Buildfile: packaging-p2composite.ant

getMajorMinorVersion:

compute.child.repository.data:

p2.composite.add:
     [echo]  
     [echo] Composite repository       : D:\Users\Acer\workspace\p2composite.example.site\target\composite-main
     [echo] Composite name             : UPF Editor plugin All Versions
     [echo] Adding child repository    : 1.0
     [echo]  
     [echo] Composite repository       : D:\Users\Acer\workspace\p2composite.example.site\target\composite-child
     [echo] Composite name             : UPF Editor plugin 1.0
     [echo] Adding child repository    : ../../releases/1.0.0.v20160425-1243
BUILD SUCCESSFUL

BUILD SUCCESSFUL
Total time: 1 second
[INFO] 
[INFO] --- maven-antrun-plugin:1.7:run (deploy-repository) @ p2composite.example.site ---
[INFO] Executing tasks

main:

push-to-bintray:

postprocess-metadata:

push-p2-repo-to-bintray:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] p2composite.example.tycho .......................... SUCCESS [  0.066 s]
[INFO] p2composite.example.plugin ......................... SUCCESS [  1.973 s]
[INFO] p2composite.example.feature ........................ SUCCESS [  0.222 s]
[INFO] p2composite.example.site ........................... FAILURE [ 11.689 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.926 s
[INFO] Finished at: 2016-04-25T20:43:58+08:00
[INFO] Final Memory: 86M/261M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (deploy-repository) on project p2composite.example.site: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:96: The following error occurred while executing this line:
[ERROR] D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:103: Execute failed: java.io.IOException: Cannot run program "curl" (in directory "D:\Users\Acer\workspace\p2composite.example.site"): CreateProcess error=2, The system cannot find the file specified
[ERROR] around Ant part ...<ant antfile="D:\Users\Acer\workspace\p2composite.example.site/bintray.ant" target="push-to-bintray"></ant>... @ 4:104 in D:\Users\Acer\workspace\p2composite.example.site\target\antrun\build-main.xml
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (deploy-repository) on project p2composite.example.site: An Ant BuildException has occured: The following error occurred while executing this line:
D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:96: The following error occurred while executing this line:
D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:103: Execute failed: java.io.IOException: Cannot run program "curl" (in directory "D:\Users\Acer\workspace\p2composite.example.site"): CreateProcess error=2, The system cannot find the file specified
around Ant part ...<ant antfile="D:\Users\Acer\workspace\p2composite.example.site/bintray.ant" target="push-to-bintray"></ant>... @ 4:104 in D:\Users\Acer\workspace\p2composite.example.site\target\antrun\build-main.xml
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: The following error occurred while executing this line:
D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:96: The following error occurred while executing this line:
D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:103: Execute failed: java.io.IOException: Cannot run program "curl" (in directory "D:\Users\Acer\workspace\p2composite.example.site"): CreateProcess error=2, The system cannot find the file specified
around Ant part ...<ant antfile="D:\Users\Acer\workspace\p2composite.example.site/bintray.ant" target="push-to-bintray"></ant>... @ 4:104 in D:\Users\Acer\workspace\p2composite.example.site\target\antrun\build-main.xml
	at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:355)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	... 20 more
Caused by: D:\Users\Acer\workspace\p2composite.example.site\target\antrun\build-main.xml:4: The following error occurred while executing this line:
D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:96: The following error occurred while executing this line:
D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:103: Execute failed: java.io.IOException: Cannot run program "curl" (in directory "D:\Users\Acer\workspace\p2composite.example.site"): CreateProcess error=2, The system cannot find the file specified
	at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
	at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:327)
	... 22 more
Caused by: D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:96: The following error occurred while executing this line:
D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:103: Execute failed: java.io.IOException: Cannot run program "curl" (in directory "D:\Users\Acer\workspace\p2composite.example.site"): CreateProcess error=2, The system cannot find the file specified
	at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
	... 33 more
Caused by: D:\Users\Acer\workspace\p2composite.example.site\bintray.ant:103: Execute failed: java.io.IOException: Cannot run program "curl" (in directory "D:\Users\Acer\workspace\p2composite.example.site"): CreateProcess error=2, The system cannot find the file specified
	at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:491)
	at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
	... 46 more
Caused by: java.io.IOException: Cannot run program "curl" (in directory "D:\Users\Acer\workspace\p2composite.example.site"): CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessBuilder.start(Unknown Source)
	at java.lang.Runtime.exec(Unknown Source)
	at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
	at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
	at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
	at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
	at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:410)
	... 59 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
	... 66 more
[ERROR] 
[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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :p2composite.example.site
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0


Here is the the link to my bintray repository and package.
https://bintray.com/hanlikoay/upf-editor/upf-editor-package/view#
I did not do anything more except creating the repository and package in bintray.

I am not sure which part gone wrong? Please help Crying or Very Sad

Thanks
Hanli Smile
Re: Xtext project build with Maven Tycho [message #1730491 is a reply to message #1730397] Tue, 26 April 2016 09:52 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1754
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 25/04/2016 14:52, Han Li Koay wrote:
> Execute failed: java.io.IOException: Cannot run program "curl"

I think the above error says it all ;)

you need to install curl, since that's the program used to perform the
transfer... probably I forgot to mention that in the blog post O:)

cheers
Lorenzo

--
Prof. Lorenzo Bettini, Computer Science, DISIA, Univ. Firenze
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Xtext project build with Maven Tycho [message #1730595 is a reply to message #1730491] Wed, 27 April 2016 04:39 Go to previous messageGo to next message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Cool! I missed that one. Thanks to that I can finally install my project Wink

I have another question. Let's say if my project has a third party dependency which i added under the Require-Bundle of the Manifest file.
(I installed the third party plugin via a update site URL)
How do i set it up in Maven tycho to obtain the dependencies in a Tycho build?

I read through a few tutorial explanation but i still don't really get it.
http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts
http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting

I had been getting the error:
INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: hanlikoay.upfeditor.upf:hanlikoay.upfeditor.upf:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\hanlikoay.upfeditor.upf.parent\hanlikoay.upfeditor.upf\pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/releases/mars/201506241002/ (0B at 0B/s)
[INFO] Adding repository http://download.eclipse.org/releases/mars/201506241002
[INFO] Adding repository http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.1
[INFO] Fetching p2.index from http://download.eclipse.org/modeling/tmf/xtext/updates/nightly/ (0B at 0B/s)
[INFO] Adding repository http://download.eclipse.org/modeling/tmf/xtext/updates/nightly
[INFO] Fetching p2.index from http://download.eclipse.org/modeling/tmf/xtext/updates/nightly/head/ (0B at 0B/s)
[INFO] Resolving dependencies of MavenProject: hanlikoay.upfeditor.upf:hanlikoay.upfeditor.upf:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\hanlikoay.upfeditor.upf.parent\hanlikoay.upfeditor.upf\pom.xml
[INFO] {osgi.os=macosx, osgi.ws=cocoa, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: hanlikoay.upfeditor.upf 1.0.0.qualifier
[ERROR]   Missing requirement: hanlikoay.upfeditor.upf 1.0.0.qualifier requires 'bundle net.sourceforge.plantuml.eclipse 1.1.8' but it could not be found
[ERROR] 
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: hanlikoay.upfeditor.upf:hanlikoay.upfeditor.upf:1.0.0-SNAPSHOT @ D:\Users\Acer\workspace\hanlikoay.upfeditor.upf.parent\hanlikoay.upfeditor.upf\pom.xml: See log for details -> [Help 1]
[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/MavenExecutionException


Thanks
Hanli Smile
Re: Xtext project build with Maven Tycho [message #1730603 is a reply to message #1730595] Wed, 27 April 2016 05:08 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13186
Registered: July 2009
Senior Member
add it to the .target file in the .target project

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext project build with Maven Tycho [message #1730604 is a reply to message #1730603] Wed, 27 April 2016 05:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13186
Registered: July 2009
Senior Member
see http://wiki.eclipse.org/Tycho/Target_Platform as well

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext project build with Maven Tycho [message #1730734 is a reply to message #1730604] Thu, 28 April 2016 06:56 Go to previous message
Han Li Koay is currently offline Han Li KoayFriend
Messages: 25
Registered: February 2016
Junior Member
Thanks Christian! The error is solved with your help!

Really appreciate you and Lorenzo's prompt response to all my questions. Could not thank you guys enough. Smile

Cheers
Hanli Smile
Previous Topic:Parse DSL instances into Resource without Eclipse application
Next Topic:Xtext eclipse plugin
Goto Forum:
  


Current Time: Wed Nov 13 19:45:50 GMT 2019

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

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

Back to the top