Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6148483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:17:24+00:00 2026-05-23T19:17:24+00:00

Possible Duplicate: How to reference mockito within tycho? I am trying to get a

  • 0

Possible Duplicate:
How to reference mockito within tycho?

I am trying to get a test feature project building with Tycho, but it fails to resolve dependencies listed in my pom from the Maven central repository that is listed in my parent pom. Here is the relevant part from my parent pom:

    <properties>
            <tycho-version>0.12.0</tycho-version>
    </properties>

    <repositories>
            <repository>
                    <id>helios</id>
                    <layout>p2</layout>
                    <url>http://download.eclipse.org/releases/helios/</url>
            </repository>
    </repositories>

    <pluginRepositories>
            <pluginRepository>
                    <id>central</id>
                    <name>Maven Plugin Repository</name>
                    <url>http://repo1.maven.org/maven2</url>
                    <layout>default</layout>
                    <snapshots>
                            <enabled>false</enabled>
                    </snapshots>
                    <releases>
                            <updatePolicy>never</updatePolicy>
                    </releases>
            </pluginRepository>
    </pluginRepositories>

    <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>
                                    <pomDependencies>consider</pomDependencies>

                                    <resolver>p2</resolver>

                                    <environments>
                                            <environment>
                                                    <os>linux</os>
                                                    <ws>gtk</ws>
                                                    <arch>x86_64</arch>
                                            </environment>
                                            <environment>
                                                    <os>win32</os>
                                                    <ws>win32</ws>
                                                    <arch>x86</arch>
                                            </environment>
                                    </environments>
                            </configuration>
                    </plugin>
            </plugins>
    </build>

and here my feature pom:

    <modelVersion>4.0.0</modelVersion>
    <parent>
            <artifactId>parent</artifactId>
            <groupId>com.example</groupId>
            <version>1.0.0-SNAPSHOT</version>
    </parent>
    <groupId>com.example</groupId>
    <artifactId>com.example.testing.feature</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>eclipse-feature</packaging>

    <dependencyManagement>
            <dependencies>
                    <dependency>
                            <groupId>org.mockito</groupId>
                            <artifactId>mockito-all</artifactId>
                            <version>1.8.5</version>
                    </dependency>
            </dependencies>
    </dependencyManagement>

    <dependencies>
            <dependency>
                    <groupId>org.mockito</groupId>
                    <artifactId>mockito-all</artifactId>
            </dependency>
    </dependencies>

when I run mvn clean package on my feature project, I get the following:

[INFO] Adding repository http://download.eclipse.org/releases/helios/
[INFO] Adding repository http://download.eclipse.org/releases/helios/
[DEBUG] Added p2 repository helios (http://download.eclipse.org/releases/helios/
)
[DEBUG] Ignoring Maven repository central (http://repo1.maven.org/maven2)

and then my build fails, because my dependency cannot be resolved. Am I missing something? Is this because of the p2 resolver configured for target-platform-configuration?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:17:26+00:00Added an answer on May 23, 2026 at 7:17 pm

    Indeed it seems you are correct.

    First, create a Target Definition file (.target) and put it inside a Maven project, see here for example target: https://github.com/eclipsesource/com.eclipsesource.tycho.aspectj.demo/blob/master/platform/indigo.target

    You need to attach the .target file to the artifact, using the build helper:

    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.3</version>
        <executions>
            <execution>
                <id>attach-artifacts</id>
                <phase>package</phase>
                <goals>
                    <goal>attach-artifact</goal>
                </goals>
                <configuration>
                    <artifacts>
                        <artifact>
                            <file>indigo.target</file>
                            <type>target</type>
                            <classifier>indigo</classifier>
                        </artifact>
                    </artifacts>
                </configuration>
            </execution>
        </executions>
    </plugin>
    

    (from https://github.com/eclipsesource/com.eclipsesource.tycho.aspectj.demo/blob/master/platform/pom.xml )

    Then, in the parent POM or the plug-in projects that use that target definition file, you need to configure the “target” of target-platform-configuration Maven plugin, for example:

    <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>target-platform-configuration</artifactId>
        <version>${tycho-version}</version>
        <configuration>
            <resolver>p2</resolver>
            <ignoreTychoRepositories>true</ignoreTychoRepositories>
            <target>
                <artifact>
                    <groupId>com.eclipsesource.sandbox.weaving.demo</groupId>
                    <artifactId>com.eclipsesource.sandbox.weaving.demo.platform</artifactId>
                    <version>0.1.0-SNAPSHOT</version>
                    <classifier>indigo</classifier>
                </artifact>
            </target>
            <environments>
                <environment>
                    <os>${build.os}</os>
                    <ws>${build.ws}</ws>
                    <arch>${build.arch}</arch>
                </environment>
            </environments>
        </configuration>
    </plugin>
    

    (taken from https://github.com/eclipsesource/com.eclipsesource.tycho.aspectj.demo/blob/master/releng/pom.xml )

    Then your project(s) should build very nicely using Tycho. 🙂 If your .target references remote p2 repositories and not already in the p2 bundle pool, the necessary artifacts will be downloaded automatically.

    Good luck!

    Known Issue:

    [WARNING] Target location type: Profile is not supported
    

    As of Tycho 0.12.0, It means the “Eclipse Installation” target source type cannot be used with Tycho (yet?), along with “Directory” and “Features”.

    Solution: Use the “Update Site” target source.

    If you don’t have yet an update site, here’s to generate an update site from an Eclipse (or from any folder containing bundles, for that matter):

    /opt/eclipse_rcp/eclipse -consolelog -nosplash -verbose \
      -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \
      -metadataRepository file:/home/ceefour/p2/bonita/ \
      -artifactRepository file:/home/ceefour/p2/bonita/ \
      -source /home/ceefour/BOS-5.5.1/studio/ \
      -publishArtifacts
    

    Note:

    • change /opt/eclipse_rcp to your own Eclipse SDK installation
    • metadataRepository and artifactRepository is the folder where the new update site will be created
    • source is –you guessed it– the folder/installation containing the original bundles
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: 'pass parameter by reference' in Ruby? in this example: def test verb
Possible Duplicate: Why do I get error: … must be a reference type in
Possible Duplicate: Can I get a reference to the 'owner' class during the init
Possible Duplicate: How to reference .NET 4.0 assembly within .NET 3.5 projects Is there
Possible Duplicate: Reference: Comparing PHP's print and echo Is there any major and fundamental
Possible Duplicate: Returning reference to a local variable I happened to find this code
Possible Duplicate: Difference between pointer variable and reference variable in C++ When should I
Possible Duplicate: Difference between pointer variable and reference variable in C++ I am reading
Possible Duplicate: A good reference for Oracle PL/SQL I need make a procedure to
Possible Duplicate: Is Java pass by reference? In java are the parameters passed by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.