<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: JAveedMeandad</title>
    <description>The latest articles on DEV Community by JAveedMeandad (@iamjaveed59).</description>
    <link>https://dev.to/iamjaveed59</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F204092%2Fddcc4933-c051-4b46-8ce3-c44656a1434e.jpg</url>
      <title>DEV Community: JAveedMeandad</title>
      <link>https://dev.to/iamjaveed59</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iamjaveed59"/>
    <language>en</language>
    <item>
      <title>A Maven Custom Archetype</title>
      <dc:creator>JAveedMeandad</dc:creator>
      <pubDate>Sat, 10 Aug 2019 17:36:14 +0000</pubDate>
      <link>https://dev.to/iamjaveed59/a-maven-custom-archetype-p3c</link>
      <guid>https://dev.to/iamjaveed59/a-maven-custom-archetype-p3c</guid>
      <description>&lt;h3&gt;
  
  
  1. What is Maven Archetype?
&lt;/h3&gt;

&lt;p&gt;A maven archetype is a simple artifact and it contains your project related files and configuration. The main benefit of using archetypes is to standardize project development and to enable developers to easily follow best practices while bootstrapping their projects faster.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Why we require custom archetype?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;It's Just Simple&lt;/strong&gt;&lt;br&gt;
When we are developing an application that comes up based some other projects and we required some files to get information and to access their functionality.&lt;/p&gt;

&lt;p&gt;So many configuration files may consists in your dependent project like &lt;strong&gt;web.xml&lt;/strong&gt;,&lt;strong&gt;pom.xml&lt;/strong&gt; and etc..,&lt;/p&gt;

&lt;p&gt;The pom files consists of all dependencies which your required from other projects.&lt;/p&gt;

&lt;p&gt;Here your project template is fixed and you know what files you need and where you need place these files. At First you created it by your own but later it is a &lt;strong&gt;repeated work&lt;/strong&gt; when you are developing &lt;strong&gt;new project&lt;/strong&gt; with same &lt;strong&gt;project Template&lt;/strong&gt;. So the maven custom archetype helps you to create fully automated,customized project template.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. What consists inside of Archetypes?
&lt;/h3&gt;

&lt;p&gt;An archetype is made up of one major configuration file called &lt;strong&gt;archetype-metadata.xml&lt;/strong&gt; and its available in &lt;strong&gt;src/main/resources/META-INF/maven/&lt;/strong&gt; and there is a folder called &lt;strong&gt;src/main/resources/archetype-resources/&lt;/strong&gt; it contains all your project related files where you need make customization.&lt;/p&gt;

&lt;p&gt;Even a archetype is created by a project so we also have a Root &lt;strong&gt;pom.xml&lt;/strong&gt; in the base location of archetype project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maven Archetype Descriptor&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;requiredProperties&amp;gt;
    &amp;lt;requiredProperty key="version"&amp;gt;
        &amp;lt;defaultValue&amp;gt;1.0&amp;lt;/defaultValue&amp;gt;
    &amp;lt;/requiredProperty&amp;gt;
    &amp;lt;requiredProperty key="client-name"/&amp;gt;
&amp;lt;/requiredProperties&amp;gt;

&amp;lt;fileSets&amp;gt;
    &amp;lt;fileSet filtered="true" packaged="true"&amp;gt;
        &amp;lt;directory&amp;gt;src/main/java&amp;lt;/directory&amp;gt;
        &amp;lt;includes&amp;gt;
            &amp;lt;include&amp;gt;**/*.java&amp;lt;/include&amp;gt;
        &amp;lt;/includes&amp;gt;
    &amp;lt;/fileSet&amp;gt;
     &amp;lt;fileSet filtered="true" packaged="true"&amp;gt;
        &amp;lt;directory&amp;gt;src/main/resources&amp;lt;/directory&amp;gt;
        &amp;lt;includes&amp;gt;
            &amp;lt;include&amp;gt;**/*.xml&amp;lt;/include&amp;gt;
            &amp;lt;include&amp;gt;**/*.properties&amp;lt;/include&amp;gt;
        &amp;lt;/includes&amp;gt;
    &amp;lt;/fileSet&amp;gt;
&amp;lt;/fileSets&amp;gt;

&amp;lt;modules&amp;gt;
    &amp;lt;module name="service-module"&amp;gt;&amp;lt;/module&amp;gt;
    &amp;lt;module name="web-module"&amp;gt;&amp;lt;/module&amp;gt;
&amp;lt;/modules&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;b&gt;&lt;em&gt;requiredProperties&lt;/em&gt;&lt;/b&gt; tag is used to maintain any &lt;strong&gt;configurable parameters&lt;/strong&gt; that you need in your project. If its set as default value it will be used other wise it will prompted while creating project.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;em&gt;fileSets&lt;/em&gt;&lt;/b&gt; will be used to maintain folders. A filtered file means that placeholders will be substituted with provided values during the generation process. So in our project &lt;b&gt;client-name&lt;/b&gt; is required property and i can used this property in any file of filtered fileSets directory.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;em&gt;modules&lt;/em&gt;&lt;/b&gt; tag helps you to have a &lt;b&gt;multi-module&lt;/b&gt; project template.&lt;/p&gt;

&lt;p&gt;for other information, please have a look at the &lt;a href="https://maven.apache.org/guides/mini/guide-creating-archetypes.html" rel="noopener noreferrer"&gt;Apache docs&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  4. Make it Available
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdocs.releng.linuxfoundation.org%2Fen%2Flatest%2F_images%2Fnexus2-ui.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdocs.releng.linuxfoundation.org%2Fen%2Flatest%2F_images%2Fnexus2-ui.png" alt="Nexus Repo"&gt;&lt;/a&gt;&lt;br&gt;
After a setup of custom archetype you need to make this available for other co-employees. So to do this we have a &lt;b&gt;&lt;em&gt;distributionManagement&lt;/em&gt;&lt;/b&gt; tag in root pom.xml file where you can maintain your repository to deploy the generated archetype and finally it will be available to others also.&lt;/p&gt;

&lt;p&gt;for details how to make a configuration for Nexus, Please check the site &lt;a href="https://maven.apache.org/pom.html#Distribution_Management" rel="noopener noreferrer"&gt;Distribution Management in Maven&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. A shortcut way for creating Archetype
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.shopify.com%2Fs%2Ffiles%2F1%2F2780%2F3536%2Ffiles%2Fchaim-billingham-header_1024x1024.jpg%3Fv%3D1519303740" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.shopify.com%2Fs%2Ffiles%2F1%2F2780%2F3536%2Ffiles%2Fchaim-billingham-header_1024x1024.jpg%3Fv%3D1519303740" alt="Shortcut-image"&gt;&lt;/a&gt;&lt;br&gt;
As i told earlier that first time you created it by your own by using general method to create project using maven. You have your project template ready so it is very simple and only one command you need to use and that is a in-built maven plugin &lt;strong&gt;mvn archetype:create-from-project&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Go to your project template root folder and execute the above command maven automatically create a custom archetype and it will be available at the target location of base project template.&lt;/p&gt;

&lt;p&gt;That's all for the post i will come back with another useful post soon. I would like to see your feedback and suggestions.&lt;/p&gt;

&lt;p&gt;You can follow me on &lt;a href="https://twitter.com/IamJAveed59" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Understanding Gaps in project</title>
      <dc:creator>JAveedMeandad</dc:creator>
      <pubDate>Tue, 06 Aug 2019 06:38:28 +0000</pubDate>
      <link>https://dev.to/iamjaveed59/understanding-gaps-in-project-300c</link>
      <guid>https://dev.to/iamjaveed59/understanding-gaps-in-project-300c</guid>
      <description>&lt;p&gt;Understanding Gaps are major problems in development of a project.There are some situations that I personally involved and things didn't make worked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ask Questions?&lt;/strong&gt;&lt;br&gt;
Asking questions is not a crime while you are developing something.we should get a clarity on what we are doing so don't hesitate or don't worry to ask your IO.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make a simple Document&lt;/strong&gt;&lt;br&gt;
Write down your understandings and schedule a meeting with IO for a short discussion on what you understood and what you are going to use and which logic you are using to make it work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Search MORE&lt;/strong&gt;&lt;br&gt;
If you are developing a complex part then you should definitely Google to get know more about it and look for any similar projects or kind of similar logics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Things starts working&lt;/strong&gt;&lt;br&gt;
While making documents and scheduling meetings we will get a clear idea about what we have to do and eventually our things make work and project go smoothly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Early Post&lt;/strong&gt;&lt;br&gt;
It's my first post please feel free to comment.I would like to receive a response from you 😀😁&lt;/p&gt;

</description>
      <category>java</category>
      <category>opensource</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
