[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[mylyn-docs-dev] Consuming Mylyn Wikitext in a plain Java/maven project
|
Hi,
During my tests of Bug 421551 (thank you David for the review), I have
noticed, that the pom we push to the maven repository are not the one
consumers of the library would expect.
With the jars pushed on a Maven Repository with Eclipse B3, (approach is
described in this Blog Post [1] or in the GitHub project [2]). As an end
user, I just need this pom:
==== End listing 1 ====
<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.example</groupId>
<artifactId>helloworld-markdown</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.eclipse.mylyn.docs</groupId>
<artifactId>org.eclipse.mylyn.wikitext.markdown.core</artifactId>
<version>2.6.0.v20150901-2143</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>bintray.jmini.maven</id>
<url>http://dl.bintray.com/jmini/maven/</url>
</repository>
</repositories>
</project>
==== End listing 1 ====
With the version pushed on the Eclipse Maven repository, my pom will
look like this:
==== Listing 2 ====
<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.example</groupId>
<artifactId>helloworld-markdown</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.eclipse.mylyn.docs</groupId>
<artifactId>org.eclipse.mylyn.wikitext.markdown.core</artifactId>
<version>2.6.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.mylyn.docs</groupId>
<artifactId>org.eclipse.mylyn.wikitext.core</artifactId>
<version>2.6.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>[15.0.0,)</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>eclipse.mylyn</id>
<url>https://repo.eclipse.org/content/repositories/mylyn-snapshots/</url>
</repository>
</repositories>
</project>
==== End listing 2 ====
I need to add the dependencies explicitly.
The reason is easy to understand. On the Eclipse Maven repo, the poms
pushed by the maven+tycho built are the Tycho pom (packaging
"eclipse-plugin", no dependencies).
On my bintray repository, the Eclipse B3 Tool has rewritten the POM
based on the P2/Manifest Metadata. The result is a user friendly pom
(packaging "jar", dependencies derived from the Manifest).
I thought using B3 was a workaround. I am now convinced that this is a
only valid approach to produce easy-to-use Poms.
What do you think?
Jeremie.
[1]
https://www.bsi-software.com/en/scout-blog/article/maven-repository-for-mylyn-wikitext.html
[2] https://github.com/jmini/mylyn-wikitext-repository