Customize root directory name of RCP project build

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Customize root directory name of RCP project build

yuanyun.kenny
Hi, all:

I have a small problem with Tycho. After I ran "mvn package" to build my RCP project, I unzipped it, but found out its root directory name is eclipse[this should be the default name].

This is not I want, each time I distribute it to others, I have to unzip it, rename it and re-zip it. This is a little inconvenient.

so I am wondering whether Tycho allows to customize the root directory name.
I did try Google search, but no luck.

Many thanks for any help: )
Reply | Threaded
Open this post in threaded view
|

RE: Customize root directory name of RCP project build

Tobias Oberlies
This has been implemented in 0.11.0-SNAPSHOT: https://issues.sonatype.org/browse/TYCHO-507

You'll need to build your product not with eclipse-application, but as described here: https://docs.sonatype.org/display/TYCHO/PackagingTypes#PackagingTypes-eclipserepository

To get 0.11.0-SNAPSHOT, use the Maven repository linked here: https://docs.sonatype.org/display/TYCHO/Project+Information


Tobias

-----Original Message-----
From: yuanyun.kenny [mailto:[hidden email]]
Sent: 26 February 2011 16:22
To: [hidden email]
Subject: [Tycho Users] Customize root directory name of RCP project build

Hi, all:

I have a small problem with Tycho. After I ran "mvn package" to build my RCP
project, I unzipped it, but found out its root directory name is
eclipse[this should be the default name].

This is not I want, each time I distribute it to others, I have to unzip it,
rename it and re-zip it. This is a little inconvenient.

so I am wondering whether Tycho allows to customize the root directory name.
I did try Google search, but no luck.

Many thanks for any help: )

--
View this message in context: http://software.2206966.n2.nabble.com/Customize-root-directory-name-of-RCP-project-build-tp6067776p6067776.html
Sent from the Tycho Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

RE: Customize root directory name of RCP project build

yuanyun.kenny
Hi, Tobias:

Many thanks for your reply.

I read these tutorials you provided::
https://docs.sonatype.org/display/TYCHO/ITP04+-+Demo+RCP+Application+and+P2+Updateable+Eclipse+Product
https://docs.sonatype.org/display/TYCHO/PackagingTypes#PackagingTypes-eclipserepository

and tried to make my project work, but when I run command - mvn clean package -Dtycho.targetPlatform=/home/kenny/project/target-platform/eclipse3.6 -X
to create a build, it reports the following error:
[ERROR] Failed to execute goal org.sonatype.tycho:tycho-p2-repository-plugin:0.11.0-SNAPSHOT:assemble-repository (default-assemble-repository) on project projectA: Could not assemble p2 repository: Copying p2 repository content failed: No repository found at file:/home/kenny/.m2/repository/. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.tycho:tycho-p2-repository-plugin:0.11.0-SNAPSHOT:assemble-repository (default-assemble-repository) on project projectA: Could not assemble p2 repository
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        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:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
        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:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        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.apache.maven.plugin.MojoExecutionException: Could not assemble p2 repository
        at org.sonatype.tycho.plugins.p2.repository.AssembleRepositoryMojo.execute(AssembleRepositoryMojo.java:92)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: org.sonatype.tycho.p2.tools.FacadeException: Copying p2 repository content failed: No repository found at file:/home/kenny/.m2/repository/. =======>
        at org.sonatype.tycho.p2.tools.impl.mirroring.MirrorApplicationServiceImpl.executeMirroring(MirrorApplicationServiceImpl.java:114)
        at org.sonatype.tycho.p2.tools.impl.mirroring.MirrorApplicationServiceImpl.mirror(MirrorApplicationServiceImpl.java:73)
        at org.sonatype.tycho.plugins.p2.repository.AssembleRepositoryMojo.execute(AssembleRepositoryMojo.java:88)
        ... 21 more
Caused by: org.eclipse.equinox.p2.core.ProvisionException: No repository found at file:/home/kenny/.m2/repository/.
        at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:391)
        at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:675)
        at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:99)
        at org.eclipse.equinox.p2.internal.repository.tools.AbstractApplication.addRepository(AbstractApplication.java:147)
        at org.eclipse.equinox.p2.internal.repository.tools.AbstractApplication.initializeRepos(AbstractApplication.java:119)
        at org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication.run(MirrorApplication.java:178)
        at org.sonatype.tycho.p2.tools.impl.mirroring.MirrorApplicationServiceImpl.executeMirroring(MirrorApplicationServiceImpl.java:101)
        ... 23 more

The directory /home/kenny/.m2/repository/ is maven repository.
       
I checked out the project tycho-demo/itp04-rcp/ from https://github.com/sonatype/sonatype-tycho/tree/master/tycho-demo/itp04-rcp/

It still reports same error as above:
org.eclipse.equinox.p2.core.ProvisionException: No repository found at file:/home/kenny/.m2/repository/.

I guess there may be some configuration problem, but I can't figure out where.

Could you kindly help on this, many thanks: )