Unable to package plugin - eclipse

I have created an eclipse plugin, with the following Manifest file:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Commitlinking
Bundle-SymbolicName: com.polarion.commitlinking;singleton:=true
Bundle-Version: 1.0.0.202101092309
Bundle-ClassPath: com.polarion.commitlinking_1.0.0.202101092309.jar
Bundle-Activator: com.polarion.commitlinking.Activator
Bundle-Vendor: POLARION
Require-Bundle: javax.inject,
org.eclipse.osgi,
org.eclipse.jface,
org.eclipse.e4.ui.model.workbench,
org.eclipse.e4.ui.di,
org.eclipse.e4.ui.services,
org.eclipse.e4.core.di.annotations,
org.eclipse.core.runtime,
org.eclipse.e4.core.di,
org.eclipse.e4.core.contexts;bundle-version="1.8.400",
org.eclipse.e4.ui.workbench,
org.eclipse.core.commands,
org.eclipse.ui.workbench,
org.eclipse.ui,
com.polarion.alm.ws.client
Bundle-RequiredExecutionEnvironment: JavaSE-15
Bundle-ActivationPolicy: lazy
Import-Package: javax.annotation;version="1.2.0",
javax.inject;version="1.0.0",
org.eclipse.core.expressions,
org.eclipse.core.runtime;version="3.5.0",
org.eclipse.e4.core.commands,
org.eclipse.e4.core.di.extensions;version="0.16.0",
org.eclipse.e4.core.services.events,
org.eclipse.e4.ui.dialogs,
org.eclipse.e4.ui.workbench.modeling,
org.eclipse.jface.text,
org.eclipse.ui,
org.eclipse.ui.commands,
org.eclipse.ui.menus,
org.eclipse.ui.plugin,
org.osgi.service.event;version="1.4.0"
Automatic-Module-Name: com.polarion.commitlinking
Unfortunately, including the relevant jars as external jars has not allowed me to create the plugin succesfully so I've tried instead (following the recommendation present on vogella) to export the target platform and create a parent pom and inside it place my plugin project and another project that uses the target platform to manage the dependencies:
The parent pom:
<?xml version="1.0" encoding="UTF-8"?>
<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>com.packtpub.e4</groupId>
<artifactId>com.packtpub.e4.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<tycho.version>2.1.0</tycho.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<eclipse-repo.url>http://download.eclipse.org/releases/latest</eclipse-repo.url>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
<!--Enable the replacement of the SNAPSHOT version in the final product
configuration -->
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<phase>package</phase>
<id>package-feature</id>
<configuration>
<finalName>${project.artifactId}_${unqualifiedVersion}.${buildQualifier}</finalName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<target>
<artifact>
<groupId>com.vogella.tycho</groupId>
<artifactId>target-platform</artifactId>
<version>1.0.0-SNAPSHOT</version>
</artifact>
</target>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</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>
<modules>
<module>target-platform</module>
<module>com.polarion.commitlinking</module>
</modules>
The target platform 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.packtpub.e4</groupId>
<artifactId>com.packtpub.e4.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.vogella.tycho</groupId>
<artifactId>target-platform</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-target-definition</packaging>
<name>target-platform</name>
</project>
The plugin pom is below:
<?xml version="1.0" encoding="UTF-8"?>
<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>com.polarion</groupId>
<artifactId>com.polarion.commitlinking</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<parent>
<groupId>com.packtpub.e4</groupId>
<artifactId>com.packtpub.e4.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
</project>
The target-platform.target file is as below:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="Polarion plugin development">
<locations>
<location path="/home/bilal/eclipse/java-2020-092/eclipse/" type="Profile"/>
<location path="/opt/polarion/polarion/" type="Directory"/>
<location path="/home/bilal/Programs/eclipse-installer/plugins/" type="Directory"/>
</locations>
<environment>
<arch>x86_64</arch>
<os>linux</os>
<ws>gtk</ws>
<nl>en_US</nl>
</environment>
<launcherArgs>
<vmArgs>-Declipse.p2.max.threads=10 -Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest -Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/ -Dosgi.requiredJavaVersion=11 -Dosgi.instance.area.default=#user.home/eclipse-workspace -Dsun.java.command=Eclipse -XX:+UseG1GC -XX:+UseStringDeduplication --add-modules=ALL-SYSTEM -Dosgi.requiredJavaVersion=11 -Dosgi.dataAreaRequiresExplicitInit=true -Xms256m -Xmx2048m --add-modules=ALL-SYSTEM</vmArgs>
</launcherArgs>
<includeBundles>
<plugin id="ch.qos.logback.classic"/>
.....
However, when I run mvn clean package I get the following exception:
Internal error: org.eclipse.tycho.repository.local.MirroringArtifactProvider$MirroringFailedException: Could not mirror artifact osgi.bundle,org.apache.log4j,1.2.17.2019-11-22 into the local Maven repository.See log output for details. /opt/polarion/polarion/plugins/org.apache.log4j_1.2.17.2019-11-22 (Is a directory)
This is because one of the dependencies i.e. org.apache.log4j_1.2.17.2019-11-22 is actually a ddirectory with a log4j-lib plugin inside. This works fine when running the project in the IDE but I can't figure out how to resolve this correctly. Any help would be appreciated!

So the actual solution was to create a new plugin using existing jar archives option. Add that plugin as a dependency to my plugin and add that to the parent pom.xml in the modules section. Required some tinkering with dependencies but adding the resulting built jar files to the dropins folder seemed to have worked for now.

Related

Tycho cannot build client Product, problem with custom defined feature

I use Maven/Tycho for building Eclipse RCP project and p2-maven-plugin for building the p2-site located on localhost. Calling mvn clean install on parent pom should build all modules and create client product zip, but some errors appear while building the product.
Error stacktrace
[INFO] --- target-platform-configuration:0.22.0:target-platform (default-target-platform) # SplClientProduct ---
[DEBUG] Configuring mojo org.eclipse.tycho:target-platform-configuration:0.22.0:target-platform from plugin realm ClassRealm[plugin>org.eclipse.tycho:target-platform-configuration:0.22.0, parent: sun.misc.Launcher$AppClassLoader#425224ee]
[DEBUG] Configuring mojo 'org.eclipse.tycho:target-platform-configuration:0.22.0:target-platform' with basic configurator -->
[DEBUG] (f) project = MavenProject: cz.tigra.spl:SplClientProduct:1.0.0 # /tigra/SplClientProduct/pom.xml
[DEBUG] -- end configuration --
[DEBUG] Adding reactor project: MavenProject: cz.tigra.spl:cz.tigra.spl.client.feature:1.0.0-SNAPSHOT # /tigra/cz.tigra.spl.client.feature/pom.xml
[INFO]
[INFO] --- tycho-p2-publisher-plugin:0.22.0:publish-products (default-publish-products) # SplClientProduct ---
[DEBUG] Configuring mojo org.eclipse.tycho:tycho-p2-publisher-plugin:0.22.0:publish-products from plugin realm ClassRealm[plugin>org.eclipse.tycho:tycho-p2-publisher-plugin:0.22.0, parent: sun.misc.Launcher$AppClassLoader#425224ee]
[DEBUG] Configuring mojo 'org.eclipse.tycho:tycho-p2-publisher-plugin:0.22.0:publish-products' with basic configurator -->
[DEBUG] (f) flavor = tooling
[DEBUG] (f) project = MavenProject: cz.tigra.spl:SplClientProduct:1.0.0 # /tigra/SplClientProduct/pom.xml
[DEBUG] (f) qualifier =
[DEBUG] (f) session = org.apache.maven.execution.MavenSession#3a70dd47
[DEBUG] -- end configuration --
[DEBUG] No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from cz.tigra.spl.client.product 1.0.0 to cz.tigra.spl.client.feature.feature.group [1.0.0,1.0.1).; No solution found because the problem is unsatisfiable.]
[INFO] {osgi.ws=gtk, osgi.os=linux, osgi.arch=x86_64, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: cz.tigra.spl.client.product 1.0.0
[ERROR] Missing requirement: cz.tigra.spl.client.product 1.0.0 requires 'cz.tigra.spl.client.feature.feature.group [1.0.0,1.0.1)' but it could not be found
[ERROR]
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SplMavenRelease ................................... SUCCESS [4.117s]
[INFO] target-platform ................................... SUCCESS [0.106s]
[INFO] cz.tigra.spl.client.feature ....................... SUCCESS [0.629s]
....
success
....
[INFO] SplAggregator ..................................... SUCCESS [0.007s]
[INFO] SplClientProduct .................................. FAILURE [0.279s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:50.453s
[INFO] Finished at: Mon May 24 11:36:53 UTC 2021
[INFO] Final Memory: 125M/1796M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-publisher-plugin:0.22.0:publish-products (default-publish-products) on project SplClientProduct: Execution default-publish-products of goal org.eclipse.tycho:tycho-p2-publisher-plugin:0.22.0:publish-products failed: Cannot resolve dependencies of MavenProject: cz.tigra.spl:SplClientProduct:1.0.0 # /tigra/SplClientProduct/pom.xml: See log for details -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-p2-publisher-plugin:0.22.0:publish-products (default-publish-products) on project SplClientProduct: Execution default-publish-products of goal org.eclipse.tycho:tycho-p2-publisher-plugin:0.22.0:publish-products failed: Cannot resolve dependencies of MavenProject: cz.tigra.spl:SplClientProduct:1.0.0 # /tigra/SplClientProduct/pom.xml
Yes, I see the problem too - Product cannot see custom (in my project defined) feature called cz.tigra.spl:cz.tigra.spl.client.feature. My question is how to tell the Product where is my feature located/or where is path to its feature.xml (am I right?).
My p2-site
Parent (main) pom.xml located in root folder
<?xml version="1.0" encoding="UTF-8"?>
<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>cz.tigra.spl</groupId>
<artifactId>SplMavenRelease</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<eclipse-repo.url>http://download.eclipse.org/releases/latest</eclipse-repo.url>
<tycho.version>0.22.0</tycho.version>
</properties>
<!-- p2 update or use target platform -->
<repositories>
<repository>
<id>p2-site</id>
<url>http://localhost:8080/site/</url>
<layout>p2</layout>
</repository>
</repositories>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.10</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-p2-extras-plugin</artifactId>
<version>${tycho.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<fork>true</fork>
<meminitial>128m</meminitial>
<maxmem>1024m</maxmem>
<compilerArgs>
<arg>-XX:MaxPermSize=256m</arg>
</compilerArgs>
</configuration>
</plugin>
<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-packaging-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<phase>package</phase>
<id>package-feature</id>
<configuration>
<finalName>${project.artifactId}_${unqualifiedVersion}.${buildQualifier}</finalName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<dependency-resolution>
<extraRequirements>
<requirement>
<type>eclipse-plugin</type>
<id>org.eclipse.swt.win32.win32.x86_64</id>
<versionRange>[0.0.0,5.0.0)</versionRange>
</requirement>
<requirement>
<type>eclipse-plugin</type>
<id>org.eclipse.swt.win32.win32.x86_64</id>
<versionRange>[0.0.0,5.0.0)</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
<!-- <pomDependencies>consider</pomDependencies>-->
<filters>
<!-- work around Equinox bug 348045 -->
<filter>
<type>p2-installable-unit</type>
<id>org.eclipse.equinox.servletbridge.extensionbundle</id>
<removeAll/>
</filter>
</filters>
<executionEnvironment>JavaSE-1.6</executionEnvironment>
<!-- more settings -->
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</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>
<target>
<artifact>
<groupId>cz.tigra.spl</groupId>
<artifactId>target-platform</artifactId>
<version>1.0.0-SNAPSHOT</version>
</artifact>
</target>
</configuration>
</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.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<version>2.6.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<outputDirectory>xtend-gen</outputDirectory>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.12.2</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.core.runtime</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>52.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<modules>
<module>target-platform</module>
<module>cz.tigra.spl.client.feature</module>
<module>SplAggregator</module>
<module>SplClientProduct</module>
<!-- <module>p2-site</module>-->
</modules>
</project>
SplAggregator just aggregates all project modules with source code.
Target platform pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>cz.tigra.spl</groupId>
<artifactId>SplMavenRelease</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>cz.tigra.spl</groupId>
<artifactId>target-platform</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-target-definition</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.22.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
and target-platform.target file
<?pde version="3.6"?>
<target name="target-platform" sequenceNumber="10">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true"
type="InstallableUnit">
<!-- this doesn't work, that's why it's commented -->
<!-- <unit id="cz.tigra.spl.client.feature" version="1.0.0.202105240921"/>-->
<!-- <repository location="localhost:8080/site/features/"/>-->
</location>
</locations>
<targetJRE
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<launcherArgs>
<vmArgs>-Xmx1024m</vmArgs>
<programArgs>-consoleLog</programArgs>
</launcherArgs>
</target>
feature's pom.xml and feature.xml files:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>cz.tigra.spl</groupId>
<artifactId>SplMavenRelease</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>cz.tigra.spl</groupId>
<artifactId>cz.tigra.spl.client.feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.22.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
Product's pom.xml and SplClient.product:
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>SplMavenRelease</artifactId>
<groupId>cz.tigra.spl</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>cz.tigra.spl</groupId>
<artifactId>SplClientProduct</artifactId>
<version>1.0.0</version>
<packaging>eclipse-repository</packaging>
<name>SplClientProduct</name>
<properties>
<product.finalName>SPL</product.finalName>
<product.id>cz.tigra.spl.client.product</product.id>
<product.outputDirectory>${project.build.directory}/products/${product.id}/win32/win32/x86_64</product.outputDirectory>
</properties>
<repositories>
<repository>
<id>p2-site</id>
<url>http://localhost:8080/site/</url>
<layout>p2</layout>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<executions>
<execution>
<id>materialize-products</id>
<phase>package</phase>
<goals>
<goal>materialize-products</goal>
</goals>
</execution>
<execution>
<!-- create zip file with the installed product -->
<id>archive-products</id>
<goals>
<goal>archive-products</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="SPL" uid="cz.tigra.spl.client.product" id="cz.tigra.spl.client.product" application="cz.tigra.spl.client.application" version="1.0.0" useFeatures="true" includeLaunchers="true">
<aboutInfo>
<image path="/cz.tigra.spl.client/images/about/about.png"/>
<text>
text pro about se bere z messages.properties (lokalizovany)
</text>
</aboutInfo>
<configIni use="default">
<win32>/config.ini</win32>
</configIni>
<launcherArgs>
<programArgs>-data
#user.home/SPL#deployment.mode/workspace
-configuration
#user.home/SPL#deployment.mode/configuration
-clean</programArgs>
<vmArgs>-Xms256M
-Xmx1024M
-XX:PermSize=64M
-XX:MaxPermSize=128M</vmArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>
<windowImages i16="/cz.tigra.spl.client/icons/16_16/spl.png" i32="/cz.tigra.spl.client/icons/32_32/spl.png"/>
<splash
location="cz.tigra.spl.client"
startupProgressRect="5,275,445,15" />
<launcher name="spl">
<solaris/>
<win useIco="true">
<ico path="/cz.tigra.spl.client/images/logo/logo.ico"/>
<bmp/>
</win>
</launcher>
<vm>
</vm>
<plugins>
</plugins>
<features>
<feature id="cz.tigra.spl.client.feature" version="1.0.0.qualifier"/>
</features>
<configurations>
<plugin id="cz.tigra.spl.client" autoStart="true" startLevel="0" />
...
custom plugins definition
...
<plugin id="cz.tigra.spl.core" autoStart="true" startLevel="2" />
<plugin id="org.springframework.osgi.extender" autoStart="true" startLevel="1" />
</configurations>
</product>
So I guess it isn't enought to have cz.tigra.spl.client.feature located on p2 site, because Product cannot see it - where it should be? Or what is need to be changed in project setup?
Thanks!

Could not understand about Maven pom file using Eclipse

I am very new to Maven and i am creating my first maven project of maven-archetype-quickstart
Then it generates the error message ::
But in my project explorer :
I am unable to understand that why it is creating a proper maven project every time it shows a red warning mark into my project and as well as in my pom.xml file.
> pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>com.akash</groupId>
<artifactId>feind</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>feind</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- Change username in below line -->
<localRepository>/Users/COACH/.m2/repository</localRepository>
<interactiveMode>true</interactiveMode>
<offline>false</offline>
<pluginGroups>
<!-- pluginGroup
| Specifies a further group identifier to use for plugin lookup.
<pluginGroup>com.your.plugins</pluginGroup>
-->
</pluginGroups>
<proxies>
<!--
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
-->
</proxies>
<servers>
<!--
<server>
<id>deploymentRepo</id>
<username>crunchify</username>
<password>crunchify</password>
</server>
-->
</servers>
<mirrors>
<!--
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>mirror description</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
</mirrors>
<profiles>
</profiles>
</settings>
I am fail to understand that why this happening every time to me and my .m2\repository folder is also empty . Please suggest me some steps to fix it and properly run a maven project.
Since i am not behind any proxy so i don't need to worry about the settings.xml file i just deleted .m2 folder and just simply try to create a maven project again
and maven itself downloads the required dependencies automatically.
Hence problem is resolved.
As reputable sources go:
apache/maven PR 38 illustrates you should not define any M2_HOME (not with recent maven versions)
apache-maven/src/bin/mvn shows that, if MAVEN_HOME is not defined, it defaults to where maven is installed.
By deleting your ~/.m2 folder, you have forced Eclipse (through m2e, included in any Eclipse 4.5 or newer), to revert back to a default m2 folder.
It also uses, per FAQ, the default <maven home>/conf/settings.xml

Eclipse maven project JDK build path

When importing an existing Maven project into Eclipse, where is the JDK / JRE being driven from? For example, as per below, on import, its being set to J2SE 1.4 however I want it to be JDK 1.8.
How can I set it in the Maven pom so that when other devs get the project, on import Eclipse will point to JDK 1.8 and not 1.4?
My suggestion is to specify the version of Java from the configuration of the maven-compiler-plugin plugin. Please check the following skeleton.
<?xml version="1.0" encoding="UTF-8"?>
<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">
...
<properties>
...
<java.version>1.8</java.version>
...
</properties>
...
<build>
...
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<verbose>true</verbose>
<debug>${debug}</debug>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
...
</plugins>
...
<resources>
...
</resources>
...
</build>
...
</project>

Installing eclipse plug-in built by Tycho

I want to install eclipse plug-in that was build with help of Tycho.
When I call mvn clean install Maven exits with SUCCESS, and in target directory there is .jar file.
I can't make Eclipse to work with this .jar, it says that file could not be found.
Am I missing something here? How to use my tycho built plug-in?
Here is my pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.my.example</groupId>
<artifactId>com.my.example.ExampleProject</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<repositories>
<repository>
<id>eclipse-luna</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/luna</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.22.0</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>0.22.0</version>
<configuration>
<environments>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
</plugins>
</build>

why plugin built via Tycho working with JDT but not CDT

I am so frustrated when trying to find out the reason why the Eclipse plugin I built via Tycho is not working in CDT, but working in JDT.
The parent pom.xml looks like the following:
<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>com.company.eclipse.plugin</groupId>
<artifactId>abc-master</artifactId>
<version>1.0.0</version>
<name>abc Master</name>
<packaging>pom</packaging>
<modules>
<module>../abc</module>
</modules>
<properties>
<tycho.version>0.20.0</tycho.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kepler-repo.url>http://download.eclipse.org/releases/kepler</kepler-repo.url>
</properties>
<repositories>
<repository>
<id>kepler</id>
<url>${kepler-repo.url}</url>
<layout>p2</layout>
</repository>
<repository>
<id>cdt</id>
<url>http://download.eclipse.org/tools/cdt/releases/kepler</url>
<layout>p2</layout>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
<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>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>p2-composite</outputDirectory>
<resources>
<resource>
<directory>p2-composite-template</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
And the pom for abc plugin looke like the following
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<relativePath>../abc-master/pom.xml</relativePath>
<groupId>com.company.eclipse.plugin</groupId>
<artifactId>abc-master</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>com.company.eclipse.plugin.abc</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
Any help is most appreciated.
thanks a lot for helping me. I suspect it is due to the Eclipse for C/C++ is somehow corrupted. So I download a new CDT, and copy the files from the new CDT to old CDT folder by folder, and try start the old CDT to see if the plugin works. After I replaced the "configuration" folder using new downloaded copy, the plugin works. So means something in the configuration folder in the old CDT prevent the plugin from starting. Unfortunately I forgot to backup the old CDT, so now I am not able to re-product the issue to investigate what is wrong in configuration folder.
Closed as cannot reproduce