Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Target platform definition resolution doubt

Hi Tobias,

I've tried with itp04-rcp and it works. but unfortunately it is not working for my project and I'm trying to figure out why.

my dedicated module for the target definition is basically the same than of itp04-rcp (the differences are in the names and in build-helper-maven-plugin version) :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>jbehave-osgi-indigo.target</file>
<type>target</type>
<classifier>indigo</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>

the parent pom has this:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
<target>
<artifact>
<groupId>${project.groupId}</groupId>
<artifactId>org.jbehave.osgi.equinox.target</artifactId>
<version>${project.version}</version>
<classifier>jbehave-osgi-indigo</classifier>
</artifact>
</target>
</configuration>
</plugin>


I've installed the Target Definition:
 Building JBehave OSGI Equinox : Target Definition 0.0.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- build-helper-maven-plugin:1.5:attach-artifact (attach-artifacts) @ org.jbehave.osgi.equinox.target ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ org.jbehave.osgi.equinox.target --- [INFO] Installing /Users/cvgaviao/Development/C4Biz_Projects/JBehave/jbehave-osgi/jbehave-osgi-equinox/org.jbehave.osgi.equinox.target/pom.xml to /Users/cvgaviao/.m2/repository/org/jbehave/osgi/org.jbehave.osgi.equinox.target/0.0.2-SNAPSHOT/org.jbehave.osgi.equinox.target-0.0.2-SNAPSHOT.pom [INFO] Installing /Users/cvgaviao/Development/C4Biz_Projects/JBehave/jbehave-osgi/jbehave-osgi-equinox/org.jbehave.osgi.equinox.target/jbehave-osgi-indigo.target to /Users/cvgaviao/.m2/repository/org/jbehave/osgi/org.jbehave.osgi.equinox.target/0.0.2-SNAPSHOT/org.jbehave.osgi.equinox.target-0.0.2-SNAPSHOT-indigo.target [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

but when I've tried to clean one project that depends only the target:

[INFO] Scanning for projects...
[ERROR] Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.jbehave.osgi:org.jbehave.osgi.equinox.target:target:jbehave-osgi-indigo:0.0.2-SNAPSHOT -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.jbehave.osgi:org.jbehave.osgi.equinox.target:target:jbehave-osgi-indigo:0.0.2-SNAPSHOT
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
    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:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
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: java.lang.RuntimeException: Could not resolve target platform specification artifact org.jbehave.osgi:org.jbehave.osgi.equinox.target:target:jbehave-osgi-indigo:0.0.2-SNAPSHOT at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.setTarget(DefaultTargetPlatformConfigurationReader.java:208) at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.getTargetPlatformConfiguration(DefaultTargetPlatformConfigurationReader.java:62) at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.setupProject(DefaultTychoDependencyResolver.java:67) at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:85)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    ... 11 more
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException

do you have any idea where should I looking for to solve this problem ?

thanks

Cristiano



On 03/01/12 14:02, Oberlies, Tobias wrote:
Question:

Would Tycho resolve this kind of dependency from a target project that
was pre-installed by a mvn install ?
Yes, this works if you have a dedicated module for the target definition, and make sure that the file is deployed as attached artifact. This POM [1] in the tycho-demo projects [2] shows a working example.

Regards
Tobias


[1] http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-demo/itp04-rcp/target-definition/pom.xml
[2] http://wiki.eclipse.org/Category:Tycho_Examples

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top