Hello Tycho Team,
Thanks for the prompt reply, but unfortunately that did
not solve our problem. I have added a few more tycho related plugins in the
master module, But we are still getting the same error as before. Please find a
detailed project layout as described below.
1] Master 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.abc.package.master</groupId>
<artifactId>master</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>../com.abc.package.masterP2</module>
</modules>
<properties>
<tycho-version>0.24.0</tycho-version>
</properties>
<repositories>
<repository>
<id>xyz</id>
<url>P2-repo url</url>
<layout>p2</layout>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.22</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-source-feature-plugin</artifactId>
<version>${tychoExtrasVersion}</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>${tychoVersion}</version>
<executions>
<execution>
<id>attached-p2-metadata</id>
<phase>package</phase>
<goals>
<goal>p2-metadata</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<archiveSite>true</archiveSite>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>0.24.0</version>
<configuration>
<includeAllDependencies>true</includeAllDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-publisher-plugin</artifactId>
<version>0.24.0</version>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tychoVersion}</version>
<executions>
<execution>
<id>plugin-source</id>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.24.0</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tychoVersion}</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-packaging-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<deployableFeature>true</deployableFeature>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
2] Category.xml
|
|
|
|
<?xml version="1.0"
encoding="UTF-8"?>
<site>
<bundle id="com.abc.package.def.child1"><category
name="AllSources"/></bundle>
<bundle
id="com.abc.package.def.child2"><category
name="AllSources"/></bundle>
<bundle
id="com.abc.package.masterp2"><category
name="AllSources"/></bundle>
</site>
|
|
|
|
![Text Box: com.daimler.epdm.masterp2 (Module for generating p2, packaging type *eclipse-repository*)
|_ pom.xml](pngRg1kbF0dzm.png) |
1] 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>
<parent>
<groupId>com.abc.package.master</groupId>
<artifactId>master</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>..\com.abc.package.master</relativePath>
</parent>
<groupId>com.abc.package.masterP2</groupId>
<artifactId>com.abc.package.masterP2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
*Here getting error: Project build error: Unknown packaging: eclipse-repository*
|
|
|
|
![Text Box: com.abc.package.def.child1
|_src
|_META-INF
| |_MANIFEST.MF (Information about Import packages, Bundle Version, etc.)
|_pom.xml](pngHkfvumXPSq.png) |
1] pom.xml for Child1
|
|
<?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>
<parent>
<groupId>com.abc.package.master</groupId>
<artifactId>master</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>..\com.abc.package.master</relativePath>
</parent>
<groupId>com.abc.package.def.child1</groupId>
<artifactId>com.abc.package.def.child1</artifactId>
<version>0.7.0</version>
<packaging>eclipse-plugin</packaging>
(*Here getting error: Project build error: Unknown packaging:
eclipse-plugin*)
<dependencies>
<dependency>
Module Specific dependencies
</dependency>
<dependency>
Module specific dependencies
</dependency>
</dependencies>
</project>
|
|
com.abc.package.def.child2 (has similar structure as
child1)
Kindly let us know if we are missing some configuration
or plugin related to tycho, we need this to work and we are stuck at the same
issue since quite a while. Any help from your side would be appreciated.
Thanks and Regards,
-Vishal Poptani
-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On
Behalf Of tycho-user-request@xxxxxxxxxxx
Sent: Wednesday, April 06, 2016 8:32 AM
To: tycho-user@xxxxxxxxxxx
Subject: tycho-user Digest, Vol 68, Issue 11
Send tycho-user mailing list submissions to
tycho-user@xxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
or, via email, send a message with subject or body 'help'
to
tycho-user-request@xxxxxxxxxxx
You can reach the person managing the list at
tycho-user-owner@xxxxxxxxxxx
When replying, please edit your Subject line so it is
more specific
than "Re: Contents of tycho-user digest..."
Today's Topics:
1. Re: Unable to create a P2 repo using tycho (Nick
Boldt)
2. Re: Dumping target configuration for fast reload
(Brian de Alwis)
3. Re: Issue with getting emails from tycho-user & rephrasing
question about unit tests (Brian de Alwis)
----------------------------------------------------------------------
Message: 1
Date: Tue, 5 Apr 2016 14:34:59 -0400
From: Nick Boldt <nickboldt@xxxxxxxxx>
To: jeffmaury@xxxxxxxxxxxxx, Tycho user list
<tycho-user@xxxxxxxxxxx>
Cc: "Klein, Florian"
<florian.a.klein@xxxxxxxxxxxxx>, "Bhagde, Pranay"
<pranay.bhagde@xxxxxxxxxxxxx>
Subject: Re: [tycho-user] Unable to create a P2 repo
using tycho
Message-ID:
<CAAOoWTTnvS=aOTsGCjeud1C2uL=ZM-5ORkCwvbOrup0cuoRiYQ@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Seems pretty reasonable:
* a top-level reactor root pom, which builds
* the two plugins, and then adds them to
* the p2 update site.
Your site should contain a category.xml which lists the
two <bundle>s.
Here's a more complicated project which does the same
thing but
includes plugins, features, tests, and an update site, so
you can
steal some code.
* top-level reactor:
https://github.com/jbosstools/jbosstools-central/blob/master/pom.xml#L22-L23
* plugins:
https://github.com/jbosstools/jbosstools-central/blob/master/discovery/pom.xml
* update site pom:
https://github.com/jbosstools/jbosstools-central/blob/master/site/pom.xml
* update site category.xml:
https://github.com/jbosstools/jbosstools-central/blob/master/site/category.xml#L28-L30
And there's also this:
* parent pom, which defines everything else that's
missing in the
top-level reactor root pom:
https://github.com/jbosstools/jbosstools-build/blob/master/parent/pom.xml
On Tue, Apr 5, 2016 at 6:53 AM, Jeff MAURY
<jeffmaury@xxxxxxxxx> wrote:
> Did you add Tycho as Maven extensions?
>
> Jeff
>
> Le 5 avr. 2016 05:54, "Poptani, Vishal"
<vishal.poptani@xxxxxxxxxxxxx> a
> ?crit :
>>
>> Hello,
>>
>>
>>
>> We are running into some problems when we try to
create a p2 repository
>> using tycho and maven. Below is the detailed
description of the issues we
>> are facing. Any help in solving the below issue
would be appreciated.
>>
>>
>>
>> Project structure
>>
>>
>>
>> com.abc.parent - parent pom
>>
>> Contains all the plugins
required for the modules. And the
>> module execution list.
>>
>>
>>
>> com.abc.p2 - master P2 project -
eclipse repository
>>
>> Contains the category.xml file
with the information
>> related to the below mentioned eclipse plugins.
>>
>>
>>
>> com.abc.common - eclipse plugin
>>
>> com.abc.person - eclipse plugin
>>
>>
>>
>>
>>
>>
>>
>> What we want to achieve
>>
>>
>>
>> We are introducing Maven for the first time for
this project . We want to
>> create a P2 repository using Maven ( mostly by
using maven tycho plugin or
>> any other standard available plugins ). Also ,
we wish to publish this
>> repository to a site location.
>>
>>
>>
>>
>>
>> What we tried until now
>>
>>
>>
>> Case 1:
>>
>> Approach - We
used Maven Tycho plugin and
>> added the packaging as
"eclipse-repository" for the com.abc.p2 project.
>>
>>
>> We have following plugins in the pom.xml files
>>
>>
>> We are using Maven tycho plugin with version -
0.24.0
>>
>>
>> Maven tycho plugin. maven-p2-repository ,
tycho-packaging plugin ,
>> maven-osgi-plugin
>>
>>
>>
>> Errors -
>>
>>
>> [ERROR] Unknown packaging:
eclipse-repository @ line 6, column 14
>>
>>
>> [ERROR]
>>
>>
>> [ERROR] To see the full stack trace of the
errors, re-run Maven with the -e
>> swit
>>
>>
>> ch.
>>
>>
>> [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
>> rea
>>
>>
>> d the following articles:
>>
>>
>> [ERROR] [Help 1]
>>
http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
>>
>>
>> gException
>>
>> Case 2 :
>>
>> Approach - We
used Maven-p2-plugin in
>> order to create P2 repository .
>>
>>
>>
>> Errors -
>>
>>
>> We were able to generate the P2-repository
structure in the target folder of
>> the master project, , but it failed to package
all the dependent modules in
>> the p2-repository.
>>
>>
>>
>> Next steps suggestions
>>
>>
>>
>> Request you to kindly assist and suggest , if we
are on the right track in
>> order to achieve our goal . Also let me know in
case any changes required to
>> my approach and any more additional things to be
implemented.
>>
>>
>>
>> Thanks and Regards,
>>
>> Vishal Poptani
>>
>> This message contains information that may be
privileged or confidential
>> and is the property of the Capgemini Group. It
is intended only for the
>> person to whom it is addressed. If you are not
the intended recipient, you
>> are not authorized to read, print, retain, copy,
disseminate, distribute, or
>> use this message or any part thereof. If you
receive this message in error,
>> please notify the sender immediately and delete
all copies of this message.
>>
>>
>> _______________________________________________
>> 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
--
Nick Boldt :: Productization Lead :: JBoss Tools &
Dev Studio :: Red Hat, Inc.
http://nick.divbyzero.com
------------------------------
Message: 2
Date: Tue, 5 Apr 2016 22:58:03 -0400
From: Brian de Alwis <briandealwis@xxxxxxxxx>
To: Tycho user list <tycho-user@xxxxxxxxxxx>
Subject: Re: [tycho-user] Dumping target configuration
for fast reload
Message-ID:
<AA6BB247-E976-444A-9072-F77E378F40F7@xxxxxxxxx>
Content-Type: text/plain; charset="utf-8"
It?s not a fully automated solution, but Mikael Barbero?s
Target Platform Definition editor almost makes generating .target files a
pleasure:
https://github.com/mbarbero/fr.obeo.releng.targetplatform
It provides an XText-based DSL for describing a .target
file and supports content-assist for autocompletion and setting version ranges.
Brian.
> On 5-Apr-2016, at 2:19 AM, LE FEVRE FRANCOIS
<francois.le-fevre@xxxxxx> wrote:
>
> Dear Tycho community,
>
> I would like to know if there is a way to dump the
target resolution done by Tycho.
> For instance, mvn clean verify
?Dtycho.targetplatform.dump=true
> And then to reload it, with something like mvn clean
verify ?Dtycho.targetplatform.reload=true
>
> It will create at each pom level a hidden file with
the initial resolution.
>
> The main idea is to speed up the resolving phase for
huge/complex projet.
> Actually the computing target platform/resolving
dependencies/resolving class path could be the major period in the whole
process.
> Many times developers do not change the target/depencies
etc?, they just add functions that do not have any impact on the resolution
phase, isn?t it?
>
>
> Thanks for your comment on this idea, that?s perhaps
is not possible.
>
> Francois
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
<mailto: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
<https://dev.eclipse.org/mailman/listinfo/tycho-user>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://dev.eclipse.org/mailman/private/tycho-user/attachments/20160405/303752ff/attachment.html>
------------------------------
Message: 3
Date: Tue, 5 Apr 2016 23:02:22 -0400
From: Brian de Alwis <briandealwis@xxxxxxxxx>
To: Tycho user list <tycho-user@xxxxxxxxxxx>
Subject: Re: [tycho-user] Issue with getting emails from
tycho-user &
rephrasing question about unit tests
Message-ID:
<56C840EA-CAC7-4DBB-8486-F883B55640DB@xxxxxxxxx>
Content-Type: text/plain; charset=utf-8
You seem to be mixing Maven dependencies and OSGi
dependencies. That might work with pomDependencies=consider, but I?ve done my
best to avoid this situation entirely:
https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts
I instead pull Mockito and Hamcrest from Eclipse Orbit.
But beware Mockito: there are a number of open bug
reports on problems with Mockito and Hamcrest. They boil down to problems due
to split packages across org.hamcrest.*, plus incompatible changes made to the
Hamcrest API. You must pull in the org.hamcrest bundle, a facade bundle that
pulls in the split packages and re-exports the org.hamcrest package.
Brian.
> On 5-Apr-2016, at 11:41 AM, David M. Karr
<davidmichaelkarr@xxxxxxxxx> wrote:
>
> In my subscription options for
"tycho-user", I have "Receive your own posts to the list?"
set to "Yes". However, I never receive my own posts to this list.
Why is that?
>
> I asked yesterday about how to get unit tests
running in a Tycho-built project. I'm going to rephrase this with more
detail. I would have responded to my own post, but ...
>
> In my codebase with a multi-module Maven Tycho
build, there are several plugin projects. I'm trying to add unit tests to one
of them, using JUnit and Mockito.
>
> As I'm not aware of a p2 repo with JUnit or Mockito,
I figured I would have to continue using the
"maven-dependency-plugin" to get Maven artifacts available for my
plugin. My manifest has "Build-Classpath" entries referring to the
"junit" and "mockito-all" jars, which appear to be valid.
This is done in a different plugin, and the plugin with the unit tests depends
on that other plugin.
>
> However, when I run the build, I get the following
excerpt from the build (home path elided):
> ----------------------
> [INFO] --- tycho-compiler-plugin:0.24.0:compile
(default-compile) @ com.cisco.yangide.ext.model.editor ---
> [WARNING] The effective compiler target level 1.8 is
incompatible with the following OSGi execution environments: [JavaSE-1.7
(assumes 1.7)] @ MavenProject:
org.opendaylight.yangide:com.cisco.yangide.ext.model.editor:1.1.1-SNAPSHOT @
.../git/yangide/plugins/com.cisco.yangide.ext.model.editor/pom.xml
> [INFO] Compiling 105 source files to
.../git/yangide/plugins/com.cisco.yangide.ext.model.editor/target/classes
> [INFO]
------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 32.542 s
> [INFO] Finished at: 2016-04-05T08:32:32-07:00
> [INFO] Final Memory: 109M/603M
> [INFO]
------------------------------------------------------------------------
> [ERROR] Failed to execute goal
org.eclipse.tycho:tycho-compiler-plugin:0.24.0:compile (default-compile) on
project com.cisco.yangide.ext.model.editor: Compilation failure: Compilation
failure:
> [ERROR]
.../git/yangide/plugins/com.cisco.yangide.ext.model.editor/src/test/java/com/cisco/yangide/ext/model/editor/YinBuilderTest.java:[12]
> [ERROR] import static org.mockito.Mockito.*;
> [ERROR] ^^^^^^^^^^^
> [ERROR] The import org.mockito cannot be resolved
> -----------------
>
> In non-Eclipse Maven builds, I'm used to seeing
Surefire compiling unit tests. It appears that the
"tycho-compiler-plugin" is compiling them here. I don't know whether
that's expected or not.
>
> I also ran the build with "-X", and this
is an excerpt that shows "junit" and "mockito-all" in the
dependency tree:
> -------------------
> [DEBUG] Dependency collection stats:
{ConflictMarker.analyzeTime=0, ConflictMarker.markTime=1,
ConflictMarker.nodeCount=230, ConflictIdSorter.graphTime=0,
ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=229,
ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=14,
ConflictResolver.conflictItemCount=229,
DefaultDependencyCollector.collectTime=7,
DefaultDependencyCollector.transformTime=15}
> [DEBUG] org.opendaylight.yangide:com.cisco.yangide.ext.model.editor:eclipse-plugin:1.1.1-SNAPSHOT
> [DEBUG] junit:junit:jar:4.12:test
> [DEBUG]
org.hamcrest:hamcrest-core:jar:1.3:test (scope managed from compile by
org.opendaylight.odlparent:odlparent:[unknown-version])
> [DEBUG] org.mockito:mockito-all:jar:1.10.19:test
> [DEBUG]
p2.eclipse-plugin:org.eclipse.core.runtime:jar:3.11.1.v20150903-1804:system
> -----------------
>
> So what might I be doing wrong here?
> _______________________________________________
> 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
End of tycho-user Digest, Vol 68, Issue 11
******************************************
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.