<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Maven Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/maven/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/maven/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:30:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Difference between Maven 1 and Maven 2</title>
		<link>https://www.scmgalaxy.com/tutorials/difference-between-maven-1-and-maven-2-2/</link>
					<comments>https://www.scmgalaxy.com/tutorials/difference-between-maven-1-and-maven-2-2/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 09 Jan 2018 07:23:27 +0000</pubDate>
				<category><![CDATA[Tools Comparison]]></category>
		<category><![CDATA[Compare Maven 1 and Maven 2]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Maven 1 and Maven 2 Comparison]]></category>
		<category><![CDATA[Maven 1 and Maven 2 Difference]]></category>
		<category><![CDATA[Maven 1 Review]]></category>
		<category><![CDATA[Maven 2 Review]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4590</guid>

					<description><![CDATA[<p>What is Maven 2? Maven 2.0 is a complete rewrite of the &#8216;original&#8217; Maven application (&#8216;Maven 1&#8217;). As such, it [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/difference-between-maven-1-and-maven-2-2/">Difference between Maven 1 and Maven 2</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>What is Maven 2?</strong><br />
Maven 2.0 is a complete rewrite of the &#8216;original&#8217; Maven application (&#8216;Maven 1&#8217;). As such, it is very different from Maven 1, and not backwards-compatible (eg, it cannot execute Maven 1 plugins). However, Maven 2.0 is the latest stable release of the Maven application, and new users are generally encouraged to use it for all new projects.<br />
If you are familiar with Maven 1, you can find some information about moving to Maven 2 <a href="http://maven.apache.org/maven1.html">here</a> or on the main <a href="http://maven.apache.org/">Maven</a> site.<br />
<strong>Maven 1</strong><br />
To access <a href="http://download.java.net/maven/1/">the repository</a> from your project, add the following line to your project.properties or build.properties.<br />
maven.repo.remote=<a href="http://download.java.net/maven/1/,http://www.ibiblio.org/maven/" rel="nofollow">http://download.java.net/maven/1/,http://www.ibiblio.org/maven/</a><br />
<strong>Maven 2</strong><br />
For Maven2, one needs to add the following into a project&#8217;s pom.xml, or into conf/settings.xml &lt;settings&gt;/&lt;profiles&gt;/&lt;repositories&gt; (NOT in mirrors/mirror) where Maven2 is installed:</p>
<p>&lt;repository&gt;<br />
&lt;id&gt;java.net&lt;/id&gt;<br />
&lt;url&gt;<a href="http://download.java.net/maven/1%3C/url%3E" rel="nofollow">http://download.java.net/maven/1&lt;/url&gt;</a>;<br />
&lt;layout&gt;legacy&lt;/layout&gt;<br />
&lt;/repository&gt;</p>
<h4>Maven 2 Lifecycles</h4>
<p>Lifecycles are groupings of goals that define a process for building a project. Goals are bound to lifecycles to define a sequence that must be accomplished to produce results. Lifecycles ensure that users building projects with Maven only need to learn a small set of commands. Whereas Maven defines a default set of goals for each typical lifecycle, developers can bind additional goals to lifecycles to transparently add functionality to a build.<br />
Typical lifecycles include:</p>
<ul>
<li>compile—compile the source code</li>
<li>test—unit test the compiled source.</li>
</ul>
<p>Note: Unit tests should not require the classes to be packaged or deployed.</p>
<ul>
<li>package—bundle the compile and tested source code into a distributable package, such as a jar or war.</li>
<li>integration-test—employ the package as necessary and run integration tests.</li>
<li>install—install the package into the local repository. This allows the package to be utilized as a dependency of other projects.</li>
<li>deploy—copies the final package into the remote repositories for sharing and use with other projects.</li>
</ul>
<p>As you can see, each lifecycle depends upon and builds upon the next. As a result, when a goal is bound to the compile lifecycle, all lifecycles will ensure its execution.<br />
Lifecycles can be executed in conjunction with standalone goals. For instance, commonly the clean:clean goal is executed before the install goal. This is done by invoking:</p>
<pre>m2 clean:clean install</pre>
<h4>Native Multiproject Support</h4>
<p>One of the best practices that Maven strongly encourages is the idea that a single project should result in a single artifact, or package, being created. This best practice results in simplified builds and organized project structures. By natively supporting a hierarchical structure of projects, Maven now makes developing enterprise projects which implement this approach easier.<br />
Maven 1 included a plugin for working with related of projects—or multiprojects. Maven 2 takes multiproject builds a step further by including a specialized parent descriptor and native multiproject execution support. As a result, any goals or lifecycles invoked upon a multiproject POM will result in each subproject goal being achieved.</p>
<h4>Other Enhancements</h4>
<p>Several other changes are included in Maven 2. Maven has been rewritten to be smaller and faster. The architectural changes make embedding Maven into other tools easier and allows for faster command line execution. Maven 2 depends upon fewer dependencies, resulting in a smaller distribution.<br />
The way extensions are made to Maven has been changed in Maven 2. Instead, developers are encouraged to utilize JavaBeans for enhancements. Whereas scripting is allowed (through marmalade support—which includes a jelly facade), it is no longer the tool of choice. All extensions are made through the development of plugins (projects can no longer be customized through scripting in the maven.xml).<br />
The introduction of a settings.xml file replaces the need for properties files. The settings file can be defined at a system, user, or project level. Settings are used to define private configuration information, including usernames and passwords. Project properties (including plugin configuration) are now all defined in the pom.xml.</p>
<h4>Understanding Maven 2 Project Types</h4>
<p>The first step to creating a maven project is determining which project template, or archetype, your Maven project should be configured as. Archetypes define which type of artifact will be produced by a project. Several archetype templates exist. The standard archetype will produce a standard library jar file. Templates also exist for webapps/wars, Maven plugin projects, documentation Web sites, and more.</p>
<h4>Creating Project Descriptors</h4>
<p>The archetype:create goal can be utilized to create a basic pom.xml for you project. This basic POM will allow you to execute all of the lifecycles and goals associated with any maven project. The archetype:create goal should be executed as follows:</p>
<pre>m2 archetype:create -DgroupdId=com.daviddewolf.maven -DartifactId=example</pre>
<p>This simple command creates the basic infrastructure needed for a project. It creates the pom.xml as well as the basic directory structure of for both source and test code. The following structure indicates the directories and files produced by issuing the archetype:goal command as listed above.</p>
<pre>+ root</pre>
<pre>  - pom.xml</pre>
<pre>  + src</pre>
<pre>    + main</pre>
<pre>      + java</pre>
<pre>        + com</pre>
<pre>          + daviddewolf</pre>
<pre>            + maven</pre>
<pre>              + example</pre>
<pre>                - App.java</pre>
<pre>    + test</pre>
<pre>      + java</pre>
<pre>        + com</pre>
<pre>          + daviddewolf</pre>
<pre>            + maven</pre>
<pre>              + example</pre>
<pre>                - TestApp.java</pre>
<p>This simple structure that is created is enough to get started with Maven. All of the lifecycles now can be utilized. A simple invocation of the install lifecycle will compile, test, and package the application and then deploy it to the local system repository for use by other projects.<br />
Once created, the POM can be customized to meet the requirements of the specific project. Documentation on the Maven POM can be found <a href="http://maven.apache.org/maven2/maven-model/maven.html" target="new" rel="noopener">on the Maven2 Web site</a>.</p>
<h4>Goals You Should Know About</h4>
<p>The introduction of lifecycles in Maven 2 has greatly reduced the number of goals that a developer must be aware of. Still, the following goals will undoubtedly be found useful (and can be utilized as soon as the basic descriptor has been generated).</p>
<ul>
<li>clean:clean Clean all artifacts and intermediary files created by Maven</li>
<li>idea:idea Generate project files for the IntelliJ IDEA IDE</li>
<li>eclipse:eclipse Generate project files for the Eclipse IDE</li>
<li>javadoc:javadoc Generate the javadocs for the project</li>
<li>antrun:run Run a specified ant target</li>
<li>clover:clover Generate a coverage report for the project</li>
<li>checkstyle:checkstyle Generate a checkstyle report for the project</li>
<li>site:site Generate a documentation Web site for the project. This site will include many information reports concerning the project.</li>
</ul>
<p>For more information concerning these and other goals, see the <a href="http://maven.apache.org/maven2/" target="new" rel="noopener">Maven2 Web site</a>.<br />
<strong>Conclusions</strong><br />
Learning Maven is not difficult; it simply requires a willingness to accept a new philosophy for building applications. Maven utilizes a a centralized project descriptor to intelligently build applications with prebuilt build tools. This differs greatly from ant and other build tools in that project developers are no longer required to write build systems by using a comprehensive set of utilities. This change will save development teams significant time and has started a revolution in build tools.<br />
It is important to remember that Maven2 is still currently only released as Beta Software. Although it is mature enough to utilize in most projects, all of the Maven 1 plugins have not yet been migrated to Maven 2. With time, Maven 2 will become more widely accepted and the number of available plugins will grow beyond what is even available in Maven 1.<br />
Reference:<br />
<a href="http://www.developer.com/open/print.php/10930_3552026_2">http://www.developer.com/open/print.php/10930_3552026_2</a><br />
<a href="http://www.sonatype.com/books/maven-book/reference/installation-sect-upgrade-detail.html">http://www.sonatype.com/books/maven-book/reference/installation-sect-upgrade-detail.html</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/difference-between-maven-1-and-maven-2-2/">Difference between Maven 1 and Maven 2</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/difference-between-maven-1-and-maven-2-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Writing a Custom Plugin for Maven</title>
		<link>https://www.scmgalaxy.com/tutorials/writing-a-custom-plugin-for-maven/</link>
					<comments>https://www.scmgalaxy.com/tutorials/writing-a-custom-plugin-for-maven/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 08 Jan 2018 12:03:04 +0000</pubDate>
				<category><![CDATA[Maven]]></category>
		<category><![CDATA[Custom Plugin for Maven]]></category>
		<category><![CDATA[How to create custom Maven plugins]]></category>
		<category><![CDATA[Maven Custom Plugin]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Write custom Maven plugins]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4545</guid>

					<description><![CDATA[<p>Introduction In this article, we will learn about Maven which is a project management framework that provides a configurable approach for managing software projects. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/writing-a-custom-plugin-for-maven/">Writing a Custom Plugin for Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, we will learn about <strong><em>Maven</em></strong> which is a <strong><em>project management framework</em></strong> that provides a configurable approach for managing software projects. Maven covers all the necessary phases that happen right from project creation, building, documentation, reporting, installation and deployment. This article begins with the basics of Maven along with the concepts like Project Object Model (aka POM), the various life-cycles in Maven etc. Then it continues with using Maven for creating a project till installation of the project in a local repository. The latter part of the article provides details about creating custom Maven plugins that can be executed in stand-alone mode as well as part of some Maven life-cycle.</p>
<h2>Maven Custom Plug-In (Example Code)</h2>
<ul>
<li><a href="http://www.javabeat.net/articles/sourcecode/2010/072010-maven-custom-plugin.zip">Download Sample Program for Maven Custom Plug-In</a></li>
</ul>
<h2 id="MavenConcepts">Maven Concepts</h2>
<p>In this section, we will see the basics of Maven concepts like <strong><em>Project Object Model</em></strong>, the <strong><em>standard lifecycles</em></strong> available in Maven as well as the <strong><em>dependency scope</em></strong> that comes up while dealing with dependency with projects.</p>
<h3>Project Object Model</h3>
<p>Project information, its dependencies and the artifacts that can be built are described in <strong><em>POM</em></strong> which is essentially a configuration file in XML. POM basically contains instructions on what needs to be done during the various life-cycles that happen during a build. Note that the POM is not coupled to java projects, in fact the project can be written in any language like C, C# etc. For example, consider the sample minimal POM,</p>
<p>&nbsp;</p>
<pre><code>&lt;project&gt;

    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

    &lt;name&gt;adder&lt;/name&gt;
    &lt;url&gt;http://www.javabeat.net/adder&lt;/url&gt;
    &lt;groupId&gt;net.javabeat.adder&lt;/groupId&gt;
    &lt;artifactId&gt;adder&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;

    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;junit&lt;/groupId&gt;
            &lt;artifactId&gt;junit&lt;/artifactId&gt;
            &lt;version&gt;3.8.1&lt;/version&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;

&lt;/project&gt;</code></pre>
<p>Have a look at the above POM. It defines the information about the project and its dependant projects. We will look into more details about the various POM elements.</p>
<p>&nbsp;</p>
<ul>
<li>modelVersion – This defines the version of the POM.</li>
<li>name – The name of the project.</li>
<li>groupId – This identifies the group (or the organization) that created the project. This property usually takes the domain address which represents the group or the organization so that uniqueness is maintained across the groups.</li>
<li>artifactId – This identifies the artifact (output component) name that comes from a project. Artifacts can be anything like a JAR, WAR, EAR etc</li>
<li>version – This property identifies the version of the artifact. Usually the version takes the format as &#8220;majorVersion.minorVersion-qualifier&#8221;. For example, &#8220;1.1-alpha&#8221;, &#8220;1.2-beta&#8221;, &#8220;1.3-SNAPSHOT&#8221;. packaging – Represents the type of artifact, for example – jar, war, ear etc.</li>
</ul>
<p>In the next section in the POM, we have included the dependencies of the project. Note that this section is optional. If there are no dependencies for a project (which is unlikely the case), this can be omitted. However, in this example case, we have declared a dependency to junit and it is expected that the project will contain some test resources. It is always a good idea to define the version of the artifact while defining a dependency, so that during runtime, we are not facing any issues because of version match. We have mentioned the scope as test, more details about this element will follow in the forthcoming section.</p>
<h3>Dependency Scope</h3>
<p>A project can depend on a number of dependent projects and Maven provides a way for defining the dependencies among projects through configuration. One can control the level of dependency through scope and the default being &#8216;compile&#8217;. The following scopes are available.</p>
<p>&nbsp;</p>
<ul>
<li>Compile &#8211; This being the default scope will be available at the classpath during the compilation as well as during runtime.</li>
<li>Runtime &#8211; The presence of this scope ensures that the dependency will be available at the runtime and not during the compile-time. For example, one may use the Servlet API during the compilation phase, however the Servlet implementation (from Sun, Oracle, IBM etc) will be required during the runtime only.</li>
<li>Test &#8211; This scope ensures that the dependency is available during the compilation of the test resources as well as during the execution of the test resources.</li>
<li>Provided &#8211; This dependency is mostly used while developing J2EE applications where the dependency is available as part of the J2EE container (or any Container) and it is not necessary for the project to package the dependency as part of the artifact. For example, while developing Enterprise bean applications, as part of the project, we will be using EJB jar for compilation; however, we never package this jar as part of the project because the EJB container will provide this jar.</li>
</ul>
<h3>Build Life-cycle</h3>
<p>A <strong><em>life-cycle</em></strong> defines the execution for achieving a set of goals. Each life-cycle defines a sequence of phases for achieving the goals. The</p>
<h2>Maven Custom Plug-In (Example Code)</h2>
<ul>
<li><a href="http://www.javabeat.net/articles/sourcecode/2010/072010-maven-custom-plugin.zip">Download Sample Program for Maven Custom Plug-In</a></li>
</ul>
<h2 id="UsingMaven">Using Maven</h2>
<p>In this section, we will see how to use maven for creating, compiling, building, packaging and installing a project. Download the latest version of Maven from <a href="http://maven.apache.org/download.html">here</a>. Installation of maven will be as simple as un-zipping the downloaded file into a desired directory. In this example, we will be seeing the usage of various maven plugins and goals that contributes to the entire project life-cycle. Before proceeding with the sample, create an environment variable MAVEN_HOME that points to the Maven installation directory and ensure that the PATH variable contains %MAVEN_HOME/bin.</p>
<h3>Creating a project</h3>
<p>Execute the following command which is used to create the initial project structure.</p>
<p>&nbsp;</p>
<pre><code>mvn archetype:create -DgroupId=net.javabeat.emailservice -DartifactId=emailservice</code></pre>
<p>Note that in <code>archetype:create</code>, <code>archetype</code> represents the <strong><em>plugin prefix</em></strong> and <code>create</code> represents the <strong><em>goal</em></strong>. This <strong><em>goal</em></strong>creates a project with the name <code>emailservice</code>. As soon as this command is executed, one can see a directory called <code>emailservice</code> which has the <code>src</code> folder for holding the main java files, along with java files representing test-cases. The POM file with the name pom.file will also be created with the structure as follows,</p>
<p><strong>pom.xml</strong></p>
<pre><code>&lt;project&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

    &lt;groupId&gt;net.javabeat.emailservice&lt;/groupId&gt;
    &lt;artifactId&gt;emailservice&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;

    &lt;name&gt;emailservice&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;

    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;junit&lt;/groupId&gt;
            &lt;artifactId&gt;junit&lt;/artifactId&gt;
            &lt;version&gt;3.8.1&lt;/version&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;

&lt;/project&gt;</code></pre>
<h3>Importing the project in Eclipse</h3>
<p>This step is optional for those who are not working with Eclipse being the IDE for developing the project. Change the current directory to <code>emailservice</code> and issue the following command. This goal <code>eclipse</code> creates the project metadata files that are complaint with Eclipse. As soon as the following goal is executed there will be two files generated in the current directory which are <code>.project</code> and <code>.classpath</code>. This is for Eclipse to understand so that the newly created project can be imported in Eclipse IDE to work with.</p>
<p>&nbsp;</p>
<pre><code>mvn eclipse:eclipse</code></pre>
<p>Now, for importing the project into Eclipse, Open Eclipse, go to File -&gt; Import -&gt; Existing Projects into Workspace and navigate to the directory containing the <code>.project</code> and <code>.classpath</code> files and Click OK. Now this project gets imported into Eclipse workspace.</p>
<h3>Adding files to project</h3>
<p>To make the project meaningful, we will add the following files into the main source folder.</p>
<p><strong>EMail.java</strong></p>
<pre><code>package net.javabeat.emailservice;

public class EMail {

    private String fromAddress;
    private String toAddress;
    private String subject;
    private String message;
    private String status;

    public String getFromAddress() {
        return fromAddress;
    }

    public void setFromAddress(String fromAddress) {
        this.fromAddress = fromAddress;
    }

    public String getToAddress() {
        return toAddress;
    }

    public void setToAddress(String toAddress) {
        this.toAddress = toAddress;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }		
}</code></pre>
<p>The above class represents the <code>Email</code> model object that will be used by <code>EmailService</code> class for sending email. Given below is the code listing for EMailService class.</p>
<p><strong>EMailService.java</strong></p>
<pre><code>package net.javabeat.emailservice;

public class EMailService {

    public EMail sendEmail(String fromAddress, String toAddress, String subject, String message){

        EMail emailObject = new EMail();
        emailObject.setFromAddress(fromAddress);
        emailObject.setToAddress(toAddress);
        emailObject.setSubject(subject);
        emailObject.setMessage(message);
        emailObject.setStatus("SUCCESS");

        System.out.println("Sending email from " + fromAddress + " to " + toAddress + "with subject "
		    + subject + " having the message contents " + message);
        return emailObject;
    }

</code></pre>
<p>In this section we will see how to write <strong><em>custom maven plugins</em></strong>. It is possible that the custom maven can be made to run outside the <strong><em>standard life-cycle phase</em></strong> or it can be made to be executed as part of the standard life-cycle phase. We will see how to accomplish both of these items in the following sections.</p>
<h3>Creating standalone plugins</h3>
<p>In this section, we will write a custom plugin and will see how to write it in stand-alone mode – i.e running the plugin directly without establishing any dependencies on any of the standard life-cycles available in Maven.</p>
<h4>Creating the project</h4>
<p>The first step is to create the project containing the custom maven plugin. This project is quite different from the regular java project because it is not a regular java artifact like JAR, WAR etc. Instead it is going to be a maven plugin. Issue the following command to create the <strong><em>maven plugin project</em></strong>.</p>
<p>&nbsp;</p>
<p><code>mvn archetype:create -DgroupId=net.javabeat.maven -DartifactId=environment-info -DarchetypeArtifactId=maven-archetype-mojo</code></p>
<p>The above command creates a project with the name environment-info with the standard directory layout containing the source and test resources. If you look into the POM file, the package type will be <code>maven-plugin</code> to indicate that this is a maven plugin project.</p>
<h4>Importing the project into Eclipse</h4>
<p>This step is optional and this is for someone who wishes to work with the project in Eclipse IDE. Issuing the following with the current directory being <code>environment-info</code> creates the Eclipse <code>.project</code> and <code>.classpath</code> files. Now, open Eclipse and go to File -&gt; Import -&gt; Existing Project into Workspace and specify the directory to &lt;&lt;path to environment-info&gt;&gt; directory.</p>
<p>&nbsp;</p>
<p><code>mvn eclipse:eclipse</code></p>
<h4>Creating the plugin</h4>
<p>In Maven, the plugin that achieves a specific task is called by the name <strong><em>MOJO</em></strong> (Maven Old Java Object similar to POJO). A <strong><em>MOJO</em></strong> defines the goal which is nothing but the custom action which is executed upon user&#8217;s request. In this example, we will see a custom MOJO that will define the goal of storing all the environmental properties in a text file upon execution. Have a look at the following code,</p>
<p><strong>EnvironmentInfoTask.java</strong></p>
<p><code>package net.javabeat.maven;  import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.util.Iterator; import java.util.Map;  import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException;  /**  * @goal env-info  */ public class EnvironmentInfoTask extends AbstractMojo{      /**      * @parameter       *     default-value="log.txt"      *     expression="${environment.filename}"      */     private String fileName; 	     /**      * @parameter       *     default-value="C:\\temp"      *     expression="${environment.base_dir}"      */     private File baseDirectory; 	     /**      * @parameter       *     default-value="true"      *     expression="${environment.loggingRequired}"     */	     private boolean loggingRequired; 	     public void execute() throws MojoExecutionException, MojoFailureException { 		         StringBuilder fileContents = new StringBuilder(); 		         if (baseDirectory.exists()){			             baseDirectory.mkdirs();             log("Created base directory '" + baseDirectory.getAbsolutePath() + "'");			         } 		         Map&lt;String, String&gt; environment = System.getenv();         Iterator&lt;Map.Entry&lt;String, String&gt;&gt; entries = environment.entrySet().iterator(); 		         fileContents.append("Environment Information:" + newLine());         fileContents.append("-----------------------------------------------------------" + newLine()); 		 		         while (entries.hasNext()){ 			             Map.Entry&lt;String, String&gt; entry = entries.next();             fileContents.append(entry.getKey() + "-------------&gt;" + entry.getValue() + newLine());         } 		         fileContents.append("-----------------------------------------------------------" + newLine());         writeToFile(fileContents);         log("File contents written");	     }      private void log(String message){ 		         if (loggingRequired){             System.out.println(message);         }     } 	     private static String newLine(){         return System.getProperty("line.separator");     } 	     private void writeToFile(StringBuilder fileContents){          FileWriter fWriter = null;         BufferedWriter bWriter = null;          try{			             fWriter = new FileWriter(baseDirectory + File.separator + fileName);             bWriter = new BufferedWriter(fWriter);             bWriter.write(fileContents.toString());			         }catch (Exception e){             log("Error in writing the contents to file -&gt;" + e.getMessage());         }finally{			             try{                 if (bWriter != null){                     bWriter.close();				                 }                 if (fWriter != null){                     fWriter.close();				                 }				             }catch (Exception e){                 log("Error in closing the resources -&gt;" + e.getMessage());             }         }     } }</code></p>
<p>The first thing to notice is the class <code>EnvironmentInfoTask</code> which is going to persist the environmental information into a file extends <code>AbstractMojo</code> class which in turn extends the <code>Mojo</code> interface. Note that the goal for this MOJO is annotated using <strong><em>XDoclet</em></strong> using <code>goal</code> attribute with the name <code>env-info</code>. The method that will be called during execution of the MOJO is <code>execute()</code>. This method does the job of persisting the environmental properties by taking information from the various properties .</p>
<p>&nbsp;</p>
<ul>
<li>Base Directory – the directory under which the log file name will be created which is of type &#8216;java.io.File&#8217;. Note that we have used XDoclet &#8216;parameter&#8217; for annotating this property. This property has the default value &#8216;C:\\temp&#8217; which means the this is the default location for the log file. However, this value can be overridden at runtime by specifying the property &#8216;environment.base_dir&#8217; which is an expression and its value will be resolved at runtime</li>
<li>Filename – the name of the log file into which the environmental properties will be written. Note that the default value for the log file name is &#8216;log.txt&#8217;. However, during runtime, the value can be overridden through the property &#8216;environment.filename&#8217;</li>
<li>Logging Required – whether logging information on what this MOJO is doing has to be shown. The default value being true can be overridden by specifying the value false to the property &#8216;environment.loggingRequired&#8217;.</li>
</ul>
<h4>Compiling the project</h4>
<p>Issue the following command for compiling the maven plugin project.</p>
<p>&nbsp;</p>
<p><code>mvn compile</code></p>
<h4>Packaging the project</h4>
<p>The following command is used to package the plugin project.</p>
<p>&nbsp;</p>
<p><code>mvn package</code></p>
<h4>Installing the project</h4>
<p>For installing the project into the local Maven repository, issue the following command.</p>
<p>&nbsp;</p>
<p><code>mvn install</code></p>
<p>Usually, on Windows, the local repository is <code>%USER_HOME%/.m2/repository</code>. On Windows XP, <code>USER_HOME</code> will expand to <code>"C:\\Document and  Settings\\&lt;&lt;UserName&gt;&gt;"</code>, however in Windows Vista it is <code>"C:\\Users\\&lt;&lt;UserName&gt;&gt;"</code>.</p>
<h4>Running the project</h4>
<p>There are several ways to run the maven plugin. We will see them one by one. Generally running a Maven plugin takes the following form,</p>
<p>&nbsp;</p>
<p><code>mvn groupId:artifactId:version:goalName</code></p>
<p>In our case, the group id is <code>net.javabeat.maven</code>, artifact id is <code>environment-info</code>, version is <code>1.0-SNAPSHOT</code> and goal name is <code>env-info</code>. So running the following command will run the custom plugin</p>
<p>&nbsp;</p>
<p><code>mvn net.javabeat.maven:environment-info:1.0-SNAPSHOT:env-info</code></p>
<p>Running the above command will create a directory <code>C:\\temp</code> (if not present) and create a file name with <code>log.txt</code> with the environment information. Because logging is enabled by default, the text &#8216;Created base directory <code>C:\temp</code>&#8216; and &#8216;File contents are written&#8217; will be displayed in the console.</p>
<p>It is also possible to configure the plugin by passing alternate input values. Have a look at the following command. This command specifies an alternate base directory <code>C:\\temp-new</code> for the log file <code>newLog.txt</code> with logging turned off. Note that for passing a property to a plugin the standard way is <code>–DpropertyName=propertyValue</code>.</p>
<p>&nbsp;</p>
<p><code>mvn net.javabeat.maven:environment-info:1.0-SNAPSHOT:env-info -Denvironment.base_dir=C:\temp-new -Denvironment.filename=newLog.txt -Denvironment.loggingRequired=false</code></p>
<p>It is also possible to omit the version information while running the plugin in which case, Maven tries to find the recent version for the plugin by comparing the version strings. In our case, this wouldn&#8217;t happen, because we have only one version which is <code>1.0-SNAPSHOT</code>. So the following command will also work.</p>
<p>&nbsp;</p>
<p><code>mvn net.javabeat.maven:environment-info:env-info</code></p>
<p>Another approach to run the plugin is by omitting the group id and just specifying the artifact id along with the goal name. However, for this to happen, we have to add the group id to the default list of groups that Maven will look for. Open the file <code>%MAVEN_HOME%/conf/settings.xml</code> and add the following line under the element <code>pluginsGroup</code>.</p>
<p>&nbsp;</p>
<p><code>&lt;pluginGroup&gt;net.javabeat.maven&lt;/pluginGroup&gt;</code></p>
<p>This ensures that we have added the group <code>net.javabeat.maven</code> to the list of default groups that Maven will search for, because of which the following command will work.</p>
<p>&nbsp;</p>
<p><code>mvn environment-info:env-info</code></p>
<h3>Attaching plugins to existing life-cycle</h3>
<p>So far, we have seen how to run a custom plugin in stand-alone mode. This is not of much-use and Maven provides a way for binding the goals of any custom plugin into existing build cycle. For example, let us consider that we have written a custom plugin which will simply print the current date and we want this plugin to be executed during the <code>compilation</code> phase and the <code>installation</code> phase of a project. We will see how to accomplish this goal in this section.</p>
<p>The following listing shows the custom plugin which will simply emit the date information.</p>
<p><strong>DateInfo.java</strong></p>
<p><code>package net.javabeat.maven;  import java.util.Date;  import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException;  /**  * @goal date-info  */ public class DateInfo extends AbstractMojo {      public void execute() throws MojoExecutionException, MojoFailureException { 		         Date currentDate = new Date();		         getLog().info("Current date is " + currentDate);     } }</code></p>
<p>Follow the same process of creating the project, then creating the plugin, compilation, packaging and installation as we have discussed before. We will see how to attach this custom plugin during the compile and the install phase. Open POM.xml file and add the following after the project dependencies element,</p>
<p>&nbsp;</p>
<p><code>&lt;build&gt;     &lt;plugins&gt;         &lt;plugin&gt;             &lt;groupId&gt;net.javabeat.maven&lt;/groupId&gt;             &lt;artifactId&gt;environment-info&lt;/artifactId&gt;             &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;              &lt;executions&gt;                 &lt;execution&gt;                     &lt;id&gt;date-info-compile&lt;/id&gt;                     &lt;phase&gt;compile&lt;/phase&gt;                     &lt;goals&gt;                         &lt;goal&gt;date-info&lt;/goal&gt;                     &lt;/goals&gt;                 &lt;/execution&gt;                  &lt;execution&gt;                     &lt;id&gt;date-info-install&lt;/id&gt;                     &lt;phase&gt;install&lt;/phase&gt;                     &lt;goals&gt;                         &lt;goal&gt;date-info&lt;/goal&gt;                     &lt;/goals&gt;                &lt;/execution&gt;              &lt;/executions&gt;          &lt;/plugin&gt;     &lt;/plugins&gt; &lt;/build&gt;</code></p>
<p>Though the above XML fragment is big, it is fairly simple. First thing is, it defines the execution element where we can define goals for executions. We have defined two execution elements one for the compile phase and the other for the install phase and we have given appropriate id for each execution element. Have a note at the goals section. We have included our custom goal <code>date-info</code> which will display the current date information. Note that where to search for the goal&#8217;s group id and the artifact id along with optional version is defined just above the executions element.</p>
<p>After this whenever we run <code>mvn compile</code> and <code>mvn  install</code> for any project that contains the above definition we will see that the goal <code>date-info</code> getting invoked during the phases.</p>
<h2>Conclusion</h2>
<p>In this article, we have seen how to use Maven for creating projects and to manage dependencies between projects. We have seen Maven simplifying the task of creating, compiling, packaging, installing projects thereby reducing the pain from developers and build managers. Also discussed in the article are the extension capabilities provided by Maven for pluging-in custom plugins in the form of MOJOs.</p>
<pre><code>}</code></pre>
<p>Note that there is no real functionality in the above, all it does is to accept the various user inputs and constructs an email object before returning it.</p>
<h3>Compiling the project</h3>
<p>The next step is to compile to project, by default the compilation process will create a folder called <code>target</code> and it will place the java class files along with any resource files, if present.</p>
<p>&nbsp;</p>
<pre><code>mvn compile</code></pre>
<p>Note that the location of the target folder as well as the location of the target folder is also configurable.</p>
<h3>Packaging the project</h3>
<p>This step will package the project with the packaging type mentioned in POM, which is JAR. Before packaging it will also execute the test cases (if specified) in the test folder and the packaged jar will be placed in the target folder.</p>
<p>&nbsp;</p>
<pre><code>mvn package</code></pre>
<h3>Installing the project</h3>
<p>The final step is to install the jar in a local repository so that other projects, if they are dependant on this project can make references to this project. The following command will install (i.e copy the jar) to the local repository.</p>
<p>&nbsp;</p>
<pre><code>mvn install</code></pre>
<p>Note that, by default, the local repository path will be <code>%USER_HOME%/.m2/repository</code>.</p>
<h2>Maven Custom Plug-In (Example Code)</h2>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/writing-a-custom-plugin-for-maven/">Writing a Custom Plugin for Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/writing-a-custom-plugin-for-maven/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Issue Management In Maven?</title>
		<link>https://www.scmgalaxy.com/tutorials/issue-management-in-maven/</link>
					<comments>https://www.scmgalaxy.com/tutorials/issue-management-in-maven/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 07 Dec 2017 06:43:27 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1975</guid>

					<description><![CDATA[<p>rajeshatbuzz created the topic: issueManagement in Maven? Any body provide some notes on issueManagement in Maven/. Rajesh scmuser replied the [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/issue-management-in-maven/">Issue Management In Maven?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshatbuzz created the topic: issueManagement in Maven?</strong><br />
Any body provide some notes on issueManagement in Maven/.</p>
<p>Rajesh</p>
<p><strong>scmuser replied the topic: Re:issueManagement in Maven?</strong><br />
issueManagement</p>
<p>Information about the issue tracking (or bug tracking) system used to manage this project.</p>
<p>Element</p>
<p>Description</p>
<p>system </p>
<p>The name of the issue management system, e.g. Bugzilla</p>
<p>url </p>
<p>URL for the issue management system used by the project.</p>
<p>Example:</p>
<p><issueManagement><br />
<system>Trac</system><br />
<url> <a href="http://trac.videolan.org/vlma">trac.videolan.org/vlma</a> </url><br />
</issueManagement></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/issue-management-in-maven/">Issue Management In Maven?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/issue-management-in-maven/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How Maven development started?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-maven-development-started/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-maven-development-started/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 07 Dec 2017 06:39:24 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1973</guid>

					<description><![CDATA[<p>scmuser created the topic: How Maven development started? How Maven development started? rajeshatbuzz replied the topic: Re:How Maven development started? [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-maven-development-started/">How Maven development started?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>scmuser created the topic: How Maven development started?</strong><br />
How Maven development started?</p>
<p><strong>rajeshatbuzz replied the topic: Re:How Maven development started?</strong><br />
Maven, a Yiddish word meaning accumulator of knowledge, was originally started as an attempt to<br />
simplify the build processes in the Jakarta Turbine project. There were several projects each with their<br />
own Ant build files that were all slightly different and JARs were checked into CVS. We wanted a<br />
standard way to build the projects, a clear definition of what the project consisted of, an easy way to<br />
publish project information and a way to share JARs across several projects.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-maven-development-started/">How Maven development started?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-maven-development-started/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Maven&#8217;s Objectives</title>
		<link>https://www.scmgalaxy.com/tutorials/mavens-objectives/</link>
					<comments>https://www.scmgalaxy.com/tutorials/mavens-objectives/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 07 Dec 2017 06:37:27 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1971</guid>

					<description><![CDATA[<p>scmuser created the topic: Maven&#8217;s Objectives What is the maven main objectives? rajeshatbuzz replied the topic: Re:Maven&#8217;s Objectives Maven&#8217;s primary [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mavens-objectives/">Maven&#8217;s Objectives</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>scmuser created the topic: Maven&#8217;s Objectives</strong><br />
What is the maven main objectives?</p>
<p><strong>rajeshatbuzz replied the topic: Re:Maven&#8217;s Objectives</strong><br />
Maven&#8217;s primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal there are several areas of concern that Maven attempts to deal with:<br />
• Making the build process easy<br />
• Providing a uniform build system<br />
• Providing quality project information<br />
• Providing guidelines for best practices development<br />
• Allowing transparent migration to new features</p>
<p>Making the build process easy<br />
While using Maven doesn&#8217;t eliminate the need to know about the underlying mechanisms, Maven does provide a lot of shielding from the details.</p>
<p>Providing a uniform build system<br />
Maven allows a project to build using its project object model (POM) and a set of plugins that are shared by all projects using Maven, providing a uniform build system. Once you familiarize yourself with how one Maven project builds you automatically know how all Maven projects build saving you immense amounts of time when trying to navigate many projects.</p>
<p>Providing quality project information<br />
Maven provides plenty of useful project information that is in part taken from your POM and in part generated from your project&#8217;s sources. For example, Maven can provide:<br />
• Change log document created directly from source control<br />
• Cross referenced sources<br />
• Mailing lists<br />
• Dependency list<br />
• Unit test reports including coverage<br />
As Maven improves the information set provided will improve, all of which will be transparent to<br />
users of Maven.<br />
Other products can also provide Maven plugins to allow their set of project information alongside<br />
some of the standard information given by Maven, all still based on the POM.</p>
<p>Providing guidelines for best practices development<br />
Maven aims to gather current principles for best practices development, and make it easy to guide a<br />
project in that direction.<br />
For example, specification, execution, and reporting of unit tests are part of the normal build cycle<br />
using Maven. Current unit testing best practices were used as guidelines:<br />
• Keeping your test source code in a separate, but parallel source tree<br />
• Using test case naming conventions to locate and execute tests<br />
• Have test cases setup their environment and don&#8217;t rely on customizing the build for test<br />
preparation.</p>
<p>Maven also aims to assist in project workflow such as release management and issue tracking.<br />
Maven also suggests some guidelines on how to layout your project&#8217;s directory structure so that once<br />
you learn the layout you can easily navigate any other project that uses Maven and the same defaults.</p>
<p>Allowing transparent migration to new features<br />
Maven provides an easy way for Maven clients to update their installations so that they can take<br />
advantage of any changes that been made to Maven itself.<br />
Installation of new or updated plugins from third parties or Maven itself has been made trivial for this<br />
reason.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mavens-objectives/">Maven&#8217;s Objectives</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/mavens-objectives/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Maven Troubleshooting</title>
		<link>https://www.scmgalaxy.com/tutorials/maven-troubleshooting/</link>
					<comments>https://www.scmgalaxy.com/tutorials/maven-troubleshooting/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 07 Dec 2017 06:34:45 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1969</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: Maven troubleshooting i would like to knpw &#8220;Most Common Issues in Maven&#8221;? Any body can focus [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/maven-troubleshooting/">Maven Troubleshooting</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: Maven troubleshooting</strong><br />
i would like to knpw &#8220;Most Common Issues in Maven&#8221;?</p>
<p>Any body can focus on this?<br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p><strong>mnanjala replied the topic: Re:Maven troubleshooting</strong><br />
You may get error with Java Heap Size error.<br />
Solution: set the Environment Variable of MAVEN_OPTS to &#8220;-Xms512m -Xmx512m -XX:MaxPermSize=1024m&#8221;</p>
<p><strong>mnanjala replied the topic: Re:Maven troubleshooting</strong><br />
2)ArtifactResolutionException</p>
<p>This error generally occurs when Maven could not download dependencies. Possible causes for this error are:</p>
<p>1. The repository you have configured requires authentication and Maven failed to provide the correct credentials to the server. In this case, make sure your ${user.home}/.m2/settings.xml contains a <server> declaration whose <id> matches the <id> of the plugin repository to use. See the Maven Settings Reference for more details.<br />
2. The remote repository in question uses SSL and the JVM running Maven does not trust the certificate of the server.<br />
5. Maven failed to save the files to your local repository.<br />
4. You have configured Maven to perform strict checksum validation and the files to download got corrupted.<br />
3. There is a general network problem that prevents Maven from accessing any remote repository, e.g. a missing proxy configuration.(Communication Issue local box and repo)</p>
<p><strong>mnanjala replied the topic: Re:Maven troubleshooting</strong><br />
3)DuplicateProjectException<br />
This error signals a collision of project identifiers during a reactor build. The coordinates for a project as given by its group id, artifact id and version must be unique within a reactor build. The usual cause for this error is a in one of the POMs so please verify the project coordinates are correctly set and valid.</p>
<p><strong>mnanjala replied the topic: Re:Maven troubleshooting</strong><br />
InternalErrorException</p>
<p>This error indicates a bug in Maven itself.</p>
<p>1. Capture the debug output of the failing build, e.g. by adding the flag -X to the command line and redirecting the console output of Maven to a file:</p>
<p>mvn <your goals> -X > debug.log</p>
<p>2.If interested report this bug to maven gurus you could submit a ticket in jira.codehaus.org/browse/MNG so we can avoid this bug in future provided bug has been fixed.It is said it is intermittent.</p>
<p><strong>mnanjala replied the topic: Re:Maven troubleshooting</strong><br />
4) InvalidPluginDescriptorException<br />
This error signals incomplete or wrong information in the descriptor for a plugin. The plugin descriptor is a special file in the plugin&#8217;s JAR file. An invalid descriptor is usually the result of bad driving while assembling the plugin. Please report this issue to the maintainer of the plugin in question.</p>
<p>Not a bad idea to try out another version of the plugin, there&#8217;s not much you as a user can do.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/maven-troubleshooting/">Maven Troubleshooting</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/maven-troubleshooting/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Apache Maven Gets Ready for Enterprise, Eclipse</title>
		<link>https://www.scmgalaxy.com/tutorials/apache-maven-gets-ready-for-enterprise-eclipse/</link>
					<comments>https://www.scmgalaxy.com/tutorials/apache-maven-gets-ready-for-enterprise-eclipse/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 07 Dec 2017 06:24:32 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1967</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: Apache Maven Gets Ready for Enterprise, Eclipse It&#8217;s exciting times for fans of Apache Maven. Developers [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/apache-maven-gets-ready-for-enterprise-eclipse/">Apache Maven Gets Ready for Enterprise, Eclipse</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: Apache Maven Gets Ready for Enterprise, Eclipse</strong><br />
It&#8217;s exciting times for fans of Apache Maven. Developers who delve into both Java and Eclipse are the target for a new push by Apache Maven and its commercial backer, Sonatype, that aim to produce new tools designed to simplify use and encourage adoption.</p>
<p>The effort will result in the launch of Maven Studio for Eclipse, building on the open source M2Eclipse project. That&#8217;s going to be followed by the launch of the Maven Enterprise Suite, which will include an array of tools designed to serve as a one-stop shop for enterprise developers. Developer.com takes a look at the implications.</p>
<p>The Apache Maven project is used by over 3 million Java developers as a project and build management solution. Java developers also widely use the Eclipse IDE. At the intersection of Eclipse and Maven is the new Maven Studio for Eclipse announced this week by Maven commercial backer Sonatype.</p>
<p>&#8220;The primary focus of the first version of Maven Studio for Eclipse is what we call developer on-boarding,&#8221; Jason Van Zyl, CTO of Sonatype and creator of Maven told InternetNews.com. &#8220;What we found is that in a lot of organizations the biggest problem they have is trying to get new developers initialized and working with a new project &#8212; what we&#8217;ve tried to do is turn it into a one-click operation.&#8221;<br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/apache-maven-gets-ready-for-enterprise-eclipse/">Apache Maven Gets Ready for Enterprise, Eclipse</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/apache-maven-gets-ready-for-enterprise-eclipse/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Sonatype Introduces Maven Studio for Eclipse(TM)</title>
		<link>https://www.scmgalaxy.com/tutorials/sonatype-introduces-maven-studio-for-eclipsetm/</link>
					<comments>https://www.scmgalaxy.com/tutorials/sonatype-introduces-maven-studio-for-eclipsetm/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 07 Dec 2017 06:18:15 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1965</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: Sonatype Introduces Maven Studio for Eclipse(TM) Innovative Development Environment Enables the 3+ Million Maven Java(TM) Developers [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/sonatype-introduces-maven-studio-for-eclipsetm/">Sonatype Introduces Maven Studio for Eclipse(TM)</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: Sonatype Introduces Maven Studio for Eclipse(TM)</strong><br />
Innovative Development Environment Enables the 3+ Million Maven Java(TM) Developers to Dramatically Improve Productivity</p>
<p>EclipseCon &#8211; March 22, 2010 &#8211; Sonatype, caretaker of the Maven project and leading provider of enterprise software development infrastructure, today announced Sonatype Maven Studio for Eclipse. The Studio is the only Eclipse Integrated Development Environment specifically optimized for Maven, the de facto standard for Java project and build management used by more than 3 million Java developers worldwide. The Studio accelerates developer productivity through a range of innovations including one-click onboarding &#8212; making developers fully productive in minutes rather than hours or even days.</p>
<p>&#8220;The process of onboarding new software developers is slow, cumbersome and prone to error,&#8221; said Mark Driver, vice president and research director in Gartner Research (NYSE: IT). &#8220;Lost productivity due to inadequate and ineffective onboarding processes is a &#8216;hidden tax&#8217; that causes organizations to waste a great deal of time and money.&#8221;</p>
<p>Getting a new developer up and running can take up to a week of trial and error as they assemble a working development environment, struggling with project dependencies, plug-ins, preferences, and more. With one click, Maven Studio automatically installs and configures everything a developer needs to start delivering value to their organization.</p>
<p>With open source M2Eclipse at its core, Maven Studio for Eclipse will also deliver a number of innovations beyond one-click onboarding. These include:</p>
<p>* License management to ensure that all license headers and attribution files are present in the project, making the terms of the license legally enforceable<br />
* Tomcat integration for rapid development of web applications<br />
* Confluence Wiki integration, allowing developers to view and edit wiki content from inside Eclipse<br />
* The ability to launch Hudson builds and monitor Hudson build status within the Eclipse IDE</p>
<p>Maven Studio for Eclipse also provides tight Maven platform integration, including support for Eclipse provisioning and workspace materialization, allowing developers to automatically install the Eclipse IDE, check out the project source and configure preferences. Maven Studio for Eclipse works closely with Nexus Professional and leverages its Eclipse repository support to make one-click onboarding seamless.</p>
<p>&#8220;Maven Studio for Eclipse enables a major advance in Java developer productivity, eliminating the wasted time of the typical trial and error process of assembling a working development environment,&#8221; said Jason van Zyl, CTO of Sonatype and creator of Maven. &#8220;Every organization using Maven and Eclipse will find the Studio indispensable to making a new team member fully productive.&#8221;<br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/sonatype-introduces-maven-studio-for-eclipsetm/">Sonatype Introduces Maven Studio for Eclipse(TM)</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/sonatype-introduces-maven-studio-for-eclipsetm/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Maven failed to resolve repo1.maven.org Inbo</title>
		<link>https://www.scmgalaxy.com/tutorials/maven-failed-to-resolve-repo1-maven-org-inbo/</link>
					<comments>https://www.scmgalaxy.com/tutorials/maven-failed-to-resolve-repo1-maven-org-inbo/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 07 Dec 2017 06:16:39 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1963</guid>

					<description><![CDATA[<p>scmuser created the topic: Maven failed to resolve repo1.maven.org Inbo I installed Maven 2.2.1 on Ubuntu 8.04. When I first [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/maven-failed-to-resolve-repo1-maven-org-inbo/">Maven failed to resolve repo1.maven.org Inbo</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>scmuser created the topic: Maven failed to resolve repo1.maven.org Inbo</strong><br />
I installed Maven 2.2.1 on Ubuntu 8.04. When I first tried to run mvn it<br />
didn&#8217;t work.<br />
I have a direct connection to internet and I do not have firewall policies<br />
which prohibit<br />
internet access from any program (such as java.exe, as I found in one post)</p>
<p>Looking at the stack-trace it seems like the root of all evil is:</p>
<p>Caused by: java.net.UnknownHostException: repo1.maven.org</p>
<p>I tried to resolve it manually</p>
<p>akshay@lap7:~$ dig repo1.maven.org.</p>
<p>; <<>> DiG 9.4.2-P2.1 <<>> repo1.maven.org.<br />
;; global options: printcmd<br />
;; Got answer:<br />
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2732
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;repo1.maven.org. IN A

;; ANSWER SECTION:
repo1.maven.org. 66 IN A 38.97.124.18

;; Query time: 36 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Fri Jun 18 19:01:52 2010
;; MSG SIZE rcvd: 49

Please suggest what is wrong with my setup. I've attached the output of mvn
here. Thanks in advance.

+ Error stacktraces are turned on.
Apache Maven 2.2.1 (r801777; 2009-08-07 00:46:01+0530)
Java version: 1.6.0_03
Java home: /opt/jdk1.6.0_03/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux" version: "2.6.24-27-generic" arch: "i386" Family: "unix"
[DEBUG] Building Maven user-level plugin registry from:
'/home/akshay/.m2/plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from:
'/home/akshay/opt/apache-maven-2.2.1/conf/plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins
[INFO] org.apache.maven.plugins: checking for updates from central
[DEBUG] Using Wagon implementation lightweight from default mapping for
protocol http
[DEBUG] Checking for pre-existing User-Agent configuration.
[DEBUG] Adding User-Agent configuration.
[DEBUG] Connecting to repository: 'central' with url: '
repo1.maven.org/maven2 '.
[DEBUG] Using Wagon implementation lightweight from default mapping for
protocol http
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be
retrieved from repository: central due to an error: Error transferring file:
repo1.maven.org
[DEBUG] Exception
org.apache.maven.wagon.TransferFailedException: Error transferring file:
repo1.maven.org
at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:143)
at
org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at
org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at
org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:546)
at
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:443)
at
org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolve(DefaultRepositoryMetadataManager.java:97)
at
org.apache.maven.plugin.DefaultPluginMappingManager.loadPluginMappings(DefaultPluginMappingManager.java:103)
at
org.apache.maven.plugin.DefaultPluginMappingManager.loadPluginMappings(DefaultPluginMappingManager.java:87)
at
org.apache.maven.plugin.DefaultPluginMappingManager.getByPrefix(DefaultPluginMappingManager.java:61)
at
org.apache.maven.plugin.DefaultPluginManager.getPluginDefinitionForPrefix(DefaultPluginManager.java:159)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1801)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:462)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:175)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.net.UnknownHostException: repo1.maven.org
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net. www.http.HttpClient .<init>(HttpClient.java:233)<br />
at sun.net.www.http.HttpClient.New(HttpClient.java:306)<br />
at sun.net.www.http.HttpClient.New(HttpClient.java:323)<br />
at<br />
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)<br />
at<br />
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)<br />
at<br />
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)<br />
at<br />
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)<br />
at<br />
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)<br />
at<br />
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)<br />
&#8230; 25 more<br />
[INFO] Repository &#8216;central&#8217; will be blacklisted<br />
[DEBUG] Loading plugin prefixes from group: org.codehaus.mojo<br />
[DEBUG] Skipping blacklisted repository central<br />
[DEBUG] Skipping blacklisted repository central<br />
[DEBUG] maven-archetype-plugin: using locally installed snapshot<br />
[DEBUG] Artifact not found &#8211; using stub model: Unable to determine the<br />
latest version</p>
<p>org.apache.maven.plugins:maven-archetype-plugin:pom:LATEST</p>
<p>[DEBUG] Using defaults for missing POM<br />
org.apache.maven.plugins:maven-archetype-plugin:pom:LATEST<br />
[DEBUG] maven-archetype-plugin: using locally installed snapshot<br />
[DEBUG] Artifact not found &#8211; using stub model: Unable to determine the<br />
release version</p>
<p>org.apache.maven.plugins:maven-archetype-plugin:pom:RELEASE</p>
<p>[DEBUG] Using defaults for missing POM<br />
org.apache.maven.plugins:maven-archetype-plugin:pom:RELEASE<br />
[INFO]<br />
[ERROR] BUILD ERROR<br />
[INFO]<br />
[INFO] The plugin &#8216;org.apache.maven.plugins:maven-archetype-plugin&#8217; does not<br />
exist or no valid version could be found<br />
[INFO]<br />
[DEBUG] Trace<br />
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin<br />
&#8216;org.apache.maven.plugins:maven-archetype-plugin&#8217; does not exist or no valid<br />
version could be found<br />
at<br />
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1569)<br />
at<br />
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1851)<br />
at<br />
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:462)<br />
at<br />
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:175)<br />
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)<br />
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)<br />
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)<br />
at<br />
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
at<br />
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
at<br />
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
at java.lang.reflect.Method.invoke(Method.java:597)<br />
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)<br />
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)<br />
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)<br />
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)<br />
Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException:<br />
The plugin &#8216;org.apache.maven.plugins:maven-archetype-plugin&#8217; does not exist<br />
or no valid version could be found<br />
at<br />
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:229)<br />
at<br />
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:91)<br />
at<br />
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:179)<br />
at<br />
org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)<br />
at<br />
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)<br />
&#8230; 15 more<br />
[INFO]<br />
[INFO] Total time: 1 second<br />
[INFO] Finished at: Fri Jun 18 15:43:35 GMT+05:30 2010<br />
[INFO] Final Memory: 1M/4M<br />
[INFO]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/maven-failed-to-resolve-repo1-maven-org-inbo/">Maven failed to resolve repo1.maven.org Inbo</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/maven-failed-to-resolve-repo1-maven-org-inbo/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Run external tasks using maven</title>
		<link>https://www.scmgalaxy.com/tutorials/run-external-tasks-using-maven/</link>
					<comments>https://www.scmgalaxy.com/tutorials/run-external-tasks-using-maven/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 07 Dec 2017 06:14:06 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1961</guid>

					<description><![CDATA[<p>scmuser created the topic: Run external tasks using maven Hi, Is it possible to run ant tasks which is not [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/run-external-tasks-using-maven/">Run external tasks using maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>scmuser created the topic: Run external tasks using maven</strong><br />
Hi,<br />
Is it possible to run ant tasks which is not connected with any build<br />
lifecycle phase?<br />
In other word I would like to perform some action on demand using maven and<br />
antrun plugin</p>
<p><strong>tpatil replied the topic: Re:Run external tasks using maven</strong><br />
Targets from external ant file can be run using maven-antrun-plugin.</p>
<p> <code><plugin>
    <artifactId>maven-antrun-plugin</artifactId><br />
    <executions><br />
      <execution>
        <phase>test</phase>
        <configuration><br />
          <tasks><br />
            <echo message="Hi there."/><br />
            <ant antfile="${basedir}/build.xml" target="test"/><br />
          </tasks><br />
        </configuration><br />
        <goals><br />
          <goal>run</goal><br />
        </goals><br />
      </execution><br />
    </executions>
  </plugin>
</plugins></code></p>
<p><strong>Also, you can execute the external command using maven-exec-plugin.</strong></p>
<p><code><plugin>
    <groupId>org.codehaus.mojo</groupId><br />
    <artifactId>exec-maven-plugin</artifactId><br />
    <version>1.1</version><br />
    <executions><br />
        <execution>
            <phase>compile</phase>
            <goals><br />
                <goal>exec</goal><br />
            </goals><br />
        </execution><br />
    </executions><br />
    <configuration><br />
        <executable>svn</executable><br />
        <arguments><br />
            <argument>info</argument><br />
            <argument>--xml</argument><br />
        </arguments><br />
        <outputFile>target/classes/svninfo.txt</outputFile><br />
    </configuration>
</plugin></code></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/run-external-tasks-using-maven/">Run external tasks using maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/run-external-tasks-using-maven/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Run Different name of Maven build file</title>
		<link>https://www.scmgalaxy.com/tutorials/run-different-name-of-maven-build-file/</link>
					<comments>https://www.scmgalaxy.com/tutorials/run-different-name-of-maven-build-file/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 12:51:14 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1953</guid>

					<description><![CDATA[<p>scmuser created the topic: Run Different name of Maven build file Hi, How to run maven build file whose is [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/run-different-name-of-maven-build-file/">Run Different name of Maven build file</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>scmuser created the topic: Run Different name of Maven build file</strong><br />
Hi,</p>
<p>How to run maven build file whose is not having same such as pom.xml and it could be different name?</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/run-different-name-of-maven-build-file/">Run Different name of Maven build file</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/run-different-name-of-maven-build-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>To run python setup tools using Maven</title>
		<link>https://www.scmgalaxy.com/tutorials/to-run-python-setup-tools-using-maven/</link>
					<comments>https://www.scmgalaxy.com/tutorials/to-run-python-setup-tools-using-maven/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 12:42:25 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1949</guid>

					<description><![CDATA[<p>snehal.shaha created the topic: To run python setup tools using Maven Hi All I have two modules in my project. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/to-run-python-setup-tools-using-maven/">To run python setup tools using Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>snehal.shaha created the topic: To run python setup tools using Maven</strong><br />
Hi All</p>
<p>I have two modules in my project.<br />
1. Java module<br />
2. Python Module</p>
<p>I am using Maven for java and building the module</p>
<p>For python I decided to use setuptools (setup.py).</p>
<p>I want to use Maven and try and build Python Module.<br />
Please can anybody help how to use any plugin available in Maven to Build Python Project.</p>
<p>The exact example code for POM.xml</p>
<p>If not this way, Can you suggest me some way I can use one tool and do both of this.<br />
I am preferring Maven to be used for whole project.</p>
<p>Thanks in advance,<br />
Snehal</p>
<p><strong>tpatil replied the topic: Re: To run python setup tools using Maven</strong><br />
Hi Snehal,</p>
<p>You can use maven-exec-plugin to execute python script using maven.</p>
<p>E.g.
<plugin>
  <groupId>org.codehaus.mojo</groupId><br />
  <artifactId>exec-maven-plugin</artifactId><br />
  <executions><br />
   <execution><br />
    <configuration><br />
     <executable>python</executable><br />
     <workingDirectory>src/main/python</workingDirectory><br />
     <arguments><br />
      <argument>build.py</argument><br />
     </arguments><br />
     <environmentVariables><br />
       <PYTHONPATH>../../main/python:$PYTHONPATH</PYTHONPATH><br />
     </environmentVariables><br />
    </configuration><br />
    <id>python-build</id>
    <phase>package</phase>
    <goals><br />
     <goal>exec</goal><br />
    </goals><br />
   </execution><br />
  </executions>
 </plugin>
<p>Hope this helps&#8230;</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/to-run-python-setup-tools-using-maven/">To run python setup tools using Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/to-run-python-setup-tools-using-maven/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Creating a maven project by using hudson</title>
		<link>https://www.scmgalaxy.com/tutorials/creating-a-maven-project-by-using-hudson/</link>
					<comments>https://www.scmgalaxy.com/tutorials/creating-a-maven-project-by-using-hudson/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 12:37:02 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1947</guid>

					<description><![CDATA[<p>revanthreddy created the topic: creating a maven project by using hudson hi, iam new to maven.can any body help me [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/creating-a-maven-project-by-using-hudson/">Creating a maven project by using hudson</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>revanthreddy created the topic: creating a maven project by using hudson</strong><br />
hi,<br />
iam new to maven.can any body help me how to create a new project by using hudson tool and also please give me necessary project structure hoe to create war file by using pom.xml</p>
<p>thanks®ards,<br />
Revanth.</p>
<p><strong>rajeshkumar replied the topic: Re: creating a maven project by using hudson</strong><br />
This you can achieve using 2 steps.<br />
1.	First write your pom.xml – For generating war files using maven, you can use following plugins.<br />
<a href="http://maven.apache.org/plugins/maven-war-plugi...ng-webresources.html">maven.apache.org/plugins/maven-war-plugi&#8230;ng-webresources.html </a><br />
2.	Setup Jobs in Hudson and configure jobs using maven</p>
<p>hope this helps..<br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @<a href="http://twitter.com/RajeshKumarIn"> twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/creating-a-maven-project-by-using-hudson/">Creating a maven project by using hudson</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/creating-a-maven-project-by-using-hudson/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Downloaded Maven, what&#8217;s next?</title>
		<link>https://www.scmgalaxy.com/tutorials/downloaded-maven-whats-next/</link>
					<comments>https://www.scmgalaxy.com/tutorials/downloaded-maven-whats-next/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 12:29:57 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1942</guid>

					<description><![CDATA[<p>mfeighner created the topic: Downloaded Maven, what&#8217;s next? New to Maven, I downloaded Maven 3.0.4 SRC and BIN from maven.apache.org/download.html [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/downloaded-maven-whats-next/">Downloaded Maven, what&#8217;s next?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>mfeighner created the topic: Downloaded Maven, what&#8217;s next?</strong><br />
New to Maven, I downloaded Maven 3.0.4 SRC and BIN from <a href="http://maven.apache.org/download.html">maven.apache.org/download.html</a> to my Windows 7 Computer, What do I need to do next to use it?</p>
<p><strong>scmuser replied the topic: Re: Downloaded Maven, what&#8217;s next?</strong><br />
This is good place to start with..if you have specific question, plz do ask&#8230;<br />
<a href="http://maven.apache.org/guides/getting-started/index.html">maven.apache.org/guides/getting-started/index.html</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/downloaded-maven-whats-next/">Downloaded Maven, what&#8217;s next?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/downloaded-maven-whats-next/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Windows/Maven and Role of Archiva</title>
		<link>https://www.scmgalaxy.com/tutorials/windows-maven-and-role-of-archiva/</link>
					<comments>https://www.scmgalaxy.com/tutorials/windows-maven-and-role-of-archiva/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 12:14:15 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1940</guid>

					<description><![CDATA[<p>wasi_shez created the topic: Windows/Maven and Role of Archiva Hi Guys! I have some Questions for Maven. 1)I have generated [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/windows-maven-and-role-of-archiva/">Windows/Maven and Role of Archiva</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>wasi_shez created the topic: Windows/Maven and Role of Archiva</strong><br />
Hi Guys!<br />
I have some Questions for Maven.</p>
<p>1)I have generated simple &#8216;Jars&#8217; and &#8216;Wars&#8217; through Maven.I have an Idea that maven always download its Repository Structure once then We placed our Code and generate Builds accordingly.</p>
<p>Is it possible that we can adjust Maven according to Our Code line and let MAVEN to understand our Code line for generating Builds or performing rest of the functions accordingly?</p>
<p>2) We are working on Windows Environment and Want o initiate our Code Build generation through Maven. Does Windows is a Good Platform for this?</p>
<p>3)How does the &#8216;Archiva&#8217; can work best for us in Windows Environment or is there any alternative you guys will suggest against this?</p>
<p>I hope my Queries will understand you to answer accordingly.</p>
<p>Looking forward for your Comprehensive acknowledgement.</p>
<p>Thanks in advance</p>
<p>Waseem Bokhari<br />
CM Analyst<br />
00923214294926<br />
wasi_shez@hotmail.com<br />
Skype: wasi_shez</p>
<p><strong>rajeshkumar replied the topic: Windows/Maven and Role of Archiva</strong><br />
Sorry for late on this. are you still looking for the answer on this?<br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/windows-maven-and-role-of-archiva/">Windows/Maven and Role of Archiva</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/windows-maven-and-role-of-archiva/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Directory structure using Maven</title>
		<link>https://www.scmgalaxy.com/tutorials/directory-structure-using-maven/</link>
					<comments>https://www.scmgalaxy.com/tutorials/directory-structure-using-maven/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 12:07:12 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1933</guid>

					<description><![CDATA[<p>bhavith created the topic: Directory structure using Maven Hi Raj, I am facing difficulty when trying to build a directory [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/directory-structure-using-maven/">Directory structure using Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>bhavith created the topic: Directory structure using Maven</strong><br />
Hi Raj,</p>
<p>I am facing difficulty when trying to build a directory structure using maven. I get conect reset errors.<br />
i used the below command to create a directory structure. Please let me know if i am missing anything.</p>
<p>mvn archetype:generate -DgroupId=com.companyname.software -DartifactId=financialService -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false</p>
<p>Regards,<br />
Bhavith</p>
<p><strong>rajeshkumar replied the topic: Directory structure using Maven</strong><br />
Commands seems to be correct. You have not shared the error message. Also please check if you are connected with internet as its needed to download many artifacts from apache repo.<br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p><strong>bhavith replied the topic: Directory structure using Maven</strong><br />
Apologies for that.<br />
Attaaced screenshot and yes internet is connected.</p>
<p><strong>rajeshkumar replied the topic: Directory structure using Maven</strong><br />
I cant find the error attached. Plz post it<br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/directory-structure-using-maven/">Directory structure using Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/directory-structure-using-maven/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Maven course content</title>
		<link>https://www.scmgalaxy.com/tutorials/maven-course-content/</link>
					<comments>https://www.scmgalaxy.com/tutorials/maven-course-content/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 12:03:39 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1931</guid>

					<description><![CDATA[<p>swatinikam2009 created the topic: Maven course content Hi Team, I am looking for Maven PPT. I need it for reference. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/maven-course-content/">Maven course content</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>swatinikam2009 created the topic: Maven course content</strong><br />
Hi Team,</p>
<p>I am looking for Maven PPT. I need it for reference.</p>
<p>Regards Swati Nikam</p>
<p><strong>swatinikam2009 replied the topic: Maven course content</strong><br />
I got PPT for the same.</p>
<p><strong>rajeshkumar replied the topic: Maven course content</strong><br />
This is the place from where you can download all the PPT for maven.<br />
<a href="http://www.devopsschool.com/tutorial/maven/">www.devopsschool.com/tutorial/maven/</a><br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @<a href="http://twitter.com/RajeshKumarIn"> twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/maven-course-content/">Maven course content</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/maven-course-content/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Maven</title>
		<link>https://www.scmgalaxy.com/tutorials/maven-2/</link>
					<comments>https://www.scmgalaxy.com/tutorials/maven-2/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 11:59:31 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1929</guid>

					<description><![CDATA[<p>swatinikam2009 created the topic: Maven Hi , I am trying to run java code. I have set the environment correctly. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/maven-2/">Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>swatinikam2009 created the topic: Maven</strong><br />
Hi ,</p>
<p>I am trying to run java code. I have set the environment correctly. Also created MAVEN_HOME variable and added it to path varibale.<br />
But still i am getting error message saying &#8220;count not find or load main class App&#8221;.</p>
<p>What to do?</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/maven-2/">Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/maven-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Maven</title>
		<link>https://www.scmgalaxy.com/tutorials/maven/</link>
					<comments>https://www.scmgalaxy.com/tutorials/maven/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 11:57:53 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1927</guid>

					<description><![CDATA[<p>swatinikam2009 created the topic: Maven Hi , I am trying to run java code. I have set the environment correctly. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/maven/">Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>swatinikam2009 created the topic: Maven</strong><br />
Hi ,</p>
<p>I am trying to run java code. I have set the environment correctly. Also created MAVEN_HOME variable and added it to path varibale.<br />
But still i am getting error message saying &#8220;count not find or load main class App&#8221;.</p>
<p>What to do?</p>
<p><strong>rajeshkumar replied the topic: Maven</strong><br />
Check with your java file main method or maven directory structure.</p>
<p>Example<br />
<a href="http://github.com/scmgalaxy/jacoco-maven-unittestv2/">github.com/scmgalaxy/jacoco-maven-unittestv2/</a><br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p><strong>swatinikam2009 replied the topic: Maven</strong><br />
Hi Rajesh,</p>
<p>I have done all the settings proprly but still getting the error.</p>
<p>So I tried to run code by followinf cmd.</p>
<p>c:\MavenDemos\MyPro > java -cp target/classes com.acc.App</p>
<p>And then it is showing me output.</p>
<p>Can you please tell me. Where i am doing wrong?</p>
<p><strong>swatinikam2009 replied the topic: Maven</strong><br />
Contiued with the above query.</p>
<p>I have done one change. And then it is working fine . No need to use c:\MavenDemos\MyPro>java -cp target/classes com.acc.App</p>
<p>I have removed CLASSPATH variable from user variable in Env. variables.</p>
<p>Then it is working fine. so now i just type c:\MavenDemos\MyPro\target\classes>java com.acc.App</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/maven/">Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/maven/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Clearcase with Maven</title>
		<link>https://www.scmgalaxy.com/tutorials/clearcase-with-maven/</link>
					<comments>https://www.scmgalaxy.com/tutorials/clearcase-with-maven/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 09:54:43 +0000</pubDate>
				<category><![CDATA[ClearCase]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1878</guid>

					<description><![CDATA[<p>scmuser created the topic: Clearcase with Maven Hi, I am using Clearcase UCM and i am looking for pom.xml sample [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/clearcase-with-maven/">Clearcase with Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>scmuser created the topic: Clearcase with Maven</strong><br />
Hi,</p>
<p>I am using Clearcase UCM and i am looking for pom.xml sample which does the following things.</p>
<p>1. Create A Vob with tag specified in pom.xml</p>
<p>Any help on this&#8230;</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/clearcase-with-maven/">Clearcase with Maven</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/clearcase-with-maven/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
