Is it possible to use Tycho without using p2 to download dependencies or publish the resulting artifacts in?
I already have a Maven repository with all the dependenc
It is possible to tell Tycho to use POM dependencies. The only "gotcha" as far as I am aware of, is that these still need to be in a p2 repository should you wish to build an RCP application using the eclipse-repository packaging type.
Tycho can use OSGi bundles in Maven repositories pretty easily: Just specify a dependency to the bundles by their GAV in the pom.xml and set the pomDependencies=consider
option (see this documentation). Tycho will then take these artifacts for all build steps: dependency resolution, compilation, RCP assembly, etc.
The tricky part about pomDependency=consider
are transitive dependencies: For any artifact that Tycho builds, it requires that all transitive dependencies of the artifact can be resolved against the target platform. With pomDependency=consider
, Tycho adds the GAV artifacts and all their transitive Maven dependencies to the target platform, but only if the artifact is an OSGi bundle (hence "consider"). If one of the Maven dependencies is not an OSGi bundle then that library will not be in the target platform and hence Tycho's dependency resolution (in the OSGi space) may fail.
The second part of your question was about distributing Tycho artifacts via Maven repositories. It is possible to deploy Tycho artifacts to Maven repositories, but these artifacts are not particularly useful in the Maven world. This is because Tycho's artifacts typically don't have dependencies in their POMs. So to use a Tycho artifact from a Maven build (or similarly via pomDependency=consider
), you'd need to manually list all the dependencies of the Tycho artifact in consuming project's POM.