├── .asf.yaml ├── .github ├── ISSUE_TEMPLATE │ ├── BUG.yml │ ├── FEATURE.yml │ └── config.yml ├── dependabot.yml ├── release-drafter.yml └── workflows │ ├── maven-verify.yml │ ├── pr-automation.yml │ ├── release-drafter.yml │ └── stale.yml ├── .gitignore ├── Jenkinsfile ├── README.md ├── pom.xml └── src ├── it ├── minimal-pom-output-encoding │ ├── pom.xml │ └── verify.bsh ├── minimal-pom │ ├── pom.xml │ └── verify.bsh ├── project-reporting-output-encoding │ ├── pom.xml │ └── verify.bsh ├── settings.xml └── with-svnjava-maven-3 │ ├── invoker.properties │ ├── pom.xml │ └── verify.groovy ├── main ├── java │ └── org │ │ └── apache │ │ └── maven │ │ └── plugins │ │ └── changelog │ │ ├── ChangeLog.java │ │ ├── ChangeLogHandler.java │ │ ├── ChangeLogReport.java │ │ ├── DeveloperActivityReport.java │ │ ├── FileActivityComparator.java │ │ ├── FileActivityReport.java │ │ └── scm │ │ └── provider │ │ └── svn │ │ └── svnexe │ │ └── command │ │ └── info │ │ └── SvnInfoCommandExpanded.java └── resources │ ├── scm-activity.properties │ ├── scm-activity_de.properties │ ├── scm-activity_en.properties │ ├── scm-activity_es_AR.properties │ ├── scm-activity_pt_BR.properties │ └── scm-activity_sv.properties ├── site ├── apt │ ├── changing-scm-impl.apt.vm │ ├── examples │ │ ├── changing-heading-date-format.apt.vm │ │ ├── configuration-date-type.apt.vm │ │ ├── configuration-range-type.apt.vm │ │ ├── configuration-tag-type.apt.vm │ │ ├── modifying-scm-links.apt.vm │ │ ├── selecting-reports.apt.vm │ │ └── using-perforce.apt.vm │ ├── index.apt.vm │ └── usage.apt.vm ├── fml │ └── faq.fml ├── resources │ ├── download.cgi │ └── images │ │ ├── sample-changelog-report.PNG │ │ ├── sample-dev-activity-report.PNG │ │ └── sample-file-activity-report.PNG ├── site.xml └── xdoc │ └── download.xml.vm └── test ├── changelog-xml └── min-changelog.xml ├── java └── org │ └── apache │ └── maven │ └── plugins │ └── changelog │ ├── AbstractChangeLogReportTest.java │ ├── ChangeLogReportTest.java │ ├── ChangeLogTest.java │ ├── DeveloperActivityReportTest.java │ ├── FileActivityComparatorTest.java │ ├── FileActivityReportTest.java │ └── stubs │ ├── ChangeLogScmResultStub.java │ ├── DevelopersStub.java │ ├── FailedScmManagerStub.java │ ├── MavenProjectStub.java │ ├── ScmManagerStub.java │ ├── ScmManagerWithHostStub.java │ ├── ScmProviderRepositoryStub.java │ ├── ScmProviderStub.java │ ├── ScmRepositoryStub.java │ └── SettingsStub.java └── plugin-configs ├── changelog ├── cached-plugin-config.xml ├── date-plugin-config.xml ├── dates-plugin-config.xml ├── display-file-and-rev-info-explicitly-plugin-config.xml ├── dont-display-file-and-rev-info-plugin-config.xml ├── hosted-plugin-config.xml ├── hosted-with-settings-plugin-config.xml ├── inv-date-plugin-config.xml ├── inv-type-plugin-config.xml ├── min-plugin-config.xml ├── no-scm-plugin-config.xml ├── no-source-plugin-config.xml ├── tag-plugin-config.xml └── tags-plugin-config.xml ├── dev-activity ├── min-plugin-config.xml └── no-source-plugin-config.xml └── file-activity ├── min-plugin-config.xml └── no-source-plugin-config.xml /.asf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # see https://s.apache.org/asfyaml 18 | github: 19 | description: "Apache Maven Changelog Plugin" 20 | homepage: https://maven.apache.org/plugins/maven-changelog-plugin/ 21 | labels: 22 | - java 23 | - build-management 24 | - maven-plugins 25 | - maven-changelog-plugin 26 | - maven 27 | enabled_merge_buttons: 28 | squash: true 29 | merge: false 30 | rebase: true 31 | autolink_jira: 32 | - MCHANGELOG 33 | del_branch_on_merge: true 34 | features: 35 | issues: true 36 | notifications: 37 | commits: commits@maven.apache.org 38 | issues: issues@maven.apache.org 39 | pullrequests: issues@maven.apache.org 40 | jira_options: link label 41 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/BUG.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema 19 | 20 | name: Bug Report 21 | description: File a bug report 22 | labels: ["bug"] 23 | 24 | body: 25 | - type: markdown 26 | attributes: 27 | value: | 28 | Thanks for taking the time to fill out this bug report. 29 | 30 | Simple fixes in single PRs do not require issues. 31 | 32 | **Do you use the latest project version?** 33 | 34 | - type: input 35 | id: version 36 | attributes: 37 | label: Affected version 38 | validations: 39 | required: true 40 | 41 | - type: textarea 42 | id: message 43 | attributes: 44 | label: Bug description 45 | validations: 46 | required: true 47 | 48 | 49 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/FEATURE.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema 19 | 20 | name: Feature request 21 | description: File a proposal for new feature, improvement 22 | labels: ["enhancement"] 23 | 24 | body: 25 | - type: markdown 26 | attributes: 27 | value: | 28 | Thanks for taking the time to fill out this new feature, improvement proposal. 29 | 30 | - type: textarea 31 | id: message 32 | attributes: 33 | label: New feature, improvement proposal 34 | validations: 35 | required: true 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser 19 | 20 | blank_issues_enabled: false 21 | 22 | contact_links: 23 | 24 | - name: Project Mailing Lists 25 | url: https://maven.apache.org/mailing-lists.html 26 | about: Please ask a question or discuss here 27 | 28 | - name: Old JIRA Issues 29 | url: https://issues.apache.org/jira/projects/MCHANGELOG 30 | about: Please search old JIRA issues 31 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # Please see the documentation for all configuration options: 18 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 19 | # 20 | version: 2 21 | updates: 22 | - package-ecosystem: "maven" 23 | directory: "/" 24 | schedule: 25 | interval: "daily" 26 | - package-ecosystem: "github-actions" 27 | directory: "/" 28 | schedule: 29 | interval: "daily" 30 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | _extends: maven-gh-actions-shared 19 | -------------------------------------------------------------------------------- /.github/workflows/maven-verify.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | name: Verify 19 | 20 | on: 21 | push: 22 | pull_request: 23 | 24 | jobs: 25 | build: 26 | name: Verify 27 | uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4 28 | -------------------------------------------------------------------------------- /.github/workflows/pr-automation.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | name: PR Automation 19 | on: 20 | pull_request_target: 21 | types: 22 | - closed 23 | 24 | jobs: 25 | pr-automation: 26 | name: PR Automation 27 | uses: apache/maven-gh-actions-shared/.github/workflows/pr-automation.yml@v4 28 | -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | name: Release Drafter 19 | on: 20 | push: 21 | branches: 22 | - master 23 | jobs: 24 | update_release_draft: 25 | uses: apache/maven-gh-actions-shared/.github/workflows/release-drafter.yml@v4 26 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | name: Stale 19 | 20 | on: 21 | schedule: 22 | - cron: '55 4 * * *' 23 | issue_comment: 24 | types: [ 'created' ] 25 | 26 | jobs: 27 | stale: 28 | uses: 'apache/maven-gh-actions-shared/.github/workflows/stale.yml@v4' 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .project 3 | .classpath 4 | .settings/ 5 | .svn/ 6 | bin/ 7 | # Intellij 8 | *.ipr 9 | *.iml 10 | .idea 11 | out/ 12 | .DS_Store 13 | /bootstrap 14 | /dependencies.xml 15 | .java-version 16 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | asfMavenTlpPlgnBuild() 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 17 | Contributing to [Apache Maven Changelog Plugin](https://maven.apache.org/plugins/maven-changelog-plugin/) 18 | ====================== 19 | 20 | [![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/apache/maven.svg?label=License)][license] 21 | [![Maven Central](https://img.shields.io/maven-central/v/org.apache.maven.plugins/maven-changelog-plugin.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.apache.maven.plugins/maven-changelog-plugin) 22 | [![Jenkins Status](https://img.shields.io/jenkins/s/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven-changelog-plugin/job/master.svg?)][build] 23 | [![Jenkins tests](https://img.shields.io/jenkins/t/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven-changelog-plugin/job/master.svg?)][test-results] 24 | 25 | 26 | You have found a bug, or you have an idea for a cool new feature? Contributing 27 | code is a great way to give something back to the open source community. Before 28 | you dig right into the code, there are a few guidelines that we need 29 | contributors to follow so that we can have a chance of keeping on top of 30 | things. 31 | 32 | Getting Started 33 | --------------- 34 | 35 | + Make sure you have a [GitHub account](https://github.com/signup/free). 36 | + If you're planning to implement a new feature, it makes sense to discuss your changes 37 | on the [dev list][ml-list] first. 38 | This way you can make sure you're not wasting your time on something that isn't 39 | considered to be in Apache Maven's scope. 40 | + Submit a ticket for your issue, assuming one does not already exist. 41 | + Clearly describe the issue, including steps to reproduce when it is a bug. 42 | + Make sure you fill in the earliest version that you know has the issue. 43 | + Fork the repository on GitHub. 44 | 45 | Making and Submitting Changes 46 | -------------- 47 | 48 | We accept Pull Requests via GitHub. The [developer mailing list][ml-list] is the 49 | main channel of communication for contributors. 50 | There are some guidelines which will make applying PRs easier for us: 51 | + Create a topic branch from where you want to base your work (this is usually the master branch). 52 | Push your changes to a topic branch in your fork of the repository. 53 | + Make commits of logical units. 54 | + Respect the original code style: by using the same [codestyle][code-style], 55 | patches should only highlight the actual difference, not being disturbed by any formatting issues: 56 | + Only use spaces for indentation. 57 | + Create minimal diffs - disable on save actions like reformat source code or organize imports. 58 | If you feel the source code should be reformatted, create a separate PR for this change. 59 | + Check for unnecessary whitespace with `git diff --check` before committing. 60 | + Make sure you have added the necessary tests (JUnit/IT) for your changes. 61 | + Run all the tests with `mvn -Prun-its verify` to assure nothing else was accidentally broken. 62 | + Submit a pull request to the repository in the Apache organization. 63 | 64 | If you plan to contribute on a regular basis, please consider filing a [contributor license agreement][cla]. 65 | 66 | Additional Resources 67 | -------------------- 68 | 69 | + [Contributing patches](https://maven.apache.org/guides/development/guide-maven-development.html#Creating_and_submitting_a_patch) 70 | + [Contributor License Agreement][cla] 71 | + [General GitHub documentation](https://help.github.com/) 72 | + [GitHub pull request documentation](https://help.github.com/send-pull-requests/) 73 | + [Apache Maven X Account](https://x.com/ASFMavenProject) 74 | + [Apache Maven Bluesky Account](https://bsky.app/profile/maven.apache.org) 75 | + [Apache Maven Mastodon Account](https://mastodon.social/deck/@ASFMavenProject@fosstodon.org) 76 | 77 | [license]: https://www.apache.org/licenses/LICENSE-2.0 78 | [ml-list]: https://maven.apache.org/mailing-lists.html 79 | [code-style]: https://maven.apache.org/developers/conventions/code.html 80 | [cla]: https://www.apache.org/licenses/#clas 81 | [maven-wiki]: https://cwiki.apache.org/confluence/display/MAVEN/Index 82 | [test-results]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-changelog-plugin/job/master/lastCompletedBuild/testReport/ 83 | [build]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-changelog-plugin/job/master/ 84 | -------------------------------------------------------------------------------- /src/it/minimal-pom-output-encoding/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 24 | 4.0.0 25 | 26 | org.apache.maven.plugins.changelog 27 | minimal-pom-output-encoding 28 | 1.0-SNAPSHOT 29 | jar 30 | 31 | http://maven.apache.org/ 32 | 33 | 34 | scm:git:https://gitbox.apache.org/repos/asf/maven-changelog-plugin.git 35 | scm:git:https://gitbox.apache.org/repos/asf/maven-changelog-plugin.git 36 | https://github.com/apache/maven-changelog-plugin/tree/${project.scm.tag} 37 | HEAD 38 | 39 | 40 | 41 | UTF-8 42 | 43 | 44 | 45 | 46 | 47 | org.apache.maven.plugins 48 | maven-site-plugin 49 | @sitePluginVersion@ 50 | 51 | 52 | 53 | 54 | 55 | true 56 | 57 | 58 | org.apache.maven.plugins 59 | maven-changelog-plugin 60 | @pom.version@ 61 | 62 | ISO-8859-1 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/it/minimal-pom-output-encoding/verify.bsh: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | */ 20 | 21 | import java.io.*; 22 | import java.util.*; 23 | import java.util.regex.*; 24 | import org.codehaus.plexus.util.FileUtils; 25 | 26 | try 27 | { 28 | File outputXML = new File( basedir, "target/changelog.xml" ); 29 | System.out.println( "Checking for existence of xml file: " + outputXML ); 30 | String content = FileUtils.fileRead( outputXML, "ISO-8859-1" ); 31 | if ( content.indexOf( "encoding=\"ISO-8859-1\"" ) < 0 ) 32 | { 33 | throw new IOException( "Wrong encoding attribute in content." ); 34 | } 35 | 36 | File siteDir = new File( basedir, "target/site" ); 37 | System.out.println( "Checking for existence of site directory: " + siteDir ); 38 | if ( !siteDir.isDirectory() ) 39 | { 40 | System.out.println( "FAILED" ); 41 | return false; 42 | } 43 | 44 | String[] reports = { "changelog", "dev-activity", "file-activity" }; 45 | for ( String report : reports ) 46 | { 47 | File reportFile = new File( siteDir, report + ".html" ); 48 | System.out.println( "Checking for existence of report: " + reportFile ); 49 | if ( !reportFile.isFile() ) 50 | { 51 | System.out.println( "FAILED" ); 52 | return false; 53 | } 54 | } 55 | } 56 | catch( Throwable t ) 57 | { 58 | t.printStackTrace(); 59 | return false; 60 | } 61 | 62 | return true; 63 | -------------------------------------------------------------------------------- /src/it/minimal-pom/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 24 | 4.0.0 25 | 26 | org.apache.maven.plugins.changelog 27 | minimal-pom 28 | 1.0-SNAPSHOT 29 | jar 30 | 31 | http://maven.apache.org/ 32 | 33 | 34 | scm:git:https://gitbox.apache.org/repos/asf/maven-changelog-plugin.git 35 | scm:git:https://gitbox.apache.org/repos/asf/maven-changelog-plugin.git 36 | https://github.com/apache/maven-changelog-plugin/tree/${project.scm.tag} 37 | HEAD 38 | 39 | 40 | 41 | UTF-8 42 | 43 | 44 | 45 | 46 | 47 | org.apache.maven.plugins 48 | maven-site-plugin 49 | @sitePluginVersion@ 50 | 51 | 52 | 53 | 54 | 55 | true 56 | 57 | 58 | org.apache.maven.plugins 59 | maven-changelog-plugin 60 | @pom.version@ 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/it/minimal-pom/verify.bsh: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | */ 20 | 21 | import java.io.*; 22 | import java.util.*; 23 | import java.util.regex.*; 24 | import org.codehaus.plexus.util.FileUtils; 25 | 26 | try 27 | { 28 | File outputXML = new File( basedir, "target/changelog.xml" ); 29 | System.out.println( "Checking for existence of xml file: " + outputXML ); 30 | String content = FileUtils.fileRead( outputXML, "UTF-8" ); 31 | if ( content.indexOf( "encoding=\"UTF-8\"" ) < 0 ) 32 | { 33 | throw new IOException( "Wrong encoding attribute in content." ); 34 | } 35 | 36 | File siteDir = new File( basedir, "target/site" ); 37 | System.out.println( "Checking for existence of site directory: " + siteDir ); 38 | if ( !siteDir.isDirectory() ) 39 | { 40 | System.out.println( "FAILED" ); 41 | return false; 42 | } 43 | 44 | String[] reports = { "changelog", "dev-activity", "file-activity" }; 45 | for ( String report : reports ) 46 | { 47 | File reportFile = new File( siteDir, report + ".html" ); 48 | System.out.println( "Checking for existence of report: " + reportFile ); 49 | if ( !reportFile.isFile() ) 50 | { 51 | System.out.println( "FAILED" ); 52 | return false; 53 | } 54 | } 55 | } 56 | catch( Throwable t ) 57 | { 58 | t.printStackTrace(); 59 | return false; 60 | } 61 | 62 | return true; 63 | -------------------------------------------------------------------------------- /src/it/project-reporting-output-encoding/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 24 | 4.0.0 25 | 26 | org.apache.maven.plugins.changelog 27 | project-reporting-output-encoding 28 | 1.0-SNAPSHOT 29 | jar 30 | 31 | http://maven.apache.org/ 32 | 33 | 34 | scm:git:https://gitbox.apache.org/repos/asf/maven-changelog-plugin.git 35 | scm:git:https://gitbox.apache.org/repos/asf/maven-changelog-plugin.git 36 | https://github.com/apache/maven-changelog-plugin/tree/${project.scm.tag} 37 | HEAD 38 | 39 | 40 | 41 | UTF-8 42 | ISO-8859-1 43 | 44 | 45 | 46 | 47 | 48 | org.apache.maven.plugins 49 | maven-site-plugin 50 | @sitePluginVersion@ 51 | 52 | 53 | 54 | 55 | 56 | true 57 | 58 | 59 | org.apache.maven.plugins 60 | maven-changelog-plugin 61 | @pom.version@ 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/it/project-reporting-output-encoding/verify.bsh: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | */ 20 | 21 | import java.io.*; 22 | import java.util.*; 23 | import java.util.regex.*; 24 | import org.codehaus.plexus.util.FileUtils; 25 | 26 | try 27 | { 28 | File outputXML = new File( basedir, "target/changelog.xml" ); 29 | System.out.println( "Checking for existence of xml file: " + outputXML ); 30 | String content = FileUtils.fileRead( outputXML, "ISO-8859-1" ); 31 | if ( content.indexOf( "encoding=\"ISO-8859-1\"" ) < 0 ) 32 | { 33 | throw new IOException( "Wrong encoding attribute in content." ); 34 | } 35 | 36 | File siteDir = new File( basedir, "target/site" ); 37 | System.out.println( "Checking for existence of site directory: " + siteDir ); 38 | if ( !siteDir.isDirectory() ) 39 | { 40 | System.out.println( "FAILED" ); 41 | return false; 42 | } 43 | 44 | String[] reports = { "changelog", "dev-activity", "file-activity" }; 45 | for ( String report : reports ) 46 | { 47 | File reportFile = new File( siteDir, report + ".html" ); 48 | System.out.println( "Checking for existence of report: " + reportFile ); 49 | if ( !reportFile.isFile() ) 50 | { 51 | System.out.println( "FAILED" ); 52 | return false; 53 | } 54 | } 55 | } 56 | catch( Throwable t ) 57 | { 58 | t.printStackTrace(); 59 | return false; 60 | } 61 | 62 | return true; 63 | -------------------------------------------------------------------------------- /src/it/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | 25 | it-repo 26 | 27 | true 28 | 29 | 30 | 31 | local.central 32 | @localRepositoryUrl@ 33 | 34 | true 35 | 36 | 37 | true 38 | 39 | 40 | 41 | 42 | 43 | local.central 44 | @localRepositoryUrl@ 45 | 46 | true 47 | 48 | 49 | true 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/it/with-svnjava-maven-3/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.maven.version = 3.0+ 19 | -------------------------------------------------------------------------------- /src/it/with-svnjava-maven-3/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 24 | 4.0.0 25 | 26 | org.apache.maven.plugins.changelog 27 | minimal-pom 28 | 1.0-SNAPSHOT 29 | jar 30 | 31 | http://maven.apache.org/ 32 | 33 | 34 | scm:svn:http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-changelog-plugin/ 35 | scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-changelog-plugin/ 36 | 37 | http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changelog-plugin/ 38 | 39 | 40 | 41 | UTF-8 42 | 2.0.3 43 | 44 | 45 | 46 | 47 | 48 | 49 | org.apache.maven.plugins 50 | maven-changelog-plugin 51 | @pom.version@ 52 | 53 | 54 | com.google.code.maven-scm-provider-svnjava 55 | maven-scm-provider-svnjava 56 | ${scmSvnJavaVersion} 57 | 58 | 59 | 60 | 61 | maven-site-plugin 62 | @sitePluginVersion@ 63 | 64 | 65 | 66 | 67 | 68 | 69 | org.apache.maven.plugins 70 | maven-changelog-plugin 71 | @pom.version@ 72 | 73 | [A-Z]{2,}-\d+ 74 | http://jira.example.co.uk 75 | 76 | javasvn 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /src/it/with-svnjava-maven-3/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | assert new File( basedir, 'target/site' ).exists(); 20 | assert new File( basedir, 'target/site' ).isDirectory(); 21 | 22 | assert new File( basedir, 'target/site/changelog.html' ).exists(); 23 | assert new File( basedir, 'target/site/changelog.html' ).isFile(); 24 | assert new File( basedir, 'target/site/dev-activity.html' ).exists(); 25 | assert new File( basedir, 'target/site/dev-activity.html' ).isFile(); 26 | assert new File( basedir, 'target/site/file-activity.html' ).exists(); 27 | assert new File( basedir, 'target/site/file-activity.html' ).isFile(); 28 | 29 | content = new File( basedir, 'build.log' ).text; 30 | 31 | assert content.contains( 'Change the default \'svn\' provider implementation to \'javasvn\'.' ); 32 | 33 | return true; -------------------------------------------------------------------------------- /src/main/java/org/apache/maven/plugins/changelog/ChangeLog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import javax.xml.parsers.ParserConfigurationException; 22 | import javax.xml.parsers.SAXParser; 23 | import javax.xml.parsers.SAXParserFactory; 24 | 25 | import java.io.BufferedReader; 26 | import java.io.IOException; 27 | import java.io.InputStream; 28 | import java.io.Reader; 29 | import java.util.ArrayList; 30 | import java.util.List; 31 | 32 | import org.apache.maven.scm.command.changelog.ChangeLogSet; 33 | import org.xml.sax.InputSource; 34 | import org.xml.sax.SAXException; 35 | 36 | /** 37 | * Change log task. It uses a ChangeLogGenerator and ChangeLogParser to create 38 | * a Collection of ChangeLogEntry objects, which are used to produce an XML 39 | * output that represents the list of changes. 40 | * 41 | * @author Glenn McAllister 42 | * @author Jeff Martin 43 | * @author Jason van Zyl 44 | * @author dIon Gillard 45 | * @author Stefan Bodewig 46 | * @author Peter Donald 47 | * @version $Id:ChangeLog.java 437762 2006-08-28 19:29:49 +0200 (må, 28 aug 2006) dennisl $ 48 | */ 49 | public class ChangeLog { 50 | /** 51 | * parses a previously generated changelog xml document and return its changed sets 52 | * 53 | * @param stream the changelog xml document 54 | * @return changelog sets parsed from the xml document 55 | * @throws ParserConfigurationException when instantiation of the SAX parser failed 56 | * @throws SAXException when an error occurred while parsing the xml document 57 | * @throws IOException when an error occurred while accessing the xml document 58 | */ 59 | public static List loadChangedSets(InputStream stream) 60 | throws ParserConfigurationException, SAXException, IOException { 61 | SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); 62 | 63 | List changeLogSets = new ArrayList<>(); 64 | 65 | parser.parse(stream, new ChangeLogHandler(changeLogSets)); 66 | 67 | return changeLogSets; 68 | } 69 | 70 | public static List loadChangedSets(Reader reader) 71 | throws ParserConfigurationException, SAXException, IOException { 72 | SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); 73 | 74 | List changeLogSets = new ArrayList<>(); 75 | 76 | // CHECKSTYLE_OFF: MagicNumber 77 | BufferedReader br = new BufferedReader(reader, 8192); 78 | // CHECKSTYLE_ON: MagicNumber 79 | 80 | parser.parse(new InputSource(br), new ChangeLogHandler(changeLogSets)); 81 | 82 | return changeLogSets; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/org/apache/maven/plugins/changelog/ChangeLogHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import java.text.ParseException; 22 | import java.text.SimpleDateFormat; 23 | import java.util.Collection; 24 | import java.util.Date; 25 | import java.util.LinkedList; 26 | import java.util.List; 27 | import java.util.TimeZone; 28 | import java.util.regex.Pattern; 29 | 30 | import org.apache.maven.scm.ChangeFile; 31 | import org.apache.maven.scm.ChangeSet; 32 | import org.apache.maven.scm.ScmTag; 33 | import org.apache.maven.scm.command.changelog.ChangeLogSet; 34 | import org.xml.sax.Attributes; 35 | import org.xml.sax.SAXException; 36 | import org.xml.sax.helpers.DefaultHandler; 37 | 38 | /** 39 | * Change log generated xml parser. SAXParser listener for processing a previously generated xml into several 40 | * change log sets. 41 | */ 42 | public class ChangeLogHandler extends DefaultHandler { 43 | // Use the same time zone offset when reading and adding times 44 | // It doesn't matter which one we use, as long we always use the same one 45 | private static final String TIMEZONE_STRING = "GMT-00:00"; 46 | 47 | private static final TimeZone TIMEZONE = TimeZone.getTimeZone(TIMEZONE_STRING); 48 | 49 | private final Collection changeSets; 50 | 51 | private String bufData = ""; 52 | 53 | private ChangeFile bufFile; 54 | 55 | private ChangeSet bufEntry; 56 | 57 | private List bufEntries; 58 | 59 | private ChangeLogSet bufSet; 60 | 61 | private String currentPattern; 62 | 63 | private final Pattern nameRegex = Pattern.compile(" \\(from [^:]+:\\d+\\)"); 64 | 65 | /** 66 | * contructor 67 | * 68 | * @param changeSets collection object to store all change sets found within the xml document 69 | */ 70 | public ChangeLogHandler(Collection changeSets) { 71 | this.changeSets = changeSets; 72 | } 73 | 74 | /** 75 | * {@inheritDoc} 76 | */ 77 | public void characters(char[] ch, int start, int length) throws SAXException { 78 | bufData += new String(ch, start, length); 79 | } 80 | 81 | /** 82 | * {@inheritDoc} 83 | */ 84 | public void endElement(String uri, String localName, String qName) throws SAXException { 85 | if ("changeset".equals(qName)) { 86 | changeSets.add(bufSet); 87 | } 88 | 89 | if ("changelog-entry".equals(qName)) { 90 | bufEntries.add(bufEntry); 91 | } 92 | 93 | if ("file".equals(qName)) { 94 | bufEntry.addFile(bufFile); 95 | } else if ("date".equals(qName)) { 96 | try { 97 | long ms = 0; 98 | if (bufEntry.getDate() != null) { 99 | ms = bufEntry.getDate().getTime(); 100 | } 101 | bufEntry.setDate(new Date( 102 | ms + new SimpleDateFormat(currentPattern).parse(bufData).getTime())); 103 | } catch (ParseException e) { 104 | throw new SAXException(e); 105 | } 106 | } else if ("time".equals(qName)) { 107 | try { 108 | long ms = 0; 109 | if (bufEntry.getDate() != null) { 110 | ms = bufEntry.getDate().getTime(); 111 | } 112 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat(currentPattern); 113 | // MCHANGELOG-68 Adjust for time zone when parsing the time 114 | simpleDateFormat.setTimeZone(TIMEZONE); 115 | // Adjust for time zone when adding up the milliseconds 116 | bufEntry.setDate(new Date(ms + simpleDateFormat.parse(bufData).getTime() + TIMEZONE.getRawOffset())); 117 | } catch (ParseException e) { 118 | throw new SAXException(e); 119 | } 120 | } else if ("author".equals(qName)) { 121 | bufEntry.setAuthor(bufData); 122 | } else if ("msg".equals(qName)) { 123 | bufEntry.setComment(bufData); 124 | } 125 | 126 | if ("revision".equals(qName)) { 127 | bufFile.setRevision(bufData); 128 | } else if ("name".equals(qName)) { 129 | bufFile.setName(nameRegex.matcher(bufData).replaceFirst("")); 130 | } 131 | } 132 | 133 | /** 134 | * {@inheritDoc} 135 | */ 136 | public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { 137 | bufData = ""; 138 | 139 | if ("file".equals(qName)) { 140 | bufFile = new ChangeFile(""); 141 | } else if ("changelog-entry".equals(qName)) { 142 | bufEntry = new ChangeSet(); 143 | } else if ("date".equals(qName)) { 144 | currentPattern = attributes.getValue("pattern"); 145 | if (currentPattern == null) { 146 | currentPattern = "yyyy-MM-dd"; 147 | } 148 | } else if ("time".equals(qName)) { 149 | currentPattern = attributes.getValue("pattern"); 150 | if (currentPattern == null) { 151 | currentPattern = "HH:mm:ss"; 152 | } 153 | } else if ("changeset".equals(qName)) { 154 | bufEntries = new LinkedList<>(); 155 | 156 | currentPattern = attributes.getValue("datePattern"); 157 | if (currentPattern == null) { 158 | currentPattern = "yyyy-MM-dd"; 159 | } 160 | 161 | SimpleDateFormat formatter = new SimpleDateFormat(currentPattern); 162 | 163 | String start = attributes.getValue("start"); 164 | 165 | String end = attributes.getValue("end"); 166 | 167 | Date startDate = null; 168 | 169 | Date endDate = null; 170 | 171 | if (start != null) { 172 | try { 173 | startDate = formatter.parse(start); 174 | } catch (ParseException e) { 175 | throw new SAXException("Can't parse start date '" + start + "'.", e); 176 | } 177 | } 178 | 179 | if (end != null) { 180 | try { 181 | endDate = formatter.parse(end); 182 | } catch (ParseException e) { 183 | throw new SAXException("Can't parse end date '" + end + "'.", e); 184 | } 185 | } 186 | 187 | bufSet = new ChangeLogSet(bufEntries, startDate, endDate); 188 | String startVersion = attributes.getValue("startVersion"); 189 | if (startVersion != null) { 190 | bufSet.setStartVersion(new ScmTag(startVersion)); 191 | } 192 | String endVersion = attributes.getValue("endVersion"); 193 | if (endVersion != null) { 194 | bufSet.setEndVersion(new ScmTag(endVersion)); 195 | } 196 | } 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /src/main/java/org/apache/maven/plugins/changelog/DeveloperActivityReport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import java.util.Collection; 22 | import java.util.HashMap; 23 | import java.util.LinkedList; 24 | import java.util.List; 25 | import java.util.Locale; 26 | import java.util.Map; 27 | import java.util.ResourceBundle; 28 | 29 | import org.apache.maven.doxia.sink.Sink; 30 | import org.apache.maven.plugins.annotations.Mojo; 31 | import org.apache.maven.scm.ChangeFile; 32 | import org.apache.maven.scm.ChangeSet; 33 | import org.apache.maven.scm.command.changelog.ChangeLogSet; 34 | 35 | /** 36 | * Generate a developer activity report. 37 | */ 38 | @Mojo(name = "dev-activity") 39 | public class DeveloperActivityReport extends ChangeLogReport { 40 | /** 41 | * Used to hold data while creating the report 42 | */ 43 | private Map> commits; 44 | 45 | private Map> files; 46 | 47 | /** 48 | * {@inheritDoc} 49 | */ 50 | public String getDescription(Locale locale) { 51 | return getBundle(locale).getString("report.dev-activity.description"); 52 | } 53 | 54 | /** 55 | * {@inheritDoc} 56 | */ 57 | public String getName(Locale locale) { 58 | return getBundle(locale).getString("report.dev-activity.name"); 59 | } 60 | 61 | /** 62 | * {@inheritDoc} 63 | */ 64 | public String getOutputName() { 65 | return "dev-activity"; 66 | } 67 | 68 | /** 69 | * {@inheritDoc} 70 | */ 71 | protected void doGenerateEmptyReport(ResourceBundle bundle, Sink sink) { 72 | sink.head(); 73 | sink.title(); 74 | sink.text(bundle.getString("report.dev-activity.header")); 75 | sink.title_(); 76 | sink.head_(); 77 | 78 | sink.body(); 79 | sink.section1(); 80 | 81 | sink.sectionTitle1(); 82 | sink.text(bundle.getString("report.dev-activity.mainTitle")); 83 | sink.sectionTitle1_(); 84 | 85 | sink.paragraph(); 86 | sink.text("No sources found to create a report."); 87 | sink.paragraph_(); 88 | 89 | sink.section1_(); 90 | 91 | sink.body_(); 92 | sink.flush(); 93 | sink.close(); 94 | } 95 | 96 | /** 97 | * {@inheritDoc} 98 | */ 99 | protected void doGenerateReport(List changeLogSets, ResourceBundle bundle, Sink sink) { 100 | sink.head(); 101 | sink.title(); 102 | sink.text(bundle.getString("report.dev-activity.header")); 103 | sink.title_(); 104 | sink.head_(); 105 | 106 | sink.body(); 107 | sink.section1(); 108 | sink.sectionTitle1(); 109 | sink.text(bundle.getString("report.dev-activity.mainTitle")); 110 | sink.sectionTitle1_(); 111 | 112 | if (developers.isEmpty()) { 113 | sink.paragraph(); 114 | sink.text(bundle.getString("report.dev-activity.noDevelopers")); 115 | sink.paragraph_(); 116 | } else { 117 | for (ChangeLogSet set : changeLogSets) { 118 | doChangedSets(set, bundle, sink); 119 | } 120 | } 121 | 122 | sink.section1_(); 123 | sink.body_(); 124 | sink.flush(); 125 | sink.close(); 126 | } 127 | 128 | /** 129 | * generates a section of the report referring to a changeset 130 | * 131 | * @param set the current ChangeSet to generate this section of the report 132 | * @param bundle the resource bundle to retrieve report phrases from 133 | * @param sink the report formatting tool 134 | */ 135 | private void doChangedSets(ChangeLogSet set, ResourceBundle bundle, Sink sink) { 136 | sink.section2(); 137 | 138 | doChangeSetTitle(set, bundle, sink); 139 | 140 | doSummary(set, bundle, sink); 141 | 142 | sink.table(); 143 | sink.tableRows(new int[] {Sink.JUSTIFY_LEFT}, false); 144 | 145 | sink.tableRow(); 146 | sink.tableHeaderCell(); 147 | sink.text(bundle.getString("report.dev-activity.developer")); 148 | sink.tableHeaderCell_(); 149 | sink.tableHeaderCell(); 150 | sink.text(bundle.getString("report.TotalCommits")); 151 | sink.tableHeaderCell_(); 152 | sink.tableHeaderCell(); 153 | sink.text(bundle.getString("report.dev-activity.filesChanged")); 154 | sink.tableHeaderCell_(); 155 | sink.tableRow_(); 156 | 157 | doDeveloperRows(set, sink); 158 | 159 | sink.tableRows_(); 160 | sink.table_(); 161 | 162 | sink.section2_(); 163 | } 164 | 165 | /** 166 | * generates the report section table of the developers 167 | * 168 | * @param set change log set generate the developer activity 169 | * @param sink the report formatting tool 170 | */ 171 | private void doDeveloperRows(ChangeLogSet set, Sink sink) { 172 | initDeveloperDetails(set); 173 | 174 | for (Map.Entry> commit : commits.entrySet()) { 175 | String author = commit.getKey(); 176 | 177 | List devCommits = commit.getValue(); 178 | Map devFiles = files.get(author); 179 | 180 | sink.tableRow(); 181 | sink.tableCell(); 182 | 183 | sinkAuthorDetails(sink, author); 184 | 185 | sink.tableCell_(); 186 | 187 | sink.tableCell(); 188 | sink.text(String.valueOf(devCommits.size())); 189 | sink.tableCell_(); 190 | 191 | sink.tableCell(); 192 | sink.text(String.valueOf(devFiles.size())); 193 | sink.tableCell_(); 194 | 195 | sink.tableRow_(); 196 | } 197 | } 198 | 199 | /** 200 | * counts the number of commits and files changed for each developer 201 | * 202 | * @param set the change log set to generate the developer details from 203 | */ 204 | private void initDeveloperDetails(ChangeLogSet set) { 205 | commits = new HashMap<>(); 206 | 207 | files = new HashMap<>(); 208 | 209 | countDevCommits(set.getChangeSets()); 210 | 211 | countDevFiles(set.getChangeSets()); 212 | } 213 | 214 | /** 215 | * counts the number of commits of each developer 216 | * 217 | * @param entries the change log entries used to search and count developer commits 218 | */ 219 | private void countDevCommits(Collection entries) { 220 | for (ChangeSet entry : entries) { 221 | List list = commits.computeIfAbsent(entry.getAuthor(), k -> new LinkedList<>()); 222 | list.add(entry); 223 | } 224 | } 225 | 226 | /** 227 | * counts the number of files changed by each developer 228 | * 229 | * @param entries the change log entries used to search and count file changes 230 | */ 231 | private void countDevFiles(Collection entries) { 232 | for (ChangeSet entry : entries) { 233 | String developer = entry.getAuthor(); 234 | Map filesMap = files.computeIfAbsent(developer, k -> new HashMap<>()); 235 | for (ChangeFile file : entry.getFiles()) { 236 | filesMap.put(file.getName(), file); 237 | } 238 | } 239 | } 240 | } 241 | -------------------------------------------------------------------------------- /src/main/java/org/apache/maven/plugins/changelog/FileActivityComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import java.util.Comparator; 22 | import java.util.List; 23 | 24 | import org.apache.maven.scm.ChangeFile; 25 | 26 | /** 27 | * Object used to sort the file-activity report into descending order. 28 | */ 29 | public class FileActivityComparator implements Comparator> { 30 | /** 31 | * {@inheritDoc} 32 | */ 33 | public int compare(List list1, List list2) throws ClassCastException { 34 | int returnValue = Integer.compare(list2.size(), list1.size()); 35 | 36 | if (returnValue != 0) { 37 | return returnValue; 38 | } 39 | 40 | returnValue = sortByRevision(list1, list2); 41 | 42 | if (returnValue != 0) { 43 | return returnValue; 44 | } 45 | 46 | return sortByName(list1, list2); 47 | } 48 | 49 | /** 50 | * compares list1 and list2 by comparing their revision code 51 | * 52 | * @param list1 the first object in a compare statement 53 | * @param list2 the object to compare list1 against 54 | * @return an integer describing the order comparison of list1 and list2 55 | */ 56 | private int sortByRevision(List list1, List list2) { 57 | String revision1 = getLatestRevision(list1); 58 | String revision2 = getLatestRevision(list2); 59 | 60 | if (revision1 == null) { 61 | return -1; 62 | } 63 | 64 | if (revision2 == null) { 65 | return 1; 66 | } 67 | 68 | return revision1.compareTo(revision2); 69 | } 70 | 71 | /** 72 | * retrieves the latest revision from the commits made from the SCM 73 | * 74 | * @param list The list of revisions from the file 75 | * @return the latest revision code 76 | */ 77 | private String getLatestRevision(List list) { 78 | String latest = ""; 79 | 80 | for (ChangeFile file : list) { 81 | if (latest != null && !latest.trim().isEmpty()) { 82 | latest = file.getRevision(); 83 | } else if (latest.compareTo(file.getRevision()) < 0) { 84 | latest = file.getRevision(); 85 | } 86 | } 87 | 88 | return latest; 89 | } 90 | 91 | /** 92 | * compares list1 and list2 by comparing their filenames. Least priority sorting when both number of commits and 93 | * revision are the same 94 | * 95 | * @param list1 the first object in a compare statement 96 | * @param list2 the object to compare list1 against 97 | * @return an integer describing the order comparison of list1 and list2 98 | */ 99 | private int sortByName(List list1, List list2) { 100 | ChangeFile file1 = list1.get(0); 101 | 102 | ChangeFile file2 = list2.get(0); 103 | 104 | return file1.getName().compareTo(file2.getName()); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /src/main/java/org/apache/maven/plugins/changelog/FileActivityReport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import java.util.Collection; 22 | import java.util.HashMap; 23 | import java.util.LinkedList; 24 | import java.util.List; 25 | import java.util.Locale; 26 | import java.util.Map; 27 | import java.util.ResourceBundle; 28 | 29 | import org.apache.maven.doxia.sink.Sink; 30 | import org.apache.maven.plugins.annotations.Mojo; 31 | import org.apache.maven.scm.ChangeFile; 32 | import org.apache.maven.scm.ChangeSet; 33 | import org.apache.maven.scm.command.changelog.ChangeLogSet; 34 | 35 | /** 36 | * Generate a file activity report. 37 | */ 38 | @Mojo(name = "file-activity") 39 | public class FileActivityReport extends ChangeLogReport { 40 | /** 41 | * {@inheritDoc} 42 | */ 43 | public String getDescription(Locale locale) { 44 | return getBundle(locale).getString("report.file-activity.description"); 45 | } 46 | 47 | /** 48 | * {@inheritDoc} 49 | */ 50 | public String getName(Locale locale) { 51 | return getBundle(locale).getString("report.file-activity.name"); 52 | } 53 | 54 | /** 55 | * {@inheritDoc} 56 | */ 57 | public String getOutputName() { 58 | return "file-activity"; 59 | } 60 | 61 | /** 62 | * {@inheritDoc} 63 | */ 64 | protected void doGenerateEmptyReport(ResourceBundle bundle, Sink sink) { 65 | sink.head(); 66 | sink.title(); 67 | sink.text(bundle.getString("report.file-activity.header")); 68 | sink.title_(); 69 | sink.head_(); 70 | 71 | sink.body(); 72 | sink.section1(); 73 | 74 | sink.sectionTitle1(); 75 | sink.text(bundle.getString("report.file-activity.mainTitle")); 76 | sink.sectionTitle1_(); 77 | 78 | sink.paragraph(); 79 | sink.text("No sources found to create a report."); 80 | sink.paragraph_(); 81 | 82 | sink.section1_(); 83 | 84 | sink.body_(); 85 | sink.flush(); 86 | sink.close(); 87 | } 88 | 89 | /** 90 | * {@inheritDoc} 91 | */ 92 | protected void doGenerateReport(List changeLogSets, ResourceBundle bundle, Sink sink) { 93 | sink.head(); 94 | sink.title(); 95 | sink.text(bundle.getString("report.file-activity.header")); 96 | sink.title_(); 97 | sink.head_(); 98 | 99 | sink.body(); 100 | sink.section1(); 101 | sink.sectionTitle1(); 102 | sink.text(bundle.getString("report.file-activity.mainTitle")); 103 | sink.sectionTitle1_(); 104 | 105 | for (ChangeLogSet set : changeLogSets) { 106 | doChangedSets(set, bundle, sink); 107 | } 108 | 109 | sink.section1_(); 110 | sink.body_(); 111 | 112 | sink.flush(); 113 | sink.close(); 114 | } 115 | 116 | /** 117 | * generates a section of the report referring to a changeset 118 | * 119 | * @param set the current ChangeSet to generate this section of the report 120 | * @param bundle the resource bundle to retrieve report phrases from 121 | * @param sink the report formatting tool 122 | */ 123 | private void doChangedSets(ChangeLogSet set, ResourceBundle bundle, Sink sink) { 124 | sink.section2(); 125 | 126 | doChangeSetTitle(set, bundle, sink); 127 | 128 | doSummary(set, bundle, sink); 129 | 130 | sink.table(); 131 | sink.tableRows(new int[] {Sink.JUSTIFY_LEFT}, false); 132 | 133 | sink.tableRow(); 134 | sink.tableHeaderCell(); 135 | sink.text(bundle.getString("report.file-activity.filename")); 136 | sink.tableHeaderCell_(); 137 | sink.tableHeaderCell(); 138 | sink.text(bundle.getString("report.file-activity.timesChanged")); 139 | sink.tableHeaderCell_(); 140 | sink.tableRow_(); 141 | 142 | doRows(set, sink); 143 | 144 | sink.tableRows_(); 145 | sink.table_(); 146 | 147 | sink.section2_(); 148 | } 149 | 150 | /** 151 | * generates the row details for the file activity report 152 | * 153 | * @param set the changelog set to generate a report with 154 | * @param sink the report formatting tool 155 | */ 156 | private void doRows(ChangeLogSet set, Sink sink) { 157 | List> list = getOrderedFileList(set.getChangeSets()); 158 | 159 | initReportUrls(); 160 | 161 | for (List revision : list) { 162 | ChangeFile file = revision.get(0); 163 | 164 | sink.tableRow(); 165 | sink.tableCell(); 166 | 167 | try { 168 | generateLinks(getConnection(), file.getName(), sink); 169 | } catch (Exception e) { 170 | if (getLog().isDebugEnabled()) { 171 | getLog().error(e.getMessage(), e); 172 | } else { 173 | getLog().error(e.getMessage()); 174 | } 175 | 176 | sink.text(file.getName()); 177 | } 178 | sink.tableCell_(); 179 | 180 | sink.tableCell(); 181 | sink.text("" + revision.size()); 182 | 183 | sink.tableCell_(); 184 | sink.tableRow_(); 185 | } 186 | } 187 | 188 | /** 189 | * reads the change log entries and generates a list of files changed order by the number of times edited. This 190 | * used the FileActivityComparator Object to sort the list 191 | * 192 | * @param entries the changelog entries to generate the report 193 | * @return list of changed files within the SCM with the number of times changed in descending order 194 | */ 195 | private List> getOrderedFileList(Collection entries) { 196 | Map> map = new HashMap<>(); 197 | for (ChangeSet entry : entries) { 198 | for (ChangeFile file : entry.getFiles()) { 199 | List revisions = map.computeIfAbsent(file.getName(), k -> new LinkedList<>()); 200 | revisions.add(file); 201 | } 202 | } 203 | 204 | List> list = new LinkedList<>(map.values()); 205 | list.sort(new FileActivityComparator()); 206 | return list; 207 | } 208 | } 209 | -------------------------------------------------------------------------------- /src/main/java/org/apache/maven/plugins/changelog/scm/provider/svn/svnexe/command/info/SvnInfoCommandExpanded.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog.scm.provider.svn.svnexe.command.info; 20 | 21 | import java.io.File; 22 | import java.util.Iterator; 23 | 24 | import org.apache.maven.scm.CommandParameters; 25 | import org.apache.maven.scm.ScmException; 26 | import org.apache.maven.scm.ScmFileSet; 27 | import org.apache.maven.scm.ScmResult; 28 | import org.apache.maven.scm.ScmTag; 29 | import org.apache.maven.scm.command.AbstractCommand; 30 | import org.apache.maven.scm.command.info.InfoScmResult; 31 | import org.apache.maven.scm.provider.ScmProviderRepository; 32 | import org.apache.maven.scm.provider.svn.SvnCommandUtils; 33 | import org.apache.maven.scm.provider.svn.SvnTagBranchUtils; 34 | import org.apache.maven.scm.provider.svn.command.SvnCommand; 35 | import org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository; 36 | import org.apache.maven.scm.provider.svn.svnexe.command.SvnCommandLineUtils; 37 | import org.apache.maven.scm.provider.svn.svnexe.command.info.SvnInfoConsumer; 38 | import org.codehaus.plexus.util.cli.CommandLineException; 39 | import org.codehaus.plexus.util.cli.CommandLineUtils; 40 | import org.codehaus.plexus.util.cli.Commandline; 41 | 42 | /** 43 | * variation of SvnInfoCommand to work for branches. Taken from 1.7 release of maven-scm-providers 44 | * 45 | * @author Kenney Westerhof 46 | */ 47 | public class SvnInfoCommandExpanded extends AbstractCommand implements SvnCommand { 48 | 49 | /** {@inheritDoc} */ 50 | @Override 51 | protected ScmResult executeCommand( 52 | final ScmProviderRepository repository, final ScmFileSet fileSet, final CommandParameters parameters) 53 | throws ScmException { 54 | return executeInfoCommand((SvnScmProviderRepository) repository, fileSet, parameters, false, null); 55 | } 56 | 57 | public InfoScmResult executeInfoCommand( 58 | final SvnScmProviderRepository repository, 59 | final ScmFileSet fileSet, 60 | final CommandParameters parameters, 61 | final boolean recursive, 62 | final String revision) 63 | throws ScmException { 64 | Commandline cl = createCommandLine(repository, fileSet, recursive, revision); 65 | return executeInfoCommand(cl); 66 | } 67 | 68 | public InfoScmResult executeInfoTagCommand( 69 | final SvnScmProviderRepository repository, 70 | final ScmFileSet fileSet, 71 | final String tag, 72 | final CommandParameters parameters, 73 | final boolean recursive, 74 | final String revision) 75 | throws ScmException { 76 | Commandline cl = createTagCommandLine(repository, fileSet, tag, recursive, revision); 77 | return executeInfoCommand(cl); 78 | } 79 | 80 | private InfoScmResult executeInfoCommand(final Commandline cl) throws ScmException { 81 | 82 | SvnInfoConsumer consumer = new SvnInfoConsumer(); 83 | 84 | CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer(); 85 | if (logger.isInfoEnabled()) { 86 | logger.info("Executing: " + SvnCommandLineUtils.cryptPassword(cl)); 87 | logger.info("Working directory: " + cl.getWorkingDirectory().getAbsolutePath()); 88 | } 89 | 90 | int exitCode; 91 | try { 92 | exitCode = SvnCommandLineUtils.execute(cl, consumer, stderr); 93 | } catch (CommandLineException ex) { 94 | throw new ScmException("Error while executing command.", ex); 95 | } 96 | 97 | if (exitCode != 0) { 98 | return new InfoScmResult(cl.toString(), "The svn command failed.", stderr.getOutput(), false); 99 | } 100 | 101 | return new InfoScmResult(cl.toString(), consumer.getInfoItems()); 102 | } 103 | 104 | // set scope to protected to allow test to call it directly 105 | protected static Commandline createCommandLine( 106 | final SvnScmProviderRepository repository, 107 | final ScmFileSet fileSet, 108 | final boolean recursive, 109 | final String revision) { 110 | Commandline cl = SvnCommandLineUtils.getBaseSvnCommandLine(fileSet.getBasedir(), repository); 111 | 112 | cl.createArg().setValue("info"); 113 | 114 | if (recursive) { 115 | cl.createArg().setValue("--recursive"); 116 | } 117 | 118 | if (revision != null && !revision.isEmpty()) { 119 | cl.createArg().setValue("-r"); 120 | cl.createArg().setValue(revision); 121 | } 122 | 123 | for (File file : fileSet.getFileList()) { 124 | if (repository == null) { 125 | cl.createArg().setValue(file.getPath()); 126 | } else { 127 | cl.createArg() 128 | .setValue(repository.getUrl() + "/" + file.getPath().replace('\\', '/')); 129 | } 130 | } 131 | 132 | return cl; 133 | } 134 | 135 | // set scope to protected to allow test to call it directly 136 | protected static Commandline createTagCommandLine( 137 | final SvnScmProviderRepository repository, 138 | final ScmFileSet fileSet, 139 | final String tag, 140 | final boolean recursive, 141 | final String revision) { 142 | Commandline cl = SvnCommandLineUtils.getBaseSvnCommandLine(fileSet.getBasedir(), repository); 143 | 144 | cl.createArg().setValue("info"); 145 | 146 | if (recursive) { 147 | cl.createArg().setValue("--recursive"); 148 | } 149 | 150 | if (revision != null && !revision.isEmpty()) { 151 | cl.createArg().setValue("-r"); 152 | cl.createArg().setValue(revision); 153 | } 154 | 155 | Iterator it = fileSet.getFileList().iterator(); 156 | 157 | if (!it.hasNext()) { 158 | String tagUrl = SvnTagBranchUtils.resolveTagUrl(repository, new ScmTag(tag)); 159 | cl.createArg().setValue(SvnCommandUtils.fixUrl(tagUrl, repository.getUser())); 160 | } else { 161 | while (it.hasNext()) { 162 | File file = it.next(); 163 | 164 | if (repository == null) { 165 | cl.createArg().setValue(file.getPath()); 166 | } else { 167 | // Note: this currently assumes you have the tag base checked out too 168 | String tagUrl = SvnTagBranchUtils.resolveTagUrl(repository, new ScmTag(tag)) + "/" 169 | + file.getPath().replace('\\', '/'); 170 | cl.createArg().setValue(SvnCommandUtils.fixUrl(tagUrl, repository.getUser())); 171 | } 172 | } 173 | } 174 | 175 | return cl; 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /src/main/resources/scm-activity.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | #Commons 19 | report.And=and 20 | report.SetRangeUnknown=Changes from an unknown range 21 | report.SetRangeSince=Changes since 22 | report.SetRangeBetween=Changes between 23 | report.SetTagCreation=Changes since project creation 24 | report.SetTagSince=Changes since tag 25 | report.SetTagBetween=Changes between tags 26 | report.SetTagUntil=until tag 27 | report.To=to 28 | report.TotalCommits=Total commits 29 | 30 | #Changelog 31 | report.changelog.name=Change Log 32 | report.changelog.description=Generated change log report from SCM. 33 | report.changelog.header=Change Log Report 34 | report.changelog.mainTitle=Change Log Report 35 | report.changelog.ChangedSetsTotal=Total number of changed sets 36 | report.changelog.FilesChanged=Total number of files changed 37 | report.changelog.timestamp=Timestamp 38 | report.changelog.author=Author 39 | report.changelog.details=Details 40 | report.changelog.revision=Revision 41 | report.changelog.nosources=No sources found to create a report. 42 | 43 | #Developer Activity 44 | report.dev-activity.name=Developer Activity 45 | report.dev-activity.description=Generated developer activity report from SCM. 46 | report.dev-activity.header=Developer Activity Report 47 | report.dev-activity.mainTitle=Developer Activity Report 48 | report.dev-activity.noDevelopers=No developers found in pom. 49 | report.dev-activity.range=Range 50 | report.dev-activity.filesChanged=Total Number of Files Changed 51 | report.dev-activity.developer=Developer 52 | 53 | #File Activity 54 | report.file-activity.name=File Activity 55 | report.file-activity.description=Generated file activity report from SCM. 56 | report.file-activity.header=File Activity Report 57 | report.file-activity.mainTitle=File Activity Report 58 | report.file-activity.range=Range 59 | report.file-activity.filesChanged=Total Number of Files Changed 60 | report.file-activity.timesChanged=Number of Times Changed 61 | report.file-activity.filename=Filename 62 | -------------------------------------------------------------------------------- /src/main/resources/scm-activity_de.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | #Commons 19 | report.And=und 20 | report.SetRangeUnknown=\u00C4nderungen seit unbekanntem Breich 21 | report.SetRangeSince=\u00C4nderungen seit 22 | report.SetRangeBetween=\u00C4nderungen zwischen 23 | report.SetTagCreation=\u00C4nderungen seit Projekterstellung 24 | report.SetTagSince=\u00C4nderungen seit Markierung 25 | report.SetTagBetween=\u00C4nderungen zwischen Markierungen 26 | report.SetTagUntil=bis Markierung 27 | report.To=an 28 | report.TotalCommits=Summe Festschreibungen 29 | 30 | #Changelog 31 | report.changelog.name=\u00C4nderungsprotokollbericht 32 | report.changelog.description=Aus SCM erstellter \u00C4nderungsprotokollbericht. 33 | report.changelog.header=\u00C4nderungsprotokollbericht 34 | report.changelog.mainTitle=\u00C4nderungsprotokollbericht 35 | report.changelog.ChangedSetsTotal=Summe der ge\u00E4nderten S\u00E4tze 36 | report.changelog.FilesChanged=Summe ge\u00E4nderter Dateien 37 | report.changelog.timestamp=Zeitstempel 38 | report.changelog.author=Autor 39 | report.changelog.details=Details 40 | report.changelog.revision=Revision 41 | report.changelog.nosources=Kein Quellcode gefunden. 42 | 43 | #Developer Activity 44 | report.dev-activity.name=Entwickler-Aktivit\u00E4t 45 | report.dev-activity.description=Aus SCM erstellter Entwickler-Aktivit\u00E4ten-Bericht. 46 | report.dev-activity.header=Entwickler-Aktivit\u00E4ten-Bericht 47 | report.dev-activity.mainTitle=Entwickler-Aktivit\u00E4ten-Bericht 48 | report.dev-activity.noDevelopers=Keine Entwickler in POM gefunden. 49 | report.dev-activity.range=Bereich 50 | report.dev-activity.filesChanged=Summe ge\u00E4nderter Dateien 51 | report.dev-activity.developer=Entwickler 52 | 53 | #File Activity 54 | report.file-activity.name=Datei-Aktivit\u00E4t 55 | report.file-activity.description=Aus SCM erstellter Datei-Aktivit\u00E4ten-Bericht. 56 | report.file-activity.header=Datei-Aktivit\u00E4ten-Bericht 57 | report.file-activity.mainTitle=Datei-Aktivit\u00E4ten-Bericht 58 | report.file-activity.range=Bereich 59 | report.file-activity.filesChanged=Summe ge\u00E4nderter Dateien 60 | report.file-activity.timesChanged=Anzahl \u00C4nderungen 61 | report.file-activity.filename=Dateiname 62 | -------------------------------------------------------------------------------- /src/main/resources/scm-activity_en.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # NOTE: 19 | # This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It 20 | # must be provided nevertheless such that a request for locale "en" will not erroneously pick up the bundle for the 21 | # JVM's default locale (which need not be "en"). See the method javadoc about 22 | # ResourceBundle.getBundle(String, Locale, ClassLoader) 23 | # for a full description of the lookup strategy. 24 | -------------------------------------------------------------------------------- /src/main/resources/scm-activity_es_AR.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | #Commons 19 | report.And=y 20 | report.SetRangeUnknown=Cambios a partir de una rango desconocido 21 | report.SetRangeSince=Cambios desde 22 | report.SetRangeBetween=Cambios entre 23 | report.SetTagCreation=Cambios desde la creaci\u00F3n del proyecto 24 | report.SetTagSince=Cambios desde etiqueta 25 | report.SetTagBetween=Cambios entre etiquetas 26 | report.SetTagUntil=hasta etiqueta 27 | report.To=a 28 | report.TotalCommits=Total commits 29 | 30 | #Changelog 31 | report.changelog.name=Log de Cambios 32 | report.changelog.description=Log de Cambios generados a partir de SCM. 33 | report.changelog.header=Informe de Log de Cambios 34 | report.changelog.mainTitle=Informe de Log de Cambios 35 | report.changelog.ChangedSetsTotal=N\u00FAmero Total de cambios en conjunto 36 | report.changelog.FilesChanged=N\u00FAmero Total de archivos cambiados 37 | report.changelog.timestamp=Fecha y Hora 38 | report.changelog.author=Autor 39 | report.changelog.details=Detalles 40 | report.changelog.revision=Revisi\u00F3n 41 | report.changelog.nosources=No se encontraron archivos fuente para crear un informe. 42 | 43 | #Developer Activity 44 | report.dev-activity.name=Actividad por Desarrollador 45 | report.dev-activity.description=Informe de actividad por desarrollador generado a partir de SCM. 46 | report.dev-activity.header=Informe de Actividad por Desarrollador 47 | report.dev-activity.mainTitle=Informe de Actividad por Desarrollador 48 | report.dev-activity.noDevelopers=No se encontraron desarrolladores en pom. 49 | report.dev-activity.range=Rango 50 | report.dev-activity.filesChanged=N\u00FAmero Total de Archivos Cambiados 51 | report.dev-activity.developer=Desarrollador 52 | 53 | #File Activity 54 | report.file-activity.name=Actividad por Archivo 55 | report.file-activity.description=Informe de actividad por archivo generado a partir de SCM. 56 | report.file-activity.header=Informe de Actividad por Archivo 57 | report.file-activity.mainTitle=Informe de Actividad por Archivo 58 | report.file-activity.range=Rango 59 | report.file-activity.filesChanged=N\u00FAmero Total de Archivos Cambiados 60 | report.file-activity.timesChanged=N\u00FAmero de Veces Cambiado 61 | report.file-activity.filename=Archivo 62 | -------------------------------------------------------------------------------- /src/main/resources/scm-activity_pt_BR.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | #Commons 19 | report.And=e 20 | report.SetRangeUnknown=Mudan\u00e7as de um per\u00edodo desconhecido 21 | report.SetRangeSince=Mudan\u00e7as desde 22 | report.SetRangeBetween=Mudan\u00e7as entre 23 | report.SetTagCreation=Mudan\u00e7as desde a cria\u00e7\u00e3o do projeto 24 | report.SetTagSince=Mudan\u00e7as deste o tag 25 | report.SetTagBetween=Mudan\u00e7as entre tags 26 | report.SetTagUntil=at\u00e9 tag 27 | report.To=para 28 | report.TotalCommits=Commits totais 29 | 30 | #Changelog 31 | report.changelog.name=Registros de Mudan\u00e7as 32 | report.changelog.description=Gerado relat\u00f3rio de mudan\u00e7as do SCV. 33 | report.changelog.header=Relat\u00f3rio de Mudan\u00e7as 34 | report.changelog.mainTitle=Relat\u00f3rio de Mudan\u00e7as 35 | report.changelog.ChangedSetsTotal=N\u00famero total de mudan\u00e7as 36 | report.changelog.FilesChanged=N\u00famero total de arquivos alterados 37 | report.changelog.timestamp=Data e hora 38 | report.changelog.author=Autor 39 | report.changelog.details=Detalhes 40 | report.changelog.revision=Revis\u00e3o 41 | report.changelog.nosources=Origem n\u00e3o localizada para criar o relat\u00f3rio. 42 | 43 | #Developer Activity 44 | report.dev-activity.name=Atividade dos Desenvolvedores 45 | report.dev-activity.description=Gerado relat\u00f3rio de atividades dos desenvolvedores do SCV. 46 | report.dev-activity.header=Relat\u00f3rio de Atividades dos Desenvolvedores 47 | report.dev-activity.mainTitle=Relat\u00f3rio de Atividades dos Desenvolvedores 48 | report.dev-activity.noDevelopers=Desenvolvedores n\u00e3o encontrados no pom. 49 | report.dev-activity.range=Per\u00edodo 50 | report.dev-activity.filesChanged=N\u00famero total de arquivos alterados 51 | report.dev-activity.developer=Desenvolvedor 52 | 53 | #File Activity 54 | report.file-activity.name=Atividade nos Arquivos 55 | report.file-activity.description=Gerado relat\u00f3rio de atividade nos arquivos do SCM. 56 | report.file-activity.header=Relat\u00f3rio de Atividade nos Arquivos 57 | report.file-activity.mainTitle=Relat\u00f3rio de Atividade nos Arquivos 58 | report.file-activity.range=Per\u00edodo 59 | report.file-activity.filesChanged=N\u00famero total de arquivos alterados 60 | report.file-activity.timesChanged=N\u00famero de altera\u00e7\u00f5es 61 | report.file-activity.filename=Nome do arquivo 62 | -------------------------------------------------------------------------------- /src/main/resources/scm-activity_sv.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | #Commons 19 | report.And=och 20 | report.SetRangeUnknown=\u00c4ndringar fr\u00e5n ett ok\u00e4nt omf\u00e5ng 21 | report.SetRangeSince=\u00c4ndringar sedan 22 | report.SetRangeBetween=\u00c4ndringar mellan 23 | report.SetTagCreation=\u00c4ndringar sedan projeket skapades 24 | report.SetTagSince=\u00c4ndringar sedan tag 25 | report.SetTagBetween=\u00c4ndringar mellan tags 26 | report.SetTagUntil=till tag 27 | report.To=till 28 | report.TotalCommits=Totalt antal incheckningar 29 | 30 | #Changelog 31 | report.changelog.name=\u00c4ndringslogg 32 | report.changelog.description=Genererad rapport \u00f6ver \u00e4ndringslogg fr\u00e5n SCM. 33 | report.changelog.header=\u00c4ndringsloggsrapport 34 | report.changelog.mainTitle=\u00c4ndringsloggsrapport 35 | report.changelog.ChangedSetsTotal=Totalt antal change sets 36 | report.changelog.FilesChanged=Totalt antal filer som \u00e4ndrats 37 | report.changelog.timestamp=Tidsst\u00e4mpel 38 | report.changelog.author=F\u00f6rfattare 39 | report.changelog.details=Detaljer 40 | report.changelog.revision=Revision 41 | report.changelog.nosources=Ingen k\u00e4llkod hittades som det g\u00e5r att skapa en rapport av. 42 | 43 | #Developer Activity 44 | report.dev-activity.name=Utvecklaraktivitet 45 | report.dev-activity.description=Genererad rapport \u00f6ver utvecklaraktivitet fr\u00e5n SCM. 46 | report.dev-activity.header=Utvecklaraktivitetsrapport 47 | report.dev-activity.mainTitle=Utvecklaraktivitetsrapport 48 | report.dev-activity.noDevelopers=Inga utvecklare hittades i POM. 49 | report.dev-activity.range=Omf\u00e5ng 50 | report.dev-activity.filesChanged=Totalt antal filer som \u00e4ndrats 51 | report.dev-activity.developer=Utvecklare 52 | 53 | #File Activity 54 | report.file-activity.name=Filaktivitet 55 | report.file-activity.description=Genererad rapport \u00f6ver filaktivitet fr\u00e5n SCM. 56 | report.file-activity.header=Filaktivitetsrapport 57 | report.file-activity.mainTitle=Filaktivitetsrapport 58 | report.file-activity.range=Omf\u00e5ng 59 | report.file-activity.filesChanged=Totalt antal files som \u00e4ndrats 60 | report.file-activity.timesChanged=Antal g\u00e5nger den \u00e4ndrats 61 | report.file-activity.filename=Filnamn 62 | -------------------------------------------------------------------------------- /src/site/apt/changing-scm-impl.apt.vm: -------------------------------------------------------------------------------- 1 | ------ 2 | Changing Scm Implementation 3 | ------ 4 | Olivier Lamy 5 | ------ 6 | 2011-09-17 7 | ------ 8 | 9 | ~~ Licensed to the Apache Software Foundation (ASF) under one 10 | ~~ or more contributor license agreements. See the NOTICE file 11 | ~~ distributed with this work for additional information 12 | ~~ regarding copyright ownership. The ASF licenses this file 13 | ~~ to you under the Apache License, Version 2.0 (the 14 | ~~ "License"); you may not use this file except in compliance 15 | ~~ with the License. You may obtain a copy of the License at 16 | ~~ 17 | ~~ http://www.apache.org/licenses/LICENSE-2.0 18 | ~~ 19 | ~~ Unless required by applicable law or agreed to in writing, 20 | ~~ software distributed under the License is distributed on an 21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 22 | ~~ KIND, either express or implied. See the License for the 23 | ~~ specific language governing permissions and limitations 24 | ~~ under the License. 25 | 26 | ~~ NOTE: For help with the syntax of this file, see: 27 | ~~ http://maven.apache.org/doxia/references/apt-format.html 28 | 29 | Changing Scm Implementation 30 | 31 | Starting version 2.3, you can change Apache Maven Scm implementation used for your scm (ie javasvn for svn scm). 32 | 33 | Standard configuration : 34 | 35 | +-----+ 36 | 37 | ..... 38 | 39 | 40 | 41 | com.google.code.maven-scm-provider-svnjava 42 | maven-scm-provider-svnjava 43 | 1.13 44 | 45 | 46 | 47 | 48 | 49 | org.apache.maven.plugins 50 | maven-changelog-plugin 51 | ${project.version} 52 | 53 | 54 | com.google.code.maven-scm-provider-svnjava 55 | maven-scm-provider-svnjava 56 | 1.13 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | org.apache.maven.plugins 67 | maven-changelog-plugin 68 | ${project.version} 69 | 70 | 71 | javasvn 72 | 73 | 74 | 75 | 76 | 77 | ... 78 | 79 | +-----+ 80 | 81 | Configuration with Maven 3 only and the new site plugin configuration. 82 | 83 | +-----+ 84 | 85 | ... 86 | 87 | 88 | org.apache.maven.plugins 89 | maven-changelog-plugin 90 | ${project.version} 91 | 92 | 93 | com.google.code.maven-scm-provider-svnjava 94 | maven-scm-provider-svnjava 95 | 1.13 96 | 97 | 98 | 99 | 100 | maven-site-plugin 101 | ${sitePluginVersion} 102 | 103 | 104 | 105 | org.apache.maven.plugins 106 | maven-changelog-plugin 107 | 108 | 109 | javasvn 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | ... 118 | 119 | +-----+ -------------------------------------------------------------------------------- /src/site/apt/examples/changing-heading-date-format.apt.vm: -------------------------------------------------------------------------------- 1 | ------ 2 | Changing the Heading Date Format 3 | ------ 4 | Dennis Lundberg 5 | ------ 6 | July 2007 7 | ------ 8 | 9 | ~~ Licensed to the Apache Software Foundation (ASF) under one 10 | ~~ or more contributor license agreements. See the NOTICE file 11 | ~~ distributed with this work for additional information 12 | ~~ regarding copyright ownership. The ASF licenses this file 13 | ~~ to you under the Apache License, Version 2.0 (the 14 | ~~ "License"); you may not use this file except in compliance 15 | ~~ with the License. You may obtain a copy of the License at 16 | ~~ 17 | ~~ http://www.apache.org/licenses/LICENSE-2.0 18 | ~~ 19 | ~~ Unless required by applicable law or agreed to in writing, 20 | ~~ software distributed under the License is distributed on an 21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 22 | ~~ KIND, either express or implied. See the License for the 23 | ~~ specific language governing permissions and limitations 24 | ~~ under the License. 25 | 26 | ~~ NOTE: For help with the syntax of this file, see: 27 | ~~ http://maven.apache.org/doxia/references/apt-format.html 28 | 29 | 30 | Changing the Heading Date Format 31 | 32 | If you are using one of the types <<>> or <<>>, the headings of 33 | the reports will have dates in them. Starting with version 2.1 of the plugin, 34 | it is possible to configure the format of these dates. 35 | 36 | This is done with the <<<\>>> configuration element. It 37 | takes a string of characters, the same that is used in the 38 | {{{http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html}SimpleDateFormat}} 39 | class, and uses them to format the dates in the headings to your liking. 40 | 41 | +-----+ 42 | 43 | ... 44 | 45 | 46 | 47 | org.apache.maven.plugins 48 | maven-changelog-plugin 49 | ${project.version} 50 | 51 | range 52 | 30 53 | dd MMM, yyyy 54 | 55 | 56 | 57 | 58 | ... 59 | 60 | +-----+ 61 | -------------------------------------------------------------------------------- /src/site/apt/examples/configuration-date-type.apt.vm: -------------------------------------------------------------------------------- 1 | ------ 2 | Using Date Type 3 | ------ 4 | July 2006 5 | ------ 6 | 7 | ~~ Licensed to the Apache Software Foundation (ASF) under one 8 | ~~ or more contributor license agreements. See the NOTICE file 9 | ~~ distributed with this work for additional information 10 | ~~ regarding copyright ownership. The ASF licenses this file 11 | ~~ to you under the Apache License, Version 2.0 (the 12 | ~~ "License"); you may not use this file except in compliance 13 | ~~ with the License. You may obtain a copy of the License at 14 | ~~ 15 | ~~ http://www.apache.org/licenses/LICENSE-2.0 16 | ~~ 17 | ~~ Unless required by applicable law or agreed to in writing, 18 | ~~ software distributed under the License is distributed on an 19 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 20 | ~~ KIND, either express or implied. See the License for the 21 | ~~ specific language governing permissions and limitations 22 | ~~ under the License. 23 | 24 | ~~ NOTE: For help with the syntax of this file, see: 25 | ~~ http://maven.apache.org/doxia/references/apt-format.html 26 | 27 | 28 | Using Date Type 29 | 30 | To generate the changelog reports showing what has changed between two dates, 31 | you should use the "date" <<>>. 32 | 33 | With the following configuration, the generated reports will cover SCM 34 | activities between Aug 1, 2005 to Sept 1, 2005. Please note that the date 35 | range is inclusive. 36 | 37 | <> The <<<\>>> configuration is used <> when 38 | parsing the dates that come from your SCM. It is <> used to format the 39 | dates in the report. 40 | 41 | +-----+ 42 | 43 | ... 44 | 45 | 46 | 47 | org.apache.maven.plugins 48 | maven-changelog-plugin 49 | ${project.version} 50 | 51 | date 52 | 53 | 2005-08-01 54 | 2005-09-01 55 | 56 | yyyy-MM-dd 57 | 58 | 59 | 60 | 61 | ... 62 | 63 | +-----+ 64 | -------------------------------------------------------------------------------- /src/site/apt/examples/configuration-range-type.apt.vm: -------------------------------------------------------------------------------- 1 | ------ 2 | Using Range Type 3 | ------ 4 | July 2006 5 | ------ 6 | 7 | ~~ Licensed to the Apache Software Foundation (ASF) under one 8 | ~~ or more contributor license agreements. See the NOTICE file 9 | ~~ distributed with this work for additional information 10 | ~~ regarding copyright ownership. The ASF licenses this file 11 | ~~ to you under the Apache License, Version 2.0 (the 12 | ~~ "License"); you may not use this file except in compliance 13 | ~~ with the License. You may obtain a copy of the License at 14 | ~~ 15 | ~~ http://www.apache.org/licenses/LICENSE-2.0 16 | ~~ 17 | ~~ Unless required by applicable law or agreed to in writing, 18 | ~~ software distributed under the License is distributed on an 19 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 20 | ~~ KIND, either express or implied. See the License for the 21 | ~~ specific language governing permissions and limitations 22 | ~~ under the License. 23 | 24 | ~~ NOTE: For help with the syntax of this file, see: 25 | ~~ http://maven.apache.org/doxia/references/apt-format.html 26 | 27 | 28 | Using Range Type 29 | 30 | To generate the changelog reports showing what has changed in the last NN 31 | days, you should use the "range" <<>>. 32 | 33 | The following configuration will generate reports that covers SCM activities 34 | from the last 30 days. Please note that the range is inclusive. 35 | 36 | +-----+ 37 | 38 | ... 39 | 40 | 41 | 42 | org.apache.maven.plugins 43 | maven-changelog-plugin 44 | ${project.version} 45 | 46 | range 47 | 30 48 | 49 | 50 | 51 | 52 | ... 53 | 54 | +-----+ 55 | 56 | -------------------------------------------------------------------------------- /src/site/apt/examples/configuration-tag-type.apt.vm: -------------------------------------------------------------------------------- 1 | ------ 2 | Using Tag Type 3 | ------ 4 | July 2006 5 | ------ 6 | 7 | ~~ Licensed to the Apache Software Foundation (ASF) under one 8 | ~~ or more contributor license agreements. See the NOTICE file 9 | ~~ distributed with this work for additional information 10 | ~~ regarding copyright ownership. The ASF licenses this file 11 | ~~ to you under the Apache License, Version 2.0 (the 12 | ~~ "License"); you may not use this file except in compliance 13 | ~~ with the License. You may obtain a copy of the License at 14 | ~~ 15 | ~~ http://www.apache.org/licenses/LICENSE-2.0 16 | ~~ 17 | ~~ Unless required by applicable law or agreed to in writing, 18 | ~~ software distributed under the License is distributed on an 19 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 20 | ~~ KIND, either express or implied. See the License for the 21 | ~~ specific language governing permissions and limitations 22 | ~~ under the License. 23 | 24 | ~~ NOTE: For help with the syntax of this file, see: 25 | ~~ http://maven.apache.org/doxia/references/apt-format.html 26 | 27 | 28 | Using Tag Type 29 | 30 | To generate the changelog reports showing what has changed between two tags, 31 | you should use the "tag" <<>>. 32 | 33 | With the following configuration, reports will be generated that covers SCM 34 | activities between the <<>> tag and the <<>> tag. 35 | 36 | <> The "tag" type is not supported if you are using Subversion. 37 | 38 | +-----+ 39 | 40 | ... 41 | 42 | 43 | 44 | org.apache.maven.plugins 45 | maven-changelog-plugin 46 | ${project.version} 47 | 48 | tag 49 | 50 | alpha-2 51 | alpha-3 52 | 53 | 54 | 55 | 56 | 57 | ... 58 | 59 | +-----+ 60 | -------------------------------------------------------------------------------- /src/site/apt/examples/modifying-scm-links.apt.vm: -------------------------------------------------------------------------------- 1 | ------ 2 | Modifying SCM Links 3 | ------ 4 | Dennis Lundberg 5 | ------ 6 | November 2006 7 | ------ 8 | 9 | ~~ Licensed to the Apache Software Foundation (ASF) under one 10 | ~~ or more contributor license agreements. See the NOTICE file 11 | ~~ distributed with this work for additional information 12 | ~~ regarding copyright ownership. The ASF licenses this file 13 | ~~ to you under the Apache License, Version 2.0 (the 14 | ~~ "License"); you may not use this file except in compliance 15 | ~~ with the License. You may obtain a copy of the License at 16 | ~~ 17 | ~~ http://www.apache.org/licenses/LICENSE-2.0 18 | ~~ 19 | ~~ Unless required by applicable law or agreed to in writing, 20 | ~~ software distributed under the License is distributed on an 21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 22 | ~~ KIND, either express or implied. See the License for the 23 | ~~ specific language governing permissions and limitations 24 | ~~ under the License. 25 | 26 | ~~ NOTE: For help with the syntax of this file, see: 27 | ~~ http://maven.apache.org/doxia/references/apt-format.html 28 | 29 | 30 | Modifying SCM Links 31 | 32 | The plugin normally works out of the box with the most popular web frontends 33 | for SCM systems. If for some reason the links to the web frontend for your 34 | SCM system are not correct, you can tweak the links by configuring the plugin 35 | properly. This is done with the <<<\>>> element. 36 | 37 | To your aid you have a special token <<<%FILE%>>> that corresponds to the 38 | relative path to the file in your repository. The path starts at the 39 | project's root in your SCM system. 40 | 41 | The following configuration will use alternate URLs to your SCM system: 42 | 43 | +-----+ 44 | 45 | ... 46 | 47 | 48 | 49 | org.apache.maven.plugins 50 | maven-changelog-plugin 51 | ${project.version} 52 | 53 | http://checkstyle.cvs.sourceforge.net/checkstyle%FILE%?view=markup 54 | 55 | 56 | 57 | 58 | ... 59 | 60 | +-----+ 61 | -------------------------------------------------------------------------------- /src/site/apt/examples/selecting-reports.apt.vm: -------------------------------------------------------------------------------- 1 | ------ 2 | Selecting Reports 3 | ------ 4 | Dennis Lundberg 5 | ------ 6 | October 2006 7 | ------ 8 | 9 | ~~ Licensed to the Apache Software Foundation (ASF) under one 10 | ~~ or more contributor license agreements. See the NOTICE file 11 | ~~ distributed with this work for additional information 12 | ~~ regarding copyright ownership. The ASF licenses this file 13 | ~~ to you under the Apache License, Version 2.0 (the 14 | ~~ "License"); you may not use this file except in compliance 15 | ~~ with the License. You may obtain a copy of the License at 16 | ~~ 17 | ~~ http://www.apache.org/licenses/LICENSE-2.0 18 | ~~ 19 | ~~ Unless required by applicable law or agreed to in writing, 20 | ~~ software distributed under the License is distributed on an 21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 22 | ~~ KIND, either express or implied. See the License for the 23 | ~~ specific language governing permissions and limitations 24 | ~~ under the License. 25 | 26 | ~~ NOTE: For help with the syntax of this file, see: 27 | ~~ http://maven.apache.org/doxia/references/apt-format.html 28 | 29 | 30 | Selecting Reports 31 | 32 | The plugin normally generates 3 reports: <<>>, <<>> 33 | and <<>>. By default all three reports are generated. It is 34 | possible to configure the plugin so that only a few of these reports are 35 | generated. This is done using <<<\>>>. 36 | 37 | The following configuration will generate only the <<>> and 38 | <<>> reports. 39 | 40 | <> The <<>> element is not part of the <<>> 41 | element. Instead, the <<>> is found inside the 42 | <<>> element. 43 | 44 | +-----+ 45 | 46 | ... 47 | 48 | 49 | 50 | org.apache.maven.plugins 51 | maven-changelog-plugin 52 | ${project.version} 53 | 54 | 55 | dual-report 56 | 57 | range 58 | 30 59 | 60 | 61 | changelog 62 | file-activity 63 | 64 | 65 | 66 | 67 | 68 | 69 | ... 70 | 71 | +-----+ 72 | -------------------------------------------------------------------------------- /src/site/apt/examples/using-perforce.apt.vm: -------------------------------------------------------------------------------- 1 | ------ 2 | Using Perforce 3 | ------ 4 | Dennis Lundberg 5 | ------ 6 | 2007-07-19 7 | ------ 8 | 9 | ~~ Licensed to the Apache Software Foundation (ASF) under one 10 | ~~ or more contributor license agreements. See the NOTICE file 11 | ~~ distributed with this work for additional information 12 | ~~ regarding copyright ownership. The ASF licenses this file 13 | ~~ to you under the Apache License, Version 2.0 (the 14 | ~~ "License"); you may not use this file except in compliance 15 | ~~ with the License. You may obtain a copy of the License at 16 | ~~ 17 | ~~ http://www.apache.org/licenses/LICENSE-2.0 18 | ~~ 19 | ~~ Unless required by applicable law or agreed to in writing, 20 | ~~ software distributed under the License is distributed on an 21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 22 | ~~ KIND, either express or implied. See the License for the 23 | ~~ specific language governing permissions and limitations 24 | ~~ under the License. 25 | 26 | 27 | Using Perforce 28 | 29 | The maven-changelog-plugin uses {{{http://maven.apache.org/scm/}Maven SCM}} 30 | as an underlying layer, when accessing your SCM system. When Maven SCM is 31 | working with Perforce it needs a clientspec. This is provided by setting 32 | system properties that are then read by Maven SCM. 33 | 34 | Configuring this is done in the same way as for the maven-scm-plugin. So if 35 | you have a working configuration for maven-scm-plugin, you can just copy 36 | those lines over to your maven-changelog-plugin configuration. The following 37 | configuration shows an example of what this can look like. 38 | 39 | +-----+ 40 | 41 | ... 42 | 43 | 44 | 45 | org.apache.maven.plugins 46 | maven-changelog-plugin 47 | ${project.version} 48 | 49 | 50 | 51 | maven.scm.perforce.clientspec.name 52 | your.perforce.clientspec.name 53 | 54 | 55 | 56 | 57 | 58 | 59 | ... 60 | 61 | +-----+ 62 | -------------------------------------------------------------------------------- /src/site/apt/index.apt.vm: -------------------------------------------------------------------------------- 1 | ------ 2 | Introduction 3 | ------ 4 | Maria Odea Ching 5 | ------ 6 | 2013-07-22 7 | ------ 8 | 9 | ~~ Licensed to the Apache Software Foundation (ASF) under one 10 | ~~ or more contributor license agreements. See the NOTICE file 11 | ~~ distributed with this work for additional information 12 | ~~ regarding copyright ownership. The ASF licenses this file 13 | ~~ to you under the Apache License, Version 2.0 (the 14 | ~~ "License"); you may not use this file except in compliance 15 | ~~ with the License. You may obtain a copy of the License at 16 | ~~ 17 | ~~ http://www.apache.org/licenses/LICENSE-2.0 18 | ~~ 19 | ~~ Unless required by applicable law or agreed to in writing, 20 | ~~ software distributed under the License is distributed on an 21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 22 | ~~ KIND, either express or implied. See the License for the 23 | ~~ specific language governing permissions and limitations 24 | ~~ under the License. 25 | 26 | ~~ NOTE: For help with the syntax of this file, see: 27 | ~~ http://maven.apache.org/doxia/references/apt-format.html 28 | 29 | 30 | ${project.name} 31 | 32 | The Maven Changelog Plugin generates reports regarding the recent changes in your Software Configuration Management or SCM. 33 | These reports include the changelog report, developer activity report and the file activity report. 34 | 35 | * Goals Overview 36 | 37 | The Changelog Plugin has three goals: 38 | 39 | * {{{./changelog-mojo.html}changelog:changelog}} generates the changelog report. The changelog report shows all the SCM activities 40 | including the dates, files, and author of the revisions that occurred during the specified change set. 41 | 42 | * {{{./dev-activity-mojo.html}changelog:dev-activity}} generates the developer activity report. The dev-activity report shows a 43 | summary of the total commits, and the number of files changed of each developer listed in the project descriptor. 44 | 45 | * {{{./file-activity-mojo.html}changelog:file-activity}} generates the file activity report. The file-activity report lists all 46 | files that were revised during the specified change set. It is arranged in a way where the file with the most number of revisions is listed first. 47 | 48 | * Usage 49 | 50 | General instructions on how to use the Changelog Plugin can be found on the {{{./usage.html}usage page}}. Some more 51 | specific use cases are described in the examples given below. Last but not least, users occasionally contribute 52 | additional examples, tips or errata to the 53 | {{{http://docs.codehaus.org/display/MAVENUSER/Changelog+Plugin}plugin's wiki page}}. 54 | 55 | In case you still have questions regarding the plugin's usage, please have a look at the {{{./faq.html}FAQ}} and feel 56 | free to contact the {{{./mailing-lists.html}user mailing list}}. The posts to the mailing list are archived and could 57 | already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching 58 | the {{{./mailing-lists.html}mail archive}}. 59 | 60 | If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our 61 | {{{./issue-management.html}issue tracker}}. When creating a new issue, please provide a comprehensive description of your 62 | concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, 63 | entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. 64 | Of course, patches are welcome, too. Contributors can check out the project from our 65 | {{{./scm.html}source repository}} and will find supplementary information in the 66 | {{{http://maven.apache.org/guides/development/guide-helping.html}guide to helping with Maven}}. 67 | 68 | * Examples 69 | 70 | The following examples show how to use the Changelog Plugin in more advanced use-cases: 71 | 72 | * {{{./examples/selecting-reports.html}Selecting Reports}} 73 | 74 | * {{{./examples/configuration-date-type.html}Using Date Type}} 75 | 76 | * {{{./examples/configuration-range-type.html}Using Range Type}} 77 | 78 | * {{{./examples/configuration-tag-type.html}Using Tag Type}} 79 | 80 | * {{{./examples/using-perforce.html}Using Perforce}} 81 | 82 | [] 83 | -------------------------------------------------------------------------------- /src/site/apt/usage.apt.vm: -------------------------------------------------------------------------------- 1 | ------ 2 | Usage 3 | ------ 4 | 31 July 2006 5 | ------ 6 | 7 | ~~ Licensed to the Apache Software Foundation (ASF) under one 8 | ~~ or more contributor license agreements. See the NOTICE file 9 | ~~ distributed with this work for additional information 10 | ~~ regarding copyright ownership. The ASF licenses this file 11 | ~~ to you under the Apache License, Version 2.0 (the 12 | ~~ "License"); you may not use this file except in compliance 13 | ~~ with the License. You may obtain a copy of the License at 14 | ~~ 15 | ~~ http://www.apache.org/licenses/LICENSE-2.0 16 | ~~ 17 | ~~ Unless required by applicable law or agreed to in writing, 18 | ~~ software distributed under the License is distributed on an 19 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 20 | ~~ KIND, either express or implied. See the License for the 21 | ~~ specific language governing permissions and limitations 22 | ~~ under the License. 23 | 24 | ~~ NOTE: For help with the syntax of this file, see: 25 | ~~ http://maven.apache.org/doxia/references/apt-format.html 26 | 27 | Usage 28 | 29 | The reports may use either <<>>, <<>>, or <<>> as the type 30 | for generating the reports. Only one type can be set. The change sets can be 31 | configured by setting the correct parameter for the chosen type. If <<>> 32 | "date" is chosen, then the parameter <<>> should contain the start and 33 | stop dates for the date range. Similar configurations should be made for the 34 | "range" and "tag" types. 35 | 36 | To generate the changelog reports, just add the following in your project's 37 | <<>>: 38 | 39 | +-----+ 40 | 41 | ... 42 | 43 | 44 | 45 | org.apache.maven.plugins 46 | maven-changelog-plugin 47 | ${project.version} 48 | 49 | 50 | 51 | ... 52 | 53 | +-----+ 54 | 55 | Aside from the required plugin configuration parameters needed to generate the 56 | reports, all reports will refer to the <<>> elements inside the project 57 | descriptor for details regarding the connection to the project's SCM. 58 | Here is an example of the scm element inside the <<>>: 59 | 60 | ------------------- 61 | 62 | ... 63 | 64 | scm:svn:http://server/path/to/project/trunk 65 | scm:svn:https://server/path/to/project/trunk 66 | scm:svn:http://server/path/to/view/trunk 67 | 68 | ... 69 | 70 | ------------------- 71 | 72 | Please refer to the Maven project descriptor for the description of the 73 | <<>> elements. It can be found 74 | {{{http://maven.apache.org/ref/current/maven-model/maven.html#class_scm}here}}. 75 | 76 | When you execute <<>>, you will see that the <<>>, 77 | <<>> and <<>> reports are included in the 78 | generated site. 79 | 80 | *Sample Changelog report 81 | 82 | [images/sample-changelog-report.PNG] Sample Changelog Report 83 | 84 | For a live report {{{./changelog.html}look here}}. 85 | 86 | 87 | *Sample Developer Activity report 88 | 89 | [images/sample-dev-activity-report.PNG] Sample Developer Activity Report 90 | 91 | For a live report {{{./dev-activity.html}look here}}. 92 | 93 | 94 | *Sample File Activity report 95 | 96 | [images/sample-file-activity-report.PNG] Sample File Activity Report 97 | 98 | For a live report {{{./file-activity.html}look here}}. 99 | -------------------------------------------------------------------------------- /src/site/resources/download.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # Just call the standard mirrors.cgi script. It will use download.html 21 | # as the input template. 22 | exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $* -------------------------------------------------------------------------------- /src/site/resources/images/sample-changelog-report.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/maven-changelog-plugin/a82703f54c26ede18f032cd82dab82c18a924965/src/site/resources/images/sample-changelog-report.PNG -------------------------------------------------------------------------------- /src/site/resources/images/sample-dev-activity-report.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/maven-changelog-plugin/a82703f54c26ede18f032cd82dab82c18a924965/src/site/resources/images/sample-dev-activity-report.PNG -------------------------------------------------------------------------------- /src/site/resources/images/sample-file-activity-report.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/maven-changelog-plugin/a82703f54c26ede18f032cd82dab82c18a924965/src/site/resources/images/sample-file-activity-report.PNG -------------------------------------------------------------------------------- /src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/site/xdoc/download.xml.vm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | Download ${project.name} Source 25 | 26 | 27 |
28 | 29 |

${project.name} ${project.version} is distributed in source format. Use a source archive if you intend to build 30 | ${project.name} yourself. Otherwise, simply use the ready-made binary artifacts from central repository.

31 | 32 |

You will be prompted for a mirror - if the file is not found on yours, please be patient, as it may take 24 33 | hours to reach all mirrors.

34 | 35 |

In order to guard against corrupted downloads/installations, it is highly recommended to 36 | verify the signature 37 | of the release bundles against the public KEYS used by the Apache Maven 38 | developers.

39 | 40 |

${project.name} is distributed under the Apache License, version 2.0.

41 | 42 |

We strongly encourage our users to configure a Maven repository mirror closer to their location, please read How to Use Mirrors for Repositories.

43 | 44 | 45 | 46 | 47 |

48 | [if-any logo] 49 | 50 | logo 52 | 53 | [end] 54 | The currently selected mirror is 55 | [preferred]. 56 | If you encounter a problem with this mirror, 57 | please select another mirror. 58 | If all mirrors are failing, there are 59 | backup 60 | mirrors 61 | (at the end of the mirrors list) that should be available. 62 |

63 | 64 |
65 | Other mirrors: 66 | 83 | 84 |
85 | 86 |

87 | You may also consult the 88 | complete list of 89 | mirrors. 90 |

91 | 92 | 93 | 94 | 95 | 96 |

This is the current stable version of ${project.name}.

97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 |
LinkChecksumSignature
${project.name} ${project.version} (Source zip)maven/plugins/${project.artifactId}-${project.version}-source-release.zipmaven/plugins/${project.artifactId}-${project.version}-source-release.zip.sha512maven/plugins/${project.artifactId}-${project.version}-source-release.zip.asc
116 |
117 | 118 | 119 | 120 |

Older non-recommended releases can be found on our archive site.

121 | 122 |
123 |
124 | 125 |
126 | 127 | -------------------------------------------------------------------------------- /src/test/changelog-xml/min-changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 1977-08-06 25 | 26 | Edwin Punzalan 27 | 28 | /path/to/file.extension 29 | 1 30 | 31 | First commit msg 32 | 33 | 34 | 35 | 2005-02-24 36 | Edwin Punzalan 37 | 38 | /path/to/file.extension 39 | 2 40 | 41 | 42 | /path/to/file2.extension 43 | 2 44 | 45 | Second commit msg 46 | 47 | 48 | 49 | 50 | 51 | 2005-02-25 52 | Keogh Edrich Punzalan 53 | 54 | /path/to/file.extension (from /path/to/other/file.extension:45) 55 | 3 56 | 57 | Third commit msg 58 | 59 | 60 | 2100-02-25 61 | 62 | Keogh Edrich Punzalan 63 | 64 | /path/to/file.extension 65 | 4 66 | 67 | 68 | /path/to/file2.extension 69 | 4 70 | 71 | Last commit msg 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/AbstractChangeLogReportTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import java.io.File; 22 | import java.io.IOException; 23 | 24 | import org.apache.maven.doxia.site.decoration.DecorationModel; 25 | import org.apache.maven.doxia.siterenderer.RendererException; 26 | import org.apache.maven.doxia.siterenderer.SiteRenderingContext; 27 | import org.apache.maven.doxia.siterenderer.sink.SiteRendererSink; 28 | import org.apache.maven.plugin.testing.AbstractMojoTestCase; 29 | import org.codehaus.plexus.util.xml.XmlStreamWriter; 30 | 31 | /** 32 | * @author Vincent Siveton 33 | * @since 2.2 34 | */ 35 | public abstract class AbstractChangeLogReportTest extends AbstractMojoTestCase { 36 | /** 37 | * Renderer the sink from the report mojo. 38 | * 39 | * @param mojo not null 40 | * @param outputHtml not null 41 | * @throws RendererException if any 42 | * @throws IOException if any 43 | */ 44 | protected void renderer(ChangeLogReport mojo, File outputHtml) throws RendererException, IOException { 45 | SiteRenderingContext context = new SiteRenderingContext(); 46 | context.setDecoration(new DecorationModel()); 47 | context.setTemplateName("org/apache/maven/doxia/siterenderer/resources/default-site.vm"); 48 | 49 | outputHtml.getParentFile().mkdirs(); 50 | try (XmlStreamWriter writer = new XmlStreamWriter(outputHtml)) { 51 | mojo.getSiteRenderer().generateDocument(writer, (SiteRendererSink) mojo.getSink(), context); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/ChangeLogReportTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import java.io.File; 22 | import java.nio.file.Files; 23 | 24 | import org.apache.maven.plugin.MojoExecutionException; 25 | import org.apache.maven.plugins.changelog.stubs.FailedScmManagerStub; 26 | import org.apache.maven.plugins.changelog.stubs.ScmManagerStub; 27 | import org.apache.maven.plugins.changelog.stubs.ScmManagerWithHostStub; 28 | import org.apache.maven.scm.manager.ScmManager; 29 | import org.codehaus.plexus.util.FileUtils; 30 | 31 | /** 32 | * @author Edwin Punzalan 33 | */ 34 | public class ChangeLogReportTest extends AbstractChangeLogReportTest { 35 | private ScmManager scmManager = new ScmManagerStub(); 36 | 37 | public void testNoSource() throws Exception { 38 | File pluginXmlFile = new File(getBasedir(), "src/test/plugin-configs/changelog/no-source-plugin-config.xml"); 39 | 40 | ChangeLogReport mojo = (ChangeLogReport) lookupMojo("changelog", pluginXmlFile); 41 | 42 | assertNotNull("Mojo found.", mojo); 43 | 44 | this.setVariableValueToObject(mojo, "manager", scmManager); 45 | 46 | mojo.execute(); 47 | 48 | File outputDir = (File) getVariableValueFromObject(mojo, "outputDirectory"); 49 | 50 | File outputHtml = new File(outputDir, "changelog.html"); 51 | 52 | renderer(mojo, outputHtml); 53 | 54 | assertTrue(outputHtml.getAbsolutePath() + " not generated!", outputHtml.exists()); 55 | 56 | assertTrue(outputHtml.getAbsolutePath() + " is empty!", outputHtml.length() > 0); 57 | } 58 | 59 | public void testMinConfig() throws Exception { 60 | executeMojo("min-plugin-config.xml"); 61 | } 62 | 63 | public void testFailedChangelog() throws Exception { 64 | scmManager = new FailedScmManagerStub(); 65 | 66 | try { 67 | executeMojo("min-plugin-config.xml"); 68 | } catch (MojoExecutionException e) { 69 | assertEquals( 70 | "Test thrown exception", 71 | "Command failed.", 72 | e.getCause().getCause().getMessage()); 73 | } 74 | } 75 | 76 | public void testUsageOfCachedXml() throws Exception { 77 | File cacheFile = new File(getBasedir(), "src/test/changelog-xml/min-changelog.xml"); 78 | cacheFile.setLastModified(System.currentTimeMillis()); 79 | 80 | executeMojo("cached-plugin-config.xml"); 81 | } 82 | 83 | public void testTypeException() throws Exception { 84 | try { 85 | executeMojo("inv-type-plugin-config.xml"); 86 | 87 | fail("Test exception on invalid type"); 88 | } catch (MojoExecutionException e) { 89 | assertTrue( 90 | "Test thrown exception", 91 | e.getCause().getMessage().startsWith("The type parameter has an invalid value: invalid.")); 92 | } 93 | } 94 | 95 | public void testTagType() throws Exception { 96 | executeMojo("tag-plugin-config.xml"); 97 | } 98 | 99 | public void testTagsType() throws Exception { 100 | executeMojo("tags-plugin-config.xml"); 101 | } 102 | 103 | public void testDateException() throws Exception { 104 | try { 105 | executeMojo("inv-date-plugin-config.xml"); 106 | } catch (MojoExecutionException e) { 107 | assertTrue( 108 | "Test thrown exception", 109 | e.getCause().getCause().getMessage().startsWith("Please use this date pattern: ")); 110 | } 111 | } 112 | 113 | public void testDateType() throws Exception { 114 | executeMojo("date-plugin-config.xml"); 115 | } 116 | 117 | public void testDatesType() throws Exception { 118 | executeMojo("dates-plugin-config.xml"); 119 | } 120 | 121 | public void testScmRepositoryWithHost() throws Exception { 122 | scmManager = new ScmManagerWithHostStub(); 123 | 124 | executeMojo("hosted-plugin-config.xml"); 125 | } 126 | 127 | public void testScmRepositoryWithHostFromSettings() throws Exception { 128 | scmManager = new ScmManagerWithHostStub(); 129 | 130 | executeMojo("hosted-with-settings-plugin-config.xml"); 131 | } 132 | 133 | public void testNoScmConnection() throws Exception { 134 | try { 135 | executeMojo("no-scm-plugin-config.xml"); 136 | } catch (MojoExecutionException e) { 137 | assertEquals( 138 | "Test thrown exception", 139 | "SCM Connection is not set.", 140 | e.getCause().getCause().getCause().getMessage()); 141 | } 142 | } 143 | 144 | public void testDontDisplayFileAndRevInfo() throws Exception { 145 | File cacheFile = new File(getBasedir(), "src/test/changelog-xml/min-changelog.xml"); 146 | cacheFile.setLastModified(System.currentTimeMillis()); 147 | 148 | String html = executeMojo("dont-display-file-and-rev-info-plugin-config.xml", true); 149 | 150 | assertFalse(html.contains("file.extension")); 151 | assertFalse(html.contains("file2.extension")); 152 | assertFalse(html.contains(" v 1")); 153 | assertFalse(html.contains(" v 2")); 154 | assertFalse(html.contains(" v 3")); 155 | assertFalse(html.contains(" v 4")); 156 | } 157 | 158 | public void testDisplayFileAndRevInfoExplicitly() throws Exception { 159 | File cacheFile = new File(getBasedir(), "src/test/changelog-xml/min-changelog.xml"); 160 | cacheFile.setLastModified(System.currentTimeMillis()); 161 | 162 | String html = executeMojo("display-file-and-rev-info-explicitly-plugin-config.xml", true); 163 | 164 | assertTrue(html.contains("file.extension")); 165 | assertTrue(html.contains("file2.extension")); 166 | assertTrue(html.contains(" v 1")); 167 | assertTrue(html.contains(" v 2")); 168 | assertTrue(html.contains(" v 3")); 169 | assertTrue(html.contains(" v 4")); 170 | } 171 | 172 | private void executeMojo(String pluginXml) throws Exception { 173 | executeMojo(pluginXml, false); 174 | } 175 | 176 | private String executeMojo(String pluginXml, boolean withOutput) throws Exception { 177 | File pluginXmlFile = new File(getBasedir(), "src/test/plugin-configs/changelog/" + pluginXml); 178 | 179 | ChangeLogReport mojo = (ChangeLogReport) lookupMojo("changelog", pluginXmlFile); 180 | 181 | assertNotNull("Mojo found.", mojo); 182 | 183 | this.setVariableValueToObject(mojo, "manager", scmManager); 184 | 185 | mojo.execute(); 186 | 187 | File outputXML = (File) getVariableValueFromObject(mojo, "outputXML"); 188 | 189 | String encoding = (String) getVariableValueFromObject(mojo, "outputEncoding"); 190 | 191 | assertTrue("Test if changelog.xml is created", outputXML.exists()); 192 | 193 | String changelogXml = FileUtils.fileRead(outputXML); 194 | 195 | assertTrue( 196 | "Test for xml header", 197 | changelogXml.startsWith("")); 198 | 199 | assertTrue("Test for xml footer", changelogXml.endsWith("
")); 200 | 201 | File outputDir = (File) getVariableValueFromObject(mojo, "outputDirectory"); 202 | 203 | File outputHtml = new File(outputDir, "changelog.html"); 204 | 205 | renderer(mojo, outputHtml); 206 | 207 | assertTrue(outputHtml.getAbsolutePath() + " not generated!", outputHtml.exists()); 208 | 209 | assertTrue(outputHtml.getAbsolutePath() + " is empty!", outputHtml.length() > 0); 210 | 211 | if (!withOutput) { 212 | return null; 213 | } 214 | 215 | return new String(Files.readAllBytes(outputHtml.toPath())); 216 | } 217 | } 218 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/ChangeLogTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import java.io.File; 22 | import java.io.InputStream; 23 | import java.nio.file.Files; 24 | import java.text.SimpleDateFormat; 25 | import java.util.List; 26 | 27 | import org.apache.maven.scm.ChangeFile; 28 | import org.apache.maven.scm.ChangeSet; 29 | import org.apache.maven.scm.command.changelog.ChangeLogSet; 30 | import org.junit.Test; 31 | 32 | import static org.junit.Assert.assertEquals; 33 | import static org.junit.Assert.assertNotNull; 34 | 35 | /** 36 | * @author Edwin Punzalan 37 | */ 38 | public class ChangeLogTest { 39 | @Test 40 | public void testReadFile() throws Exception { 41 | List changedLogs = readChangeLogXml("min-changelog.xml"); 42 | 43 | assertNotNull("Test changedSets were parsed", changedLogs); 44 | 45 | assertEquals("Test number of changelog entries", 2, changedLogs.size()); 46 | 47 | ChangeLogSet changelogSets = changedLogs.get(0); 48 | 49 | assertEquals( 50 | "Test number of revisions on changelog 1", 51 | 2, 52 | changelogSets.getChangeSets().size()); 53 | 54 | ChangeSet changeSet = changelogSets.getChangeSets().get(0); 55 | 56 | assertEquals( 57 | "Test changelog 1 set 1 date/time", 58 | "1977-08-06 05:30:00", 59 | new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(changeSet.getDate())); 60 | 61 | assertEquals("Test changelog 1 set 1 author", "Edwin Punzalan", changeSet.getAuthor()); 62 | 63 | assertEquals("Test changelog 1 set 1 msg", "First commit msg", changeSet.getComment()); 64 | 65 | assertEquals("Test changelog 1 set 1 files", 1, changeSet.getFiles().size()); 66 | 67 | ChangeFile changeFile = changeSet.getFiles().get(0); 68 | 69 | assertEquals("Test changelog 1 set 1 file 1 filename", "/path/to/file.extension", changeFile.getName()); 70 | 71 | assertEquals("Test changelog 1 set 1 file 1 revision", "1", changeFile.getRevision()); 72 | 73 | changeSet = changelogSets.getChangeSets().get(1); 74 | 75 | assertEquals( 76 | "Test changelog 1 set 2 date/time", 77 | "2005-02-24 21:30:00", 78 | new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(changeSet.getDate())); 79 | 80 | assertEquals("Test changelog 1 set 2 author", "Edwin Punzalan", changeSet.getAuthor()); 81 | 82 | assertEquals("Test changelog 1 set 2 msg", "Second commit msg", changeSet.getComment()); 83 | 84 | assertEquals("Test changelog 1 set 2 files", 2, changeSet.getFiles().size()); 85 | 86 | changeFile = changeSet.getFiles().get(0); 87 | 88 | assertEquals("Test changelog 1 set 2 file 1 filename", "/path/to/file.extension", changeFile.getName()); 89 | 90 | assertEquals("Test changelog 1 set 2 file 1 revision", "2", changeFile.getRevision()); 91 | 92 | changeFile = changeSet.getFiles().get(1); 93 | 94 | assertEquals("Test changelog 1 set 2 file 2 filename", "/path/to/file2.extension", changeFile.getName()); 95 | 96 | assertEquals("Test changelog 1 set 2 file 2 revision", "2", changeFile.getRevision()); 97 | 98 | changelogSets = changedLogs.get(1); 99 | 100 | assertEquals( 101 | "Test number of revisions on changelog 2", 102 | 2, 103 | changelogSets.getChangeSets().size()); 104 | 105 | changeSet = changelogSets.getChangeSets().get(0); 106 | 107 | assertEquals( 108 | "Test changelog 2 set 1 date/time", 109 | "2005-02-25 22:45:00", 110 | new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(changeSet.getDate())); 111 | 112 | assertEquals("Test changelog 2 set 1 author", "Keogh Edrich Punzalan", changeSet.getAuthor()); 113 | 114 | assertEquals("Test changelog 2 set 1 msg", "Third commit msg", changeSet.getComment()); 115 | 116 | assertEquals("Test changelog 2 set 1 files", 1, changeSet.getFiles().size()); 117 | 118 | changeFile = changeSet.getFiles().get(0); 119 | 120 | assertEquals("Test changelog 2 set 1 file 1 filename", "/path/to/file.extension", changeFile.getName()); 121 | 122 | assertEquals("Test changelog 2 set 1 file 1 revision", "3", changeFile.getRevision()); 123 | 124 | changeSet = changelogSets.getChangeSets().get(1); 125 | 126 | assertEquals( 127 | "Test changelog 2 set 2 date/time", 128 | "2100-02-25 05:30:00", 129 | new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(changeSet.getDate())); 130 | 131 | assertEquals("Test changelog 2 set 2 author", "Keogh Edrich Punzalan", changeSet.getAuthor()); 132 | 133 | assertEquals("Test changelog 2 set 2 msg", "Last commit msg", changeSet.getComment()); 134 | 135 | assertEquals("Test changelog 2 set 2 files", 2, changeSet.getFiles().size()); 136 | 137 | changeFile = changeSet.getFiles().get(0); 138 | 139 | assertEquals("Test changelog 2 set 2 file 1 filename", "/path/to/file.extension", changeFile.getName()); 140 | 141 | assertEquals("Test changelog 2 set 2 file 1 revision", "4", changeFile.getRevision()); 142 | 143 | changeFile = changeSet.getFiles().get(1); 144 | 145 | assertEquals("Test changelog 2 set 2 file 2 filename", "/path/to/file2.extension", changeFile.getName()); 146 | 147 | assertEquals("Test changelog 2 set 2 file 2 revision", "4", changeFile.getRevision()); 148 | } 149 | 150 | private List readChangeLogXml(String filename) throws Exception { 151 | File inputFile = new File(getBasedir(), "src/test/changelog-xml/" + filename); 152 | InputStream in = Files.newInputStream(inputFile.toPath()); 153 | 154 | return ChangeLog.loadChangedSets(in); 155 | } 156 | 157 | private String getBasedir() { 158 | return System.getProperty("basedir"); 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/DeveloperActivityReportTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import java.io.File; 22 | 23 | import org.apache.maven.plugins.changelog.stubs.ScmManagerStub; 24 | import org.apache.maven.scm.manager.ScmManager; 25 | import org.codehaus.plexus.util.FileUtils; 26 | 27 | /** 28 | * @author Edwin Punzalan 29 | */ 30 | public class DeveloperActivityReportTest extends AbstractChangeLogReportTest { 31 | private ScmManager scmManager = new ScmManagerStub(); 32 | 33 | public void testNoSource() throws Exception { 34 | File pluginXmlFile = new File(getBasedir(), "src/test/plugin-configs/dev-activity/no-source-plugin-config.xml"); 35 | 36 | DeveloperActivityReport mojo = (DeveloperActivityReport) lookupMojo("dev-activity", pluginXmlFile); 37 | 38 | assertNotNull("Mojo found.", mojo); 39 | 40 | this.setVariableValueToObject(mojo, "manager", scmManager); 41 | 42 | mojo.execute(); 43 | 44 | File outputDir = (File) getVariableValueFromObject(mojo, "outputDirectory"); 45 | 46 | File outputHtml = new File(outputDir, "dev-activity.html"); 47 | 48 | renderer(mojo, outputHtml); 49 | 50 | assertTrue(outputHtml.getAbsolutePath() + " not generated!", outputHtml.exists()); 51 | 52 | assertTrue(outputHtml.getAbsolutePath() + " is empty!", outputHtml.length() > 0); 53 | } 54 | 55 | public void testMinConfig() throws Exception { 56 | File outputXML = new File(getBasedir(), "src/test/changelog-xml/min-changelog.xml"); 57 | 58 | // force reuse of existing changelog cache 59 | outputXML.setLastModified(System.currentTimeMillis()); 60 | 61 | executeMojo("min-plugin-config.xml"); 62 | } 63 | 64 | private void executeMojo(String pluginXml) throws Exception { 65 | File pluginXmlFile = new File(getBasedir(), "src/test/plugin-configs/dev-activity/" + pluginXml); 66 | 67 | DeveloperActivityReport mojo = (DeveloperActivityReport) lookupMojo("dev-activity", pluginXmlFile); 68 | 69 | assertNotNull("Mojo found.", mojo); 70 | 71 | this.setVariableValueToObject(mojo, "manager", scmManager); 72 | 73 | mojo.execute(); 74 | 75 | File outputXML = (File) getVariableValueFromObject(mojo, "outputXML"); 76 | 77 | String encoding = (String) getVariableValueFromObject(mojo, "outputEncoding"); 78 | 79 | assertTrue("Test if changelog.xml is created", outputXML.exists()); 80 | 81 | String changelogXml = FileUtils.fileRead(outputXML); 82 | 83 | assertTrue( 84 | "Test for xml header", 85 | changelogXml.startsWith("")); 86 | 87 | assertTrue("Test for xml footer", changelogXml.endsWith("
")); 88 | 89 | File outputDir = (File) getVariableValueFromObject(mojo, "outputDirectory"); 90 | 91 | File outputHtml = new File(outputDir, "dev-activity.html"); 92 | 93 | renderer(mojo, outputHtml); 94 | 95 | assertTrue(outputHtml.getAbsolutePath() + " not generated!", outputHtml.exists()); 96 | 97 | assertTrue(outputHtml.getAbsolutePath() + " is empty!", outputHtml.length() > 0); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/FileActivityComparatorTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | import org.apache.maven.scm.ChangeFile; 25 | import org.junit.Before; 26 | import org.junit.Test; 27 | 28 | import static org.junit.Assert.assertTrue; 29 | 30 | /** 31 | * @author Edwin Punzalan 32 | */ 33 | public class FileActivityComparatorTest { 34 | private FileActivityComparator comparator; 35 | 36 | /** 37 | * {@inheritDoc} 38 | */ 39 | @Before 40 | public void setUp() { 41 | comparator = new FileActivityComparator(); 42 | } 43 | 44 | @Test 45 | public void testCompareByNumberOfCommits() { 46 | List list1 = new ArrayList<>(); 47 | list1.add(new ChangeFile("anything")); 48 | 49 | List list2 = new ArrayList<>(); 50 | 51 | assertTrue("Test compare by commits, less than", comparator.compare(list1, list2) < 0); 52 | 53 | list1 = new ArrayList<>(); 54 | list1.add(new ChangeFile("anything")); 55 | 56 | list2 = new ArrayList<>(); 57 | list2.add(new ChangeFile("one thing")); 58 | list2.add(new ChangeFile("something")); 59 | 60 | assertTrue("Test compare by commits, greater than", comparator.compare(list1, list2) > 0); 61 | } 62 | 63 | @Test 64 | public void testCompareByRevision() { 65 | List list1 = new ArrayList<>(); 66 | list1.add(new ChangeFile("changefile-1", "123")); 67 | list1.add(new ChangeFile("changefile-1", "234")); 68 | 69 | List list2 = new ArrayList<>(); 70 | list2.add(new ChangeFile("changefile-2", "246")); 71 | list2.add(new ChangeFile("changefile-2", "468")); 72 | 73 | assertTrue("Test compare by revision, less than", comparator.compare(list1, list2) < 0); 74 | 75 | list1 = new ArrayList<>(); 76 | list1.add(new ChangeFile("changefile-1", "246")); 77 | list1.add(new ChangeFile("changefile-1", "468")); 78 | 79 | list2 = new ArrayList<>(); 80 | list2.add(new ChangeFile("changefile-2", "123")); 81 | list2.add(new ChangeFile("changefile-2", "234")); 82 | 83 | assertTrue("Test compare by revision, greater than", comparator.compare(list1, list2) > 0); 84 | } 85 | 86 | @Test 87 | public void testCompareByName() { 88 | List list1 = new ArrayList<>(); 89 | list1.add(new ChangeFile("changefile-1", "123")); 90 | list1.add(new ChangeFile("changefile-1", "468")); 91 | 92 | List list2 = new ArrayList<>(); 93 | list2.add(new ChangeFile("changefile-2", "246")); 94 | list2.add(new ChangeFile("changefile-2", "468")); 95 | 96 | assertTrue("Test compare by name, less than", comparator.compare(list1, list2) < 0); 97 | 98 | list1 = new ArrayList<>(); 99 | list1.add(new ChangeFile("changefile-1", "246")); 100 | list1.add(new ChangeFile("changefile-1", "468")); 101 | 102 | list2 = new ArrayList<>(); 103 | list2.add(new ChangeFile("changefile-2", "123")); 104 | list2.add(new ChangeFile("changefile-2", "234")); 105 | 106 | assertTrue("Test compare by name, greater than", comparator.compare(list1, list2) > 0); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/FileActivityReportTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog; 20 | 21 | import java.io.File; 22 | 23 | import org.apache.maven.plugins.changelog.stubs.ScmManagerStub; 24 | import org.apache.maven.scm.manager.ScmManager; 25 | import org.codehaus.plexus.util.FileUtils; 26 | 27 | /** 28 | * @author Edwin Punzalan 29 | */ 30 | public class FileActivityReportTest extends AbstractChangeLogReportTest { 31 | private ScmManager scmManager = new ScmManagerStub(); 32 | 33 | public void testNoSource() throws Exception { 34 | File pluginXmlFile = 35 | new File(getBasedir(), "src/test/plugin-configs/file-activity/no-source-plugin-config.xml"); 36 | 37 | FileActivityReport mojo = (FileActivityReport) lookupMojo("file-activity", pluginXmlFile); 38 | 39 | assertNotNull("Mojo found.", mojo); 40 | 41 | this.setVariableValueToObject(mojo, "manager", scmManager); 42 | 43 | mojo.execute(); 44 | 45 | File outputDir = (File) getVariableValueFromObject(mojo, "outputDirectory"); 46 | 47 | File outputHtml = new File(outputDir, "file-activity.html"); 48 | 49 | renderer(mojo, outputHtml); 50 | 51 | assertTrue(outputHtml.getAbsolutePath() + " not generated!", outputHtml.exists()); 52 | 53 | assertTrue(outputHtml.getAbsolutePath() + " is empty!", outputHtml.length() > 0); 54 | } 55 | 56 | public void testMinConfig() throws Exception { 57 | File outputXML = new File(getBasedir(), "src/test/changelog-xml/min-changelog.xml"); 58 | 59 | // force reuse of existing changelog cache 60 | outputXML.setLastModified(System.currentTimeMillis()); 61 | 62 | executeMojo("min-plugin-config.xml"); 63 | } 64 | 65 | private void executeMojo(String pluginXml) throws Exception { 66 | File pluginXmlFile = new File(getBasedir(), "src/test/plugin-configs/file-activity/" + pluginXml); 67 | 68 | FileActivityReport mojo = (FileActivityReport) lookupMojo("file-activity", pluginXmlFile); 69 | 70 | assertNotNull("Mojo found.", mojo); 71 | 72 | this.setVariableValueToObject(mojo, "manager", scmManager); 73 | 74 | mojo.execute(); 75 | 76 | File outputXML = (File) getVariableValueFromObject(mojo, "outputXML"); 77 | 78 | String encoding = (String) getVariableValueFromObject(mojo, "outputEncoding"); 79 | 80 | assertTrue("Test if changelog.xml is created", outputXML.exists()); 81 | 82 | String changelogXml = FileUtils.fileRead(outputXML); 83 | 84 | assertTrue( 85 | "Test for xml header", 86 | changelogXml.startsWith("")); 87 | 88 | assertTrue("Test for xml footer", changelogXml.endsWith("
")); 89 | 90 | File outputDir = (File) getVariableValueFromObject(mojo, "outputDirectory"); 91 | 92 | File outputHtml = new File(outputDir, "file-activity.html"); 93 | 94 | renderer(mojo, outputHtml); 95 | 96 | assertTrue(outputHtml.getAbsolutePath() + " not generated!", outputHtml.exists()); 97 | 98 | assertTrue(outputHtml.getAbsolutePath() + " is empty!", outputHtml.length() > 0); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/stubs/ChangeLogScmResultStub.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog.stubs; 20 | 21 | import java.util.Collections; 22 | import java.util.Date; 23 | 24 | import org.apache.maven.scm.command.changelog.ChangeLogSet; 25 | 26 | /** 27 | * @author Edwin Punzalan 28 | */ 29 | public class ChangeLogScmResultStub extends org.apache.maven.scm.command.changelog.ChangeLogScmResult { 30 | public ChangeLogScmResultStub() { 31 | this("", "", "", true); 32 | } 33 | 34 | public ChangeLogScmResultStub(String string, String string1, String string2, boolean b) { 35 | super("", "", "", true); 36 | } 37 | 38 | /** 39 | * {@inheritDoc} 40 | */ 41 | public ChangeLogSet getChangeLog() { 42 | return new ChangeLogSet(Collections.emptyList(), new Date(360), new Date(720)); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/stubs/DevelopersStub.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog.stubs; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | import org.apache.maven.model.Developer; 25 | 26 | /** 27 | * @author Edwin Punzalan 28 | */ 29 | public class DevelopersStub extends ArrayList { 30 | public DevelopersStub() { 31 | super(); 32 | 33 | List developers = new ArrayList<>(); 34 | 35 | Developer developer = new Developer(); 36 | developer.setName("Edwin Punzalan"); 37 | developer.setId("edwin"); 38 | developers.add(developer); 39 | 40 | developer = new Developer(); 41 | developer.setName("Keogh Edrich Punzalan"); 42 | developer.setId("keogh"); 43 | developers.add(developer); 44 | 45 | super.addAll(developers); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/stubs/FailedScmManagerStub.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog.stubs; 20 | 21 | import org.apache.maven.scm.command.changelog.ChangeLogScmResult; 22 | import org.apache.maven.scm.provider.ScmProvider; 23 | import org.apache.maven.scm.repository.ScmRepository; 24 | 25 | /** 26 | * @author Edwin Punzalan 27 | */ 28 | public class FailedScmManagerStub extends ScmManagerStub { 29 | /** 30 | * {@inheritDoc} 31 | */ 32 | public ScmProvider getProviderByRepository(ScmRepository scmRepository) { 33 | return new ScmProviderStub() { 34 | /** {@inheritDoc} */ 35 | protected ChangeLogScmResult getChangeLogScmResult() { 36 | return new ChangeLogScmResultStub() { 37 | /** {@inheritDoc} */ 38 | public String getCommandOutput() { 39 | return "Provider Stub Commandline"; 40 | } 41 | 42 | /** {@inheritDoc} */ 43 | public String getProviderMessage() { 44 | return "Provider Stub Error Message"; 45 | } 46 | 47 | /** {@inheritDoc} */ 48 | public boolean isSuccess() { 49 | return false; 50 | } 51 | }; 52 | } 53 | }; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/stubs/MavenProjectStub.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog.stubs; 20 | 21 | import java.io.File; 22 | 23 | import org.apache.maven.model.Scm; 24 | import org.codehaus.plexus.PlexusTestCase; 25 | 26 | /** 27 | * @author Edwin Punzalan 28 | */ 29 | public class MavenProjectStub extends org.apache.maven.plugin.testing.stubs.MavenProjectStub { 30 | private static int testCounter = 0; 31 | 32 | public MavenProjectStub() { 33 | super(); 34 | 35 | testCounter++; 36 | } 37 | 38 | /** 39 | * {@inheritDoc} 40 | */ 41 | public Scm getScm() { 42 | Scm scm = new Scm(); 43 | 44 | scm.setConnection("scm://"); 45 | 46 | return scm; 47 | } 48 | 49 | /** 50 | * {@inheritDoc} 51 | */ 52 | public File getBasedir() { 53 | return new File(PlexusTestCase.getBasedir(), "target/test-harness/" + testCounter); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/stubs/ScmManagerWithHostStub.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog.stubs; 20 | 21 | import org.apache.maven.scm.provider.ScmProviderRepositoryWithHost; 22 | import org.apache.maven.scm.repository.ScmRepository; 23 | 24 | /** 25 | * @author Edwin Punzalan 26 | */ 27 | public class ScmManagerWithHostStub extends ScmManagerStub { 28 | /** 29 | * {@inheritDoc} 30 | */ 31 | public ScmRepository makeScmRepository(String string) { 32 | ScmProviderRepositoryWithHost scmRepository = new ScmProviderRepositoryWithHost() { 33 | /** {@inheritDoc} */ 34 | public String getHost() { 35 | return "scmHost"; 36 | } 37 | 38 | /** {@inheritDoc} */ 39 | public int getPort() { 40 | return 7777; 41 | } 42 | }; 43 | 44 | return new ScmRepositoryStub("ScmRepositoryStubWithHost", scmRepository); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/stubs/ScmProviderRepositoryStub.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog.stubs; 20 | 21 | import org.apache.maven.scm.provider.ScmProviderRepository; 22 | 23 | /** 24 | * @author Edwin Punzalan 25 | */ 26 | public class ScmProviderRepositoryStub extends ScmProviderRepository {} 27 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/stubs/ScmRepositoryStub.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog.stubs; 20 | 21 | import org.apache.maven.scm.provider.ScmProviderRepository; 22 | import org.apache.maven.scm.repository.ScmRepository; 23 | 24 | /** 25 | * @author Edwin Punzalan 26 | */ 27 | public class ScmRepositoryStub extends ScmRepository { 28 | public ScmRepositoryStub() { 29 | this("ScmProviderStub", new ScmProviderRepositoryStub()); 30 | } 31 | 32 | public ScmRepositoryStub(String string, ScmProviderRepository repository) { 33 | super(string, repository); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/org/apache/maven/plugins/changelog/stubs/SettingsStub.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.changelog.stubs; 20 | 21 | import org.apache.maven.settings.Server; 22 | import org.apache.maven.settings.Settings; 23 | 24 | /** 25 | * @author Edwin Punzalan 26 | */ 27 | public class SettingsStub extends Settings { 28 | /** 29 | * {@inheritDoc} 30 | */ 31 | public Server getServer(String serverId) { 32 | return new Server() { 33 | /** {@inheritDoc} */ 34 | public String getUsername() { 35 | return "anonymous"; 36 | } 37 | 38 | /** {@inheritDoc} */ 39 | public String getPassword() { 40 | return "password"; 41 | } 42 | 43 | /** {@inheritDoc} */ 44 | public String getPassphrase() { 45 | return "passphrase"; 46 | } 47 | 48 | /** {@inheritDoc} */ 49 | public String getPrivateKey() { 50 | return "private-key"; 51 | } 52 | }; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/cached-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | range 27 | -1 28 | yyyy-MM-dd 29 | ${basedir}/src/main/java 30 | ${basedir}/src/test/changelog-xml/min-changelog.xml 31 | 3600 32 | ISO-8859-1 33 | scm:// 34 | site 35 | false 36 | connection 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/date-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | date 27 | 28 | 2005-02-25 29 | 30 | yyyy-MM-dd 31 | ${basedir}/src/main/java 32 | changelog.xml 33 | 60 34 | ISO-8859-1 35 | scm:// 36 | site 37 | false 38 | connection 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/dates-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | date 27 | 28 | 1977-08-06 29 | 2005-02-25 30 | 31 | yyyy-MM-dd 32 | ${basedir}/src/main/java 33 | changelog.xml 34 | 60 35 | ISO-8859-1 36 | scm:// 37 | site 38 | false 39 | connection 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/display-file-and-rev-info-explicitly-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | false 27 | range 28 | -1 29 | yyyy-MM-dd 30 | ${basedir}/src/main/java 31 | ${basedir}/src/test/changelog-xml/min-changelog.xml 32 | 60 33 | ISO-8859-1 34 | scm:// 35 | site 36 | false 37 | connection 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/dont-display-file-and-rev-info-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | true 27 | range 28 | -1 29 | yyyy-MM-dd 30 | ${basedir}/src/main/java 31 | ${basedir}/src/test/changelog-xml/min-changelog.xml 32 | 60 33 | ISO-8859-1 34 | scm:// 35 | site 36 | false 37 | connection 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/hosted-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | range 27 | -1 28 | yyyy-MM-dd 29 | ${basedir}/src/main/java 30 | changelog.xml 31 | 60 32 | ISO-8859-1 33 | scm:provider://host:port/context?attribs 34 | scm:provider://host:port/context?attribs 35 | site 36 | false 37 | connection 38 | 39 | 40 | anonymous 41 | secret 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/hosted-with-settings-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | range 27 | -1 28 | yyyy-MM-dd 29 | ${basedir}/src/main/java 30 | changelog.xml 31 | 60 32 | ISO-8859-1 33 | scm:// 34 | site 35 | false 36 | connection 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/inv-date-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | date 27 | 28 | Feb 25, 2005 29 | 30 | yyyy-MM-dd 31 | ${basedir}/src/main/java 32 | changelog.xml 33 | 60 34 | ISO-8859-1 35 | scm:// 36 | site 37 | false 38 | connection 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/inv-type-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | invalid 27 | -1 28 | yyyy-MM-dd 29 | ${basedir}/src/main/java 30 | changelog.xml 31 | 60 32 | ISO-8859-1 33 | scm:// 34 | site 35 | false 36 | connection 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/min-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | maven-changelog-plugin 24 | 25 | range 26 | -1 27 | yyyy-MM-dd 28 | ${basedir}/src/main/java 29 | changelog.xml 30 | 60 31 | ISO-8859-1 32 | scm:// 33 | site 34 | false 35 | connection 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/no-scm-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | range 27 | -1 28 | yyyy-MM-dd 29 | ${basedir}/src/main/java 30 | changelog.xml 31 | 60 32 | ISO-8859-1 33 | scm:// 34 | site 35 | false 36 | no-connection 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/no-source-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | range 27 | -1 28 | yyyy-MM-dd 29 | ${basedir}/src/main/no-dir 30 | changelog.xml 31 | 60 32 | ISO-8859-1 33 | scm:// 34 | site 35 | false 36 | connection 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/tag-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | tag 27 | 28 | first 29 | 30 | yyyy-MM-dd 31 | ${basedir}/src/main/java 32 | changelog.xml 33 | 60 34 | ISO-8859-1 35 | scm:// 36 | site 37 | false 38 | connection 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/test/plugin-configs/changelog/tags-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | tag 27 | 28 | first 29 | second 30 | 31 | yyyy-MM-dd 32 | ${basedir}/src/main/java 33 | changelog.xml 34 | 60 35 | ISO-8859-1 36 | scm:// 37 | site 38 | false 39 | connection 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/test/plugin-configs/dev-activity/min-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | range 27 | -1 28 | yyyy-MM-dd 29 | ${basedir}/src/main/java 30 | ${basedir}/src/test/changelog-xml/min-changelog.xml 31 | 3600 32 | ISO-8859-1 33 | scm:// 34 | site 35 | false 36 | connection 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/test/plugin-configs/dev-activity/no-source-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | range 27 | -1 28 | yyyy-MM-dd 29 | ${basedir}/src/main/no-dir 30 | changelog.xml 31 | 60 32 | ISO-8859-1 33 | scm:// 34 | site 35 | false 36 | connection 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/test/plugin-configs/file-activity/min-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | range 27 | -1 28 | yyyy-MM-dd 29 | ${basedir}/src/main/java 30 | ${basedir}/src/test/changelog-xml/min-changelog.xml 31 | 60 32 | ISO-8859-1 33 | scm:// 34 | site 35 | false 36 | connection 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/test/plugin-configs/file-activity/no-source-plugin-config.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | maven-changelog-plugin 25 | 26 | range 27 | -1 28 | yyyy-MM-dd 29 | ${basedir}/src/main/no-dir 30 | changelog.xml 31 | 60 32 | ISO-8859-1 33 | scm:// 34 | site 35 | false 36 | connection 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | --------------------------------------------------------------------------------