...
Creating
...
a
...
new
...
Spring
...
based
...
Camel
...
Route
...
If
...
you
...
want
...
to
...
create
...
your
...
own
...
version
...
of
...
the
...
...
...
you
...
can
...
use
...
the
...
maven
...
archetype.
Code Block |
---|
} mvn archetype:create \ -DarchetypeGroupId=org.apache.camel \ -DarchetypeArtifactId=camel-router \ -DarchetypeVersion=1.1.0 \ -DgroupId=myGroupId \ -DartifactId=myArtifactId {code} *Note*: The newer version |
Note: The newer version 2.0-alpha-1
...
of
...
the
...
maven-archetype-plugin
...
breaks
...
the
...
above
...
command.
...
As
...
a
...
workaround
...
until
...
this
...
gets
...
resolved
...
you
...
can
...
specify
...
the
...
version
...
explicitly
...
as
...
below.
Code Block | ||
---|---|---|
| ||
{ mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create \ -DarchetypeGroupId=org.apache.camel \ -DarchetypeArtifactId=camel-router \ -DarchetypeVersion=1.1.0 \ -DgroupId=myGroupId \ -DartifactId=myArtifactId } |
This
...
will
...
create
...
a
...
maven
...
project
...
which
...
can
...
be
...
run
...
immediately
...
via
...
the
...
...
...
...
as
...
follows
Code Block |
---|
} cd myArtifactId mvn camel:run {code} |
The
...
configuration
...
file
...
is
...
in
...
src/main/resources/META-INF/spring/camel-context.xml
...
.
...
The
...
routing
...
rules
...
lives
...
at
...
src/main/java/myGroupId/MyRouteBuilder.java
...