Skip to content

Latest commit

 

History

History
136 lines (93 loc) · 6.23 KB

CONTRIBUTING.md

File metadata and controls

136 lines (93 loc) · 6.23 KB

JBoss Archetypes Contributing Guide

Archetype is a Maven project templating toolkit

Basic Steps

To contribute to the Archetypes, fork the Archetypes repository to your own Git, clone your fork, commit your work on topic branches, and make pull requests.

If you don't have the Git client (git), get it from: http://git-scm.com/

Here are the steps in detail:

  1. Fork the project. This creates a the project in your own Git.

  2. Clone your fork. This creates a directory in your local file system.

     git clone git@github.com:<your-username>/jboss-as-archetype.git
    
  3. Add the remote upstream repository.

     git remote add upstream git@github.com:jboss-jdf/jboss-as-archetype.git
    
  4. Get the latest files from the upstream repository.

     git fetch upstream
    
  5. Create a new topic branch to contain your features, changes, or fixes.

     git checkout -b <topic-branch-name> upstream/master
    
  6. Contribute new code or make changes to existing files. Make sure that you follow the General Guidelines below.

  7. Build the archetypes and install them into your Maven repository.

     mvn clean install
    
  8. Test the changes using Maven.

    1. Navigate to the root of the archetype with the code changes and run mvn test.
    2. The project is created in the target/ directory of the archteype.
    3. Verify the generated project builds and runs as expected.
  9. Test the changes using JBoss Developer Studio.

    1. In JDBS, choose File-->New-->Maven Projectand clickNext`.
    2. Select the Project Name and Location. Do NOT check Create a simple project (skip archetype selection). Click Next.
    3. Choose catalog Default Local and check Include snapshot archetypes. Select your modified archetype snapshot and click Next.
    4. Enter the groupId, artifactId, and other information, then click 'Finish'.
    5. Verify the generated project builds and runs as expected.
  10. Commit your changes to your local topic branch. You must use git add filename for every file you create or change.

     git add <changed-filename>
     git commit -m `Description of change...`
    
  11. Push your local topic branch to your github forked repository. This will create a branch on your Git fork repository with the same name as your local topic branch name.

     git push origin HEAD            
    
  12. Browse to the branch on your forked Git repository and open a Pull Request. Give it a clear title and description.

General Guidelines

License Information and Contributor Agreement

JBoss Developer Framework is licensed under the Apache License 2.0, as we believe it is one of the most permissive Open Source license. This allows developers to easily make use of the code samples in JBoss Developer Framework.

There is no need to sign a contributor agreement to contribute to JBoss Developer Framework. You just need to explicitly license any contribution under the AL 2.0. If you add any new files to JBoss Developer Framework, make sure to add the correct header.

Java

  /*
   * JBoss, Home of Professional Open Source
   * Copyright <Year>, Red Hat, Inc. and/or its affiliates, and individual
   * contributors by the @authors tag. See the copyright.txt in the 
   * distribution for a full listing of individual contributors.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * http://www.apache.org/licenses/LICENSE-2.0
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,  
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */

XML

  <!--
   JBoss, Home of Professional Open Source
   Copyright <Year>, Red Hat, Inc. and/or its affiliates, and individual
   contributors by the @authors tag. See the copyright.txt in the 
   distribution for a full listing of individual contributors.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
   http://www.apache.org/licenses/LICENSE-2.0
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,  
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   -->

Properties files

   # JBoss, Home of Professional Open Source
   # Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual
   # contributors by the @authors tag. See the copyright.txt in the 
   # distribution for a full listing of individual contributors.
   #
   # Licensed under the Apache License, Version 2.0 (the "License");
   # you may not use this file except in compliance with the License.
   # You may obtain a copy of the License at
   # http://www.apache.org/licenses/LICENSE-2.0
   # Unless required by applicable law or agreed to in writing, software
   # distributed under the License is distributed on an "AS IS" BASIS,  
   # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   # See the License for the specific language governing permissions and
   # limitations under the License.