Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » [wikitext] Use Wikitext with Maven/Tycho
[wikitext] Use Wikitext with Maven/Tycho [message #797823] Mon, 13 February 2012 18:13 Go to previous message
Jens von Pilgrim is currently offline Jens von Pilgrim
Messages: 276
Registered: July 2009
Senior Member
Hi all,

I'm trying to set up an automatic build using Wikitext and Maven/Tycho.
Has anyone done that before?

The main problem is not use call the Wikitext anttasks from within
Maven, but how to retrieve them in the first place.

I found an example ant file not only executing the Wikitext anttasks,
but also downloading them when needed (an old Xtext ant task, seee [1]).
It seems as if this ant script is no longer maintained, as it contains
some bugs and some download locations are not available anymore.
Besides, as I'm using Tycho, all other (Eclipse) dependencies are
defined using p2 repositories, which is rather easy to handle.

I have included the Wikitext anttask into my Maven script, similar to
the Maven script of the Wikitext help.ui pom [2]:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<taskdef
resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties"
classpathref="maven.plugin.classpath" />
<wikitext-to-eclipse-help
markupLanguage="org.eclipse.mylyn.wikitext.textile.core.TextileLanguage"
helpPrefix="help"
dest="${basedir}">
<fileset dir="src/textiles" includes="**/*.textile"/>
</wikitext-to-eclipse-help>
...
</target>
</configuration>
<goals><goal>run</goal></goals>
</execution>
</executions>
...

This is not working, as the resource
"org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties" is not
found in the taskdef task. This properties file is part of the
org.eclipse.mylyn.wikitext.core bundle, so I tried to let Maven download
that bundle somehow.

I have tried to add the Maven update site to the list of repositories as
follows:

<repository>
<id>mylyn-weekly</id>
<url>http://download.eclipse.org/mylyn/snapshots/weekly</url>
<layout>default</layout>
</repository>

This does not work as the update site is not a Maven repository:

[WARNING] The POM for
org.eclipse.mylyn.docs:org.eclipse.mylyn.wikitext.core:jar:1.6.0 is
missing, no dependency information available
[WARNING] The POM for
org.eclipse.mylyn.docs:org.eclipse.mylyn.wikitext.textile.core:jar:1.6.0
is missing, no dependency information available

So I changed the layout to p2:

<repository>
<id>mylyn-weekly</id>
<url>http://download.eclipse.org/mylyn/snapshots/weekly</url>
<layout>p2</layout>
</repository>


With this setting, the wikitext bundle is successfully downloaded when a
plugin dependency such as

Require-Bundle: org.eclipse.mylyn.wikitext.core;bundle-version="1.6.0"

is defined. However, in my case it is not a plugin dependency, but the
ant task defined in this plugin is required during build time. That is,
the bundle is available for compilation purposes, but not for loading
classes from it via taskdef.

In [2], the following dependency

<dependency>
<groupId>org.eclipse.mylyn.docs</groupId>
<artifactId>org.eclipse.mylyn.wikitext.core</artifactId>
<version>1.6.0</version>
</dependency>

can be resolved, but unlike the wikitext build system, the wikitext
artifact is not created in my build. Apparently, Maven cannot resolve a
dependency using the artifactId when the artifact is a bundle and the
repository is a p2 update site. Or do I simply have to change the
artifactId?

Maybe it comes down to the question on how to enable third party
anttasks defined in a p2 repository and defined with ant's taskdef, to
be used in a Maven/Tycho build.

Cheers,
Jens



[1]
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.tmf/org.eclipse.xtext/plugins/org.eclipse.xtext.doc/customBuild.xml?root=Modeling_Project&view=log

[2]
http://git.eclipse.org/c/mylyn/org.eclipse.mylyn.docs.git/tree/org.eclipse.mylyn.wikitext.help.ui/pom.xml
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:[wikitext] Programaticaly open MarkupEditor
Next Topic:"No search provider was registed. Tasks search is not available."
Goto Forum:
  


Current Time: Sun May 26 00:18:32 EDT 2013

Powered by FUDForum. Page generated in 0.01576 seconds