Skip to content

Commit

Permalink
[resolves wildfly-extras#766] Create simple archetypes for camel project
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Aug 12, 2015
1 parent dd179e9 commit 0b9ca77
Show file tree
Hide file tree
Showing 26 changed files with 1,368 additions and 1 deletion.
77 changes: 77 additions & 0 deletions archetypes/archtype-cdi/pom.xml
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
Wildfly Camel Archetypes :: Archetype CDI
%%
Copyright (C) 2013 - 2015 RedHat
%%
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#L%
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.wildfly.camel</groupId>
<artifactId>wildfly-camel-archetype</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>

<name>Wildfly Camel :: Archetypes :: CDI</name>
<artifactId>wildfly-camel-archetype-cdi</artifactId>
<packaging>maven-archetype</packaging>

<!-- Build -->
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</testResource>
<testResource>
<directory>src/test/resources/projects/test-archetype-cdi</directory>
<filtering>true</filtering>
<includes>
<include>**/*.properties</include>
</includes>
</testResource>
</testResources>
</build>

<!-- Profiles -->
<profiles>
<profile>
<id>ts.all</id>
<activation>
<property>
<name>ts.all</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.build</groupId>
<artifactId>wildfly-server-provisioning-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
name="wildfly-camel-archetype-cdi"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requiredProperties>
<!-- Dependency versions -->
<requiredProperty key="version-apache-camel">
<defaultValue>${version.apache.camel}</defaultValue>
</requiredProperty>
<requiredProperty key="version-javax-enterprise">
<defaultValue>${version.javax.enterprise}</defaultValue>
</requiredProperty>
<requiredProperty key="version-jboss-arquillian">
<defaultValue>${version.jboss.arquillian.core}</defaultValue>
</requiredProperty>
<requiredProperty key="version-jboss-spec-javax-ejb">
<defaultValue>${version.jboss.spec.javax.ejb}</defaultValue>
</requiredProperty>
<requiredProperty key="version-junit">
<defaultValue>${version.junit}</defaultValue>
</requiredProperty>
<requiredProperty key="version-wildfly">
<defaultValue>${version.wildfly}</defaultValue>
</requiredProperty>
<requiredProperty key="version-wildfly-arquillian">
<defaultValue>${version.wildfly.arquillian}</defaultValue>
</requiredProperty>
<requiredProperty key="version-wildfly-camel">
<defaultValue>${project.version}</defaultValue>
</requiredProperty>

<!-- Plugin versions -->
<requiredProperty key="version-maven-compiler-plugin">
<defaultValue>${version-maven-compiler-plugin}</defaultValue>
</requiredProperty>
<requiredProperty key="version-maven-surefire-plugin">
<defaultValue>${version-maven-surefire-plugin}</defaultValue>
</requiredProperty>
<requiredProperty key="version-maven-war-plugin">
<defaultValue>${version-maven-war-plugin}</defaultValue>
</requiredProperty>
<requiredProperty key="version-wildfly-maven-plugin">
<defaultValue>${version-wildfly-maven-plugin}</defaultValue>
</requiredProperty>
</requiredProperties>
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>src/test/resources</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory></directory>
<includes>
<include>**/*.md</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
@@ -0,0 +1,62 @@
# ${artifactId}

This is a template Apache Camel CDI application for the WildFly-Camel subsystem.

This project is setup to allow you to create a Apache Camel CDI application, which can be deployed to an application
server running the WildFly-Camel subsystem. An example CDI Camel Route has been created for you, together with an Arquillian
integration test.

## Prerequisites

* Minimum of Java 1.7
* Maven 3.2 or greater
* WildFly application server version ${version-wildfly}

## Getting started

1. Install WildFly-Camel subsystem distribution version ${version} on your application server

2. Conifgure a `$JBOSS_HOME` environment variable to point at your application server installation directory

3. Start the application server from the command line

For Linux:

`$JBOSS_HOME/bin/standalone.sh -c standalone-camel.xml`

For Windows:

`%JBOSS_HOME%\bin\standalone.bat -c standalone-camel.xml`

### Building the application

To build the application do:

`mvn clean install`

### Run Arquillian Tests

By default, tests are configured to be skipped as Arquillian requires the use of a container.

If you already have a running application server, you can run integration tests with:

`mvn clean test -Parq-remote`

Otherwise you can get Arquillian to start and stop the server for you (Note: you must have `JBOSS_HOME` configured beforehand):

`mvn clean test -Parq-managed`

### Deploying the application

To deploy the application to a running application server do:

`mvn clean package wildfly:deploy`

### Undeploying the application

`mvn wildfly:undeploy`

## Further reading

* [WildFly-Camel documentation] (https://www.gitbook.com/book/wildflyext/wildfly-camel)
* [Apache Camel documentation] (http://camel.apache.org/)

0 comments on commit 0b9ca77

Please sign in to comment.