mirror of https://github.com/apache/maven.git
o generate sources example
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@312942 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46c22374bc
commit
4ed16ee07f
|
@ -1,10 +1,17 @@
|
|||
----
|
||||
Guides
|
||||
-----
|
||||
Jason van Zyl
|
||||
-----
|
||||
12 October 2005
|
||||
-----
|
||||
- multi module howto
|
||||
- per user scm setup
|
||||
- outline behaviour when connection and developConnection are defined
|
||||
|
||||
Our current URL looks like:
|
||||
scm:cvs:pserver:@cvs.host.name:/cvsroot:module-version
|
||||
|
||||
Using this URL, the default is to connect to the CVS server using the
|
||||
same userid as the current user. This is the desired behavior and I
|
||||
don't want to mess that up. I just would like a means to add a userid
|
||||
in the URL only in special circumstances like Continuum.
|
||||
|
||||
We might want to do something where we say it is a best practice to
|
||||
specify a ${user} and take it from the environment and allow an override.
|
||||
|
||||
* Guide to using project properties
|
||||
|
||||
|
@ -12,6 +19,8 @@ Actually, no. It's *like* the properties defined in profiles in syntax,
|
|||
but this is a properties section that is specified as a direct child of
|
||||
the <project> element. So:
|
||||
|
||||
- testing a plugin
|
||||
|
||||
+----+
|
||||
|
||||
<project>
|
||||
|
@ -124,16 +133,3 @@ I've pasted an example of a trivial modified settings.xml file below.
|
|||
<localRepository>F:\m2-repository\repository</localRepository>
|
||||
</settings>
|
||||
|
||||
==
|
||||
|
||||
example of generating sources
|
||||
|
||||
==
|
||||
|
||||
How to modify the manifest.
|
||||
|
||||
~~ * How do I deal with a dependency that is already supplied by my runtime?
|
||||
|
||||
+-----+
|
||||
|
||||
~~ How to do a test release and deployment. Trying to work through this with raphael at the moment.
|
||||
|
|
|
@ -5,3 +5,57 @@
|
|||
------
|
||||
12 October 2005
|
||||
------
|
||||
|
||||
Let's run though a short example to try and help. To generate sources you must first have a plugin that
|
||||
participates in the generate-sources phase like the Antlr plugin:
|
||||
|
||||
+----+
|
||||
|
||||
/**
|
||||
* @goal generate
|
||||
* @phase generate-sources
|
||||
* @requiresDependencyResolution compile
|
||||
* @description Antlr plugin
|
||||
*/
|
||||
|
||||
+----+
|
||||
|
||||
The first two lines say "I want to be fit into the generate-sources
|
||||
phase and my 'handle' is generate".
|
||||
|
||||
So this is all fine and dandy, we have a plugin that wants to generate
|
||||
some sources from a Antlr grammar but how do we use it. You need to
|
||||
specify that you want to use it in your POM:
|
||||
|
||||
+----+
|
||||
|
||||
<project>
|
||||
...
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antlr-plugin</artifactId>
|
||||
<configuration>
|
||||
<grammars>java.g</grammars>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
...
|
||||
</project>
|
||||
|
||||
+----+
|
||||
|
||||
If you then type "m2 compile" m2 will walk through the {{{../introduction/introduction-to-the-lifecycle.html}lifecycle}}
|
||||
and will eventually hit the generate-sources phase and see you have a plugin configured that
|
||||
wants to participate in that phase and the antlr plugin is executed with
|
||||
your given configuration.
|
||||
|
||||
|
|
Loading…
Reference in New Issue