maven/maven-site/src/site/apt/guides/getting-started/ideas.txt

204 lines
4.8 KiB
Plaintext
Raw Normal View History

+-----+
multiple repositories
<project>
...
<repositories>
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>my-repo</id>
<name>your custom repo</name>
<url>http://jarsm2.dyndns.dk</url>
</repository>
</repositories>
...
</project>
if you specify repositories in profiles you must remember to activate that
particular profile!
and the use of mirrors
==
Project properties
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:
<project>
~ ...
~ <properties>
~ <name>value</name>
~ </properties>
</project>
==
Profile inheritance the same as standard inheritence and resources sets are currently not
inherited.
DefaultModelInheritenceAssembler.
Merged:
- dependencies
- developers and contributors
- plugin lists (including reports)
- plugin executions with matching ids
- plugin configuration
==
System vars are accessed implicitly in m2...try:
<configuration>
<debug>${build.debug}</debug>
<source>${build.jdk}</source>
<target>${build.jdk}</target>
</configuration>
==
How to attach sources to a release?
> How does the sources plugin realize that it is part of a snapshot
> build, and therefore not generate a sources JAR?
>
> I didn't notice anything obvious in the source code for the Mojo at
It only does so when the release profile (see the root POM) is activated.
==
How do I get the list of artifacts within my plugin?
You must use the @requiresDependencyResolution tag in your plugin.
==
How to best setup a multi-module build and make versions easiest to manage
==
Integrate Jesse's archetype work.
And how do I make archetypes for use in my organization?
==
How to do a test release and deployment. Trying to work through this with
raphael at the moment.
==
How to get started behind an NTLM proxy.
use the fat http client and add it as an extension to the POM. Do we
support ntmlv2:
http://www.mail-archive.com/httpclient-dev@jakarta.apache.org/msg01861.html
==
Using extensions and why they are needed.
==
How to use Ant constructs from m2.
==
How maven's classloaders work
==
How artifact resolution works, this would be a long one more advanced in
scope.
==
Archetype generation problems:
This looks like:
http://jira.codehaus.org/browse/MNG-916
Please check ~/.m2/plugin-registry.xml - if that has RELEASE as a
version in there somewhere, remove it - that should correct the
problem.
==
When creating your own lifecycles:
This is a missing instruction on the build lifecycle page. You need to
add the plugin to the project, <extensions>true</extensions>
==
How snapshots works
==
How do i use the lifecycle provided by a plugin:
make sure you turn on the extension option
<packaging>nbm</packaging>, <build><plugins><plugin><groupId/><artifactId/><extensions>true</extensions></plugin></plugins></build>
==
What expressions are available for use in the mojos?
<jason> maybe i can generate doco from @tags in the expression evaluator or something
<jason> that's where it's localized right?
<jdcasey> um, sort of
<jdcasey> we have the roots there, but we're using the ReflectionValueExtractor from there
<jdcasey> it can easily get pretty ugly
<jason> i'll make a list of those
<jdcasey> I'm thinking of making a mapping resource for expressions, for use in the error diagnoser...maybe we can reuse that?
<jason> of the ones that are not referenced in the plugin expression evaluator where can i find them?
<jason> sure
<jason> a single place would be nice
<jdcasey> they're (a) listed in the expression evaluator, (b) available as POM properties, (c) available as system properties, or (d) available reflectively from the api rooted in one of the four or five data objects
<jdcasey> yup, I think we need that
note from andy
Jason,
Follow up to our irc chat about suggesting that windows m2 users move their
repos to a location without embedded spaces. I think it would be helpful to
people if we were to place a notification about this in a prominent place
on the M2 site and in the getting started guide. Parting of the marketing
chat could be "Windows M2 Users Prepare for surefire and Java compiler
forking by moving your M2 repository to a file system location that doesn't
contain embedded spaces!"
The default user.home on windows is c:\documents and settings\<username>\
The repo location can be changed in the settings.xml file located at
${user.home}/.m2/settings.xml
I've pasted an example of a trivial modified settings.xml file below.
<settings>
<localRepository>F:\m2-repository\repository</localRepository>
</settings>
==
example of generating sources
==
How to modify the manifest.
+-----+