[
https://issues.jboss.org/browse/JBIDE-6214?page=com.atlassian.jira.plugin...
]
Snjezana Peco resolved JBIDE-6214.
----------------------------------
Fix Version/s: 3.2.0.CR1
(was: 3.2.x)
Resolution: Done
I have created a new extension point - the
org.jboss.tools.project.examples.importProjectExamples extension point that enables a user
to import project examples that aren't Eclipse projects.
This extension point is implemented for maven projects in the
org.jboss.tool.maven.project.examples plugin (the
org.jboss.tools.maven.project.examples.feature feature) as follows:
<extension
point="org.jboss.tools.project.examples.importProjectExamples">
<importProjectExample
class="org.jboss.tools.maven.project.examples.ImportMavenProjectExample"
name="Import Maven Project Examples"
type="maven">
</importProjectExample>
</extension>
The org.jboss.tools.maven.project.examples.ImportMavenProjectExample class has to
implement IImportProjectExample (or to extend AbstractImportProjectExample class).
The type element is a marker that determinates the way in which a project example will be
imported.
An example of a project example that imports a pure maven project is defined on a new
site - JBoss Tools Maven Project Examples. If a maven project example would be defined in
an old site, JBT <= 3.2.0.Beta2 would try to import it as an Eclipse project.
I have created the example using the weld-jsf-login example from the Weld 1.0.1.Final
distribution. The project example definition looks as follows:
<project>
<category>Weld 1.0.1</category>
<name>weld-jsf-login</name>
<included-projects>
weld-examples-parent,weld-jsf-login
</included-projects>
<shortDescription>Weld JSF login example</shortDescription>
<description>
The example demonstrates user login/logout for an application that uses JSF.
It will create the weld-examples-parent and weld-jsf-login project in your workspace.
</description>i
<size>17532</size>
<
url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/weld-ex...
<importType>maven</importType>
<importTypeDescription>The project example requires the m2eclipse-core,
m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
</project>
New elements are the following:
importType (maven) - marks the project example as a maven project that will be imported in
a separate way
importTypeDefinition - a message appearing if the user doesn't have the required
features (importing a maven project requires the m2eclipse-core, m2eclipse-wtp and JBoss
Maven Project Examples feature).
The
http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/weld-examples/...
file contains a pure maven project. It is the examples directory from the Weld 1.0.1
distribution from which the following directories have been removed: lib, se, wicket,
jsf/numberguess, jsf/permalink, jsf/pastecode and jsf/translator. All the modules except
the login module are also removed from the root's pom.xml.
It is possible easily packs the complete examples directory and all the Weld examples will
be imported to the workspace.
If you look at
http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/weld-examples/...,
you will see that it is a pure Maven project that doesn't contain Eclipse artifacts.
The imported weld-jsf-login project contains the JBoss CDI facet and can use all the JBoss
Tools features. The user can easily create the JBoss AS 6.0 (or any other AS that includes
CDI),deploy and execute the application.
It is also possible to create a project example based on a maven archetype. The user would
only need to enter the artifactId and groupId of the project he wants to create. He
wouldn't need to enter the artifactId, groupId, version and repository of the
archetype.
I have added the org.jboss.tool.maven.project.examples plugin and
org.jboss.tools.maven.project.examples.feature feature and updated the according pom.xml
files.
Support project example with no Eclipse metadata, only pom.xml, in
zip
----------------------------------------------------------------------
Key: JBIDE-6214
URL:
https://issues.jboss.org/browse/JBIDE-6214
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: project-examples
Affects Versions: 3.1.0.GA
Reporter: Pete Muir
Assignee: Snjezana Peco
Fix For: 3.2.0.CR1
If projects want to incorporate producing project examples into their release process,
they are likely not to have any valid eclipse metadata available for the example when
using Maven.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira