Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Bundle JRE along with my Product using Maven Tycho

<feature
      id="jre.master.Feature"
      label="JRE MASTER Feature"
      version="0.0.0"
      provider-name="Ortho Group LLC"
      plugin="software.usque">


Changed in files:
jre.linux.gtk.x86_64.Feature
jre.macosx.cocoa.x86_64.Feature
jre.master.Feature
jre.win32.win32.x86_64.Feature
jre.win32.win32.x86.Feature


     
From:     
version="0.0.1.qualifier"
To:
version="0.0.0"

Give the following build error.
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.26.0:validate-version (default-validate-version) on project jre.linux.gtk.x86_64.Feature: OSGi version 0.0.0 must have .qualifier qualifier for SNAPSHOT builds -> [Help 1]

Therefore I had to put the original values back before then next test below was run.

================================================================================


   <includes
         id="jre.linux.gtk.x86_64.Feature"
         version="0.0.0"
         optional="true"
         os="linux"
         ws="gtk"
         arch="x86_64"/>


Changed in file:
jre.master.Feature

for all four jre "includes" XML elements.

From:     
version="0.0.1"
To:
version="0.0.0"

Give the following error build error.
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.26.0:validate-version (default-validate-version) on project jre.linux.gtk.x86_64.Feature: Unqualified OSGi version 0.0.0.qualifier must match unqualified Maven version 0.0.1-SNAPSHOT for SNAPSHOT builds -> [Help 1]


On 8/12/2016 6:53 AM, Simon Goodall wrote:
Hi,

On Windows at least it is not possible to remove the currently running the and replace it. Hence we install the new as a feature and use the p2.inf to change the location of the jre. It is possible to use rootfiles to install directly into the eclipse/jre folder but you would not be able to use p2 to update it.

Looking at your feature.xml you are mixing version 0.0.1 and 0.0.1.qualifier which are different versions. I would use the special 0.0.0 as the included feature version numbers. Tycho will fill in the version number itself during the build.

Simon


On Wed, 10 Aug 2016, 21:11 Paul Roubekas, <paul@orthogroup.holdings> wrote:
Thanks Jonah

I now can at least say the JRE inside a Feature is valid approach and still in use. 

I can confirm the issue does occur in 0.25.0, not just 0.26.0-SNAPSHOT.  I can also say that the error occurs with each of the four JRE Feature projects, not just the jre.linux.gtk.x86_64.Feature project. 

I have added a typical pom.xml, feature.xml and build.properties files for additional background. 

Creating a MCVE is no small task, the application stands a ~5,000 files, and will require more time then I have.  Something that works 'live' is due in 7 days for a conference.  When the conference is over I can try then.  I was hoping to get this working for the conference.

====================================== jre.*.*.*.Feature =======pom.xml===============================================================
<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>
    <name>Usque linux JRE feature</name>
    <groupId>software.usque.features</groupId>
    <artifactId>jre.linux.gtk.x86_64.Feature</artifactId>
    <packaging>eclipse-feature</packaging>   
    <parent>
        <groupId>software.usque</groupId>
        <artifactId>software.usque.features</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../../releng/software.usque.releng.parent/features/pom.xml</relativePath>
    </parent>
</project>
============================================================================================================

=======================================jre.master.Feature feature.xml====================================================================
<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="jre.master.Feature"
      label="JRE MASTER Feature"
      version="0.0.1.qualifier"
      provider-name="Ortho Group LLC"
      plugin="software.usque">

   <description url="" moz-do-not-send="true" href="http://www.example.com/description" target="_blank">"http://www.example.com/description">
      [Enter Feature Description here.]
   </description>

   <copyright url="" moz-do-not-send="true" href="http://www.example.com/copyright" target="_blank">"http://www.example.com/copyright">
      [Enter Copyright Description here.]
   </copyright>

   <license url="" moz-do-not-send="true" href="http://www.example.com/license" target="_blank">"http://www.example.com/license">
      [Enter License Description here.]
   </license>

   <includes
         id="jre.linux.gtk.x86_64.Feature"
         version="0.0.1"
         optional="true"
         os="linux"
         ws="gtk"
         arch="x86_64"/>

   <includes
         id="jre.macosx.cocoa.x86_64.Feature"
         version="0.0.1"
         optional="true"
         os="macosx"
         ws="cocoa"
         arch="x86_64"/>

   <includes
         id="jre.win32.win32.x86_64.Feature"
         version="0.0.1"
         optional="true"
         os="win32"
         ws="win32"
         arch="x86_64"/>

   <includes
         id="jre.win32.win32.x86.Feature"
         version="0.0.1"
         optional="true"
         os="win32"
         ws="win32"
         arch="x86"/>

</feature>

================================================================================================================================

=============================== jre.*.*.*.Feature =========== feature.xml=============================================================
<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="jre.linux.gtk.x86_64.Feature"
      label="JRE Linux Feature"
      version="0.0.1.qualifier"
      provider-name="Ortho Group LLC"
      plugin="software.usque"
      os="linux">

   <description url="" moz-do-not-send="true" href="http://www.example.com/description" target="_blank">"http://www.example.com/description">
      [Enter Feature Description here.]
   </description>

   <copyright url="" moz-do-not-send="true" href="http://www.example.com/copyright" target="_blank">"http://www.example.com/copyright">
      [Enter Copyright Description here.]
   </copyright>

   <license url="" moz-do-not-send="true" href="http://www.example.com/license" target="_blank">"http://www.example.com/license">
      [Enter License Description here.]
   </license>

</feature>

=========================================================================================================================================
=============================== jre.*.*.*.Feature ========build.properties=====================================================================
bin.includes = .,\
               feature.xml
=========================================================================================================================================


On 8/10/2016 7:50 AM, Jonah Graham wrote:
I suspect no one has answered because no one has any advance on the
information you have already provided. I'll try and answer best I can.

1) The p2.inf in your first link updates eclipse.ini with the -vm
argument explicitly. While the second case relies on eclipse.exe
looking for a subfolder named "jre" by default.  See
https://wiki.eclipse.org/Equinox_Launcher#Finding_a_VM.2C_Using_JNI_Invocation_or_Executing_Java

2) Can't help you here. I normally do product builds on Linux, can you
test under Linux. Perhaps if you could provide an MCVE
http://stackoverflow.com/help/mcve someone would be able to reproduce
and help. I also assume the problem is happening with released Tycho
(0.25)? If not, you may have found a regression and a bug report would
be most appreciated
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Tycho

Jonah
~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com


On 10 August 2016 at 12:06, Paul Roubekas <paul@orthogroup.holdings> wrote:
On 8/8/2016 8:24 PM, Paul Roubekas wrote:

On 8/6/2016 12:46 PM, Paul Roubekas wrote:

Windows 7

Eclipse Neon

Tycho 0.26-SNAPSHOT


I have read this blog post
(https://codeiseasy.wordpress.com/2012/07/31/including-a-jre-in-a-tycho-build/),
four years old, and this blog post
(http://eclipseo.blogspot.com/2014/11/bundle-jre-along-with-your-product.html),
two years old.  The newer blog post skips the step where a p2.inf file is
created.

Question 1) Is the p2.inf file no longer needed?


I have done the following.

Created the below directories

/software.usque.appFeature/linux-64bit
/software.usque.appFeature/macosx
/software.usque.appFeature/windows-32bit
/software.usque.appFeature/windows-64bit


The build.properties files is as follows.

bin.includes = .,\
feature.xml
root.win32.win32.x86_64=win32-64
root.linux.gtk.x86=linux-64
root.win32.win32.x86=win32
root.macosx.cocoa.x86_64=macosx

I get the following error during the Maven build.

[ERROR] Failed to execute goal
org.eclipse.tycho:tycho-p2-plugin:0.26.0-SNAPSHOT:p2-metadata-default
(default-p2-metadata-default) on project software.usque.appFeature:
Execution default-p2-metadata-default of goal
org.eclipse.tycho:tycho-p2-plugin:0.26.0-SNAPSHOT:p2-metadata-default
failed: Cannot set permissions or symbolic links for macosx.cocoa.x86_64 if
there are no root files for that configuration -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.eclipse.tycho:tycho-p2-plugin:0.26.0-SNAPSHOT:p2-metadata-default
(default-p2-metadata-default) on project software.usque.appFeature:
Execution default-p2-metadata-default of goal
org.eclipse.tycho:tycho-p2-plugin:0.26.0-SNAPSHOT:p2-metadata-default
failed: Cannot set permissions or symbolic links for macosx.cocoa.x86_64 if
there are no root files for that configuration
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    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:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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.PluginExecutionException: Execution
default-p2-metadata-default of goal
org.eclipse.tycho:tycho-p2-plugin:0.26.0-SNAPSHOT:p2-metadata-default
failed: Cannot set permissions or symbolic links for macosx.cocoa.x86_64 if
there are no root files for that configuration
    at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 20 more
Caused by: java.lang.RuntimeException: Cannot set permissions or symbolic
links for macosx.cocoa.x86_64 if there are no root files for that
configuration
    at
org.eclipse.tycho.p2.impl.publisher.AbstractMetadataGenerator.publish(AbstractMetadataGenerator.java:125)
    at
org.eclipse.tycho.p2.impl.publisher.AbstractMetadataGenerator.generateMetadata(AbstractMetadataGenerator.java:58)
    at
org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.generateMetadata(P2GeneratorImpl.java:96)
    at
org.eclipse.tycho.plugins.p2.P2MetadataMojo.attachP2Metadata(P2MetadataMojo.java:149)
    at
org.eclipse.tycho.plugins.p2.P2MetadataMojo.execute(P2MetadataMojo.java:107)
    at
org.eclipse.tycho.plugins.p2.P2MetadataDefaultMojo.execute(P2MetadataDefaultMojo.java:33)
    at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    ... 21 more
Caused by: java.lang.IllegalArgumentException: Cannot set permissions or
symbolic links for macosx.cocoa.x86_64 if there are no root files for that
configuration
    at
org.eclipse.tycho.p2.impl.publisher.rootfiles.FeatureRootAdvice.ensureRootFilesConfigured(FeatureRootAdvice.java:204)
    at
org.eclipse.tycho.p2.impl.publisher.rootfiles.FeatureRootAdvice.getDescriptor(FeatureRootAdvice.java:153)
    at
org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction.generateRootFileIUs(FeaturesAction.java:453)
    at
org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction.generateFeatureIUs(FeaturesAction.java:423)
    at
org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction.perform(FeaturesAction.java:605)
    at
org.eclipse.equinox.p2.publisher.Publisher$ArtifactProcess.run(Publisher.java:207)
    at
org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository.executeBatch(AbstractArtifactRepository.java:187)
    at
org.eclipse.equinox.p2.publisher.Publisher.publish(Publisher.java:231)
    at
org.eclipse.tycho.p2.impl.publisher.AbstractMetadataGenerator.publish(AbstractMetadataGenerator.java:122)
    ... 27 more


Did some searching and found this,
https://github.com/serge-rider/dbeaver/issues/115, which basically says
create a directory named ...\target\generated-macos and put one arbitrary
file, I created a file called filler.txt, in the ...\target\generated-macos
directory and that should fix the build error.  But that is not what is
happening in my case.

The ...\target directory of the Eclipse product project.

...app.product\target\software.usque.app.product-0.0.1-SNAPSHOT.zip
...app.product\target\extraArtifacts
...app.product\target\generated-macos
...app.product\target\org.eclipse.equinox.executable-3.6.300.v20160525-1303
...app.product\target\p2agent
...app.product\target\products
...app.product\target\repository
...app.product\target\targetPlatformRepository
...app.product\target\local-artifacts.properties
...app.product\target\p2artifacts.xml
...app.product\target\p2content.xml

And just in case I misunderstood the blog, I also tried putting the
generated-macos directory and file in the target of the Eclipse feature
project of the app, but that made no difference.

Question 2)  How do fix this?  Help please.




_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


bump

--
The people that bring you Usque.


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


Is this question that hard?  Or did I use the wrong words in my internet
search and not find documentation that explains how to add a JRE in a
Eclipse RCP using Tycho?

--

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


--
The people that bring you Usque.

Back to the top