Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Maven User
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h4>Overview</h4> <p>Purpose of this document is to consolidate ideas from Maven users for upcoming 2.1.</p> <h5>Maven bootstrapper plugin.</h5> <p>A plugin that replaces an executable jar's main method as listed in the META-INF folder. The method could be replaced with a special class added to the jar that is able to download enough Maven to get Maven running on that machine and installed in the user folder. The POM that is inside the jar can then be used to locate that jars dependencies and install them into the user's local repository. If maven is already installed, then it could simply use the maven repository to contain its runtime set, and add all required jars to the classpath right then. This would be similar functionality as the current assembly plugin, except that instead of packaging the Jar with other Jars, it packages a Maven bootstrapper. (I am not very good with Wikis, so if this needs to be reformatted, please do so.)</p> <p>An alternative design could be:</p> <table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> MavenClassLoader cl = new MavenClassLoader(); // << Contain it all in one .class file? cl.allowRemoteDownload(true); // Defaults to false for security? cl.loadSelfDependencies(); // opens META-INF/maven folders for this artifacts dependencies cl.loadDependency(MavenClassLoader.RUNTIME, "groupid", "artifactid", "version"); // Could have more args for other artifact resolving keys cl.loadDependencyNonTransitive("groupid", "artifactid", "version"); // non-transitive version // some code to set the current thread classloader not shown... </pre></td></tr></table> <p>As each class on that thread is loaded the MavenClassLoader would be resposible for checking the user's settings.xml for the repository location, or creating a settings.xml with defaults. Once the repository is located, it will get local copies of the artifacts required for the dependency sets. If the dependencies are not there it can then go to the remote repositories and download them to the local repo. If all of this is done better by first installing enough of the Maven jars, then it should do that instead, and load the dependencies that way.</p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced