| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one |
| ~ or more contributor license agreements. See the NOTICE file |
| ~ distributed with this work for additional information |
| ~ regarding copyright ownership. The ASF licenses this file |
| ~ to you under the Apache License, Version 2.0 (the |
| ~ "License"); you may not use this file except in compliance |
| ~ with the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, |
| ~ software distributed under the License is distributed on an |
| ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ~ KIND, either express or implied. See the License for the |
| ~ specific language governing permissions and limitations |
| ~ under the License. |
| --> |
| |
| <model xmlns="http://modello.codehaus.org/MODELLO/1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.4.0 http://modello.codehaus.org/xsd/modello-1.4.0.xsd"> |
| <id>release-descriptor</id> |
| <name>ReleaseDescriptor</name> |
| <description> |
| A release descriptor contains everything that is needed to perform a |
| release. A release descriptor can be used by third party systems like |
| Continuum to perform releases in a consistent way. The release model could also |
| be deployed to the repository manager so that new releases can be announced easily |
| and automatically. |
| </description> |
| <defaults> |
| <default> |
| <key>package</key> |
| <value>org.apache.maven.shared.release.config</value> |
| </default> |
| </defaults> |
| <classes> |
| <class rootElement="true"> |
| <name>ReleaseDescriptor</name> |
| <version>1.0.0+</version> |
| <fields> |
| <!-- Descriptive Information --> |
| <field> |
| <name>name</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| The name of this release configuration |
| </description> |
| </field> |
| <field> |
| <name>description</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| The description of this release configuration |
| </description> |
| </field> |
| <!-- Settings needs to be resolved --> |
| <!-- SCM Information --> |
| <field> |
| <name>ScmCommentPrefix</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <defaultValue>[maven-release-manager] </defaultValue> |
| <description> |
| The prefix of SCM modification messages |
| </description> |
| </field> |
| <field> |
| <name>scmSourceUrl</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| This is a MavenSCM of where you're going to get the sources to make the release with. |
| Example: scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-release-plugin |
| </description> |
| </field> |
| <field> |
| <name>scmTagBase</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| Where you are going to put your tagged sources |
| Example https://svn.apache.org/repos/asf/maven/plugins/tags |
| </description> |
| </field> |
| <field> |
| <name>scmBranchBase</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| Where you are going to put your branched sources |
| Example https://svn.apache.org/repos/asf/maven/plugins/branches |
| </description> |
| </field> |
| <field> |
| <name>scmReleaseLabel</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| tag or branch name: the identifier for the tag/branch. |
| Example: maven-release-plugin-2.0 |
| </description> |
| </field> |
| <field> |
| <name>scmId</name> |
| <version>2.3.0+</version> |
| <type>String</type> |
| <description> |
| The id can be used to get the credentials by the server-id from the settings.xml |
| </description> |
| </field> |
| <field> |
| <name>scmUsername</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| The user name to interact with the scm |
| </description> |
| </field> |
| <field> |
| <name>scmPassword</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| The password for the user interacting with the scm |
| </description> |
| </field> |
| <field> |
| <name>scmPrivateKey</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| Private key for an SSH based SCM repository. |
| </description> |
| </field> |
| <field> |
| <name>scmPrivateKeyPassPhrase</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| Pass phrase for the private key. |
| </description> |
| </field> |
| <field> |
| <name>scmUseEditMode</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <description> |
| Whether to use edit mode when making SCM modifications. This setting is disregarded |
| if the SCM does not support edit mode, or if edit mode is compulsory for the given SCM. |
| </description> |
| </field> |
| <field> |
| <name>scmRelativePathProjectDirectory</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| Relative path of the project returned by the checkout command. |
| </description> |
| </field> |
| <!-- Maven Information --> |
| <!-- <field> --> |
| <!-- <name>releaseVersions</name> --> |
| <!-- <version>1.0.0+</version> --> |
| <!-- <type>Map</type> --> |
| <!-- <association> --> |
| <!-- <type>String</type> --> |
| <!-- <multiplicity>*</multiplicity> --> |
| <!-- </association> --> |
| <!-- <description> --> |
| <!-- A map of projects to versions to use when releasing the given projects. --> |
| <!-- </description> --> |
| <!-- </field> --> |
| <!-- <field> --> |
| <!-- <name>developmentVersions</name> --> |
| <!-- <version>1.0.0+</version> --> |
| <!-- <type>Map</type> --> |
| <!-- <association> --> |
| <!-- <type>String</type> --> |
| <!-- <multiplicity>*</multiplicity> --> |
| <!-- </association> --> |
| <!-- <description> --> |
| <!-- A map of projects to versions to use when moving the given projects back into development after release. --> |
| <!-- </description> --> |
| <!-- </field> --> |
| <!-- <field> --> |
| <!-- <name>resolvedSnapshotDependencies</name> --> |
| <!-- <version>1.0.0+</version> --> |
| <!-- <type>Map</type> --> |
| <!-- <association> --> |
| <!-- <type>String</type> --> |
| <!-- <multiplicity>*</multiplicity> --> |
| <!-- </association> --> |
| <!-- <description> --> |
| <!-- A map of resolved snapshot dependencies versions. --> |
| <!-- </description> --> |
| <!-- </field> --> |
| <field> |
| <name>updateDependencies</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <defaultValue>true</defaultValue> |
| <description> |
| If updateDependencies is false, dependencies version won't be updated to the next development version. |
| </description> |
| </field> |
| <field> |
| <name>useReleaseProfile</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <defaultValue>true</defaultValue> |
| <description> |
| Whether to use the release profile that adds sources and javadocs to the released artifact, if appropriate. |
| If set to true, this will set the property "performRelease" to true. |
| </description> |
| </field> |
| <!-- <field> --> |
| <!-- <name>originalScmInfo</name> --> |
| <!-- <version>1.0.0+</version> --> |
| <!-- <type>Map</type> --> |
| <!-- <association> --> |
| <!-- <type>String</type> --> |
| <!-- <multiplicity>*</multiplicity> --> |
| <!-- </association> --> |
| <!-- <description> --> |
| <!-- A map of projects to original SCM information. --> |
| <!-- </description> --> |
| <!-- </field> --> |
| <field> |
| <name>workingDirectory</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| The directory where the release is performed. |
| </description> |
| </field> |
| <field> |
| <name>checkoutDirectory</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| The directory where the tag will be checked out. |
| </description> |
| </field> |
| <field> |
| <name>completedPhase</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| The last completed phase. |
| </description> |
| </field> |
| <field> |
| <name>addSchema</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <description> |
| <![CDATA[Whether to add the model schema to the top of the rewritten POM if it wasn't there already. |
| If <code>false</code> then the root element will remain untouched.]]> |
| </description> |
| </field> |
| <field> |
| <name>generateReleasePoms</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <description> |
| Whether to generate release POMs. |
| </description> |
| </field> |
| <field> |
| <name>autoVersionSubmodules</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <description> |
| Whether to use the parent pom version for submodule versions. |
| </description> |
| </field> |
| <field> |
| <name>interactive</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <defaultValue>true</defaultValue> |
| <description> |
| Whether the release process is interactive and the release manager should be prompted to |
| confirm values, or whether the defaults are used regardless. |
| </description> |
| </field> |
| <field> |
| <name>snapshotReleasePluginAllowed</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <defaultValue>false</defaultValue> |
| <description> |
| Whether a SNAPSHOT of the release plugin is allowed. |
| </description> |
| </field> |
| <field> |
| <name>additionalArguments</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| Additional arguments to pass to any executed Maven process. |
| </description> |
| </field> |
| <field> |
| <name>pomFileName</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| The file name of the POM to pass to any executed Maven process. |
| </description> |
| </field> |
| <field> |
| <name>checkModificationExcludes</name> |
| <version>2.1.0+</version> |
| <type>List</type> |
| <association> |
| <type>String</type> |
| <multiplicity>*</multiplicity> |
| </association> |
| <description> |
| In some exceptions you want to allow changes to the working copy. Changes |
| to files listed here will not make the ScmCheckModificationsPhase fail. |
| </description> |
| </field> |
| <field> |
| <name>preparationGoals</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| The goals to execute in preparation for the release. |
| </description> |
| </field> |
| <field> |
| <name>completionGoals</name> |
| <version>2.2.0+</version> |
| <type>String</type> |
| <description> |
| The goals to execute in on completion of preparation for the release. |
| </description> |
| </field> |
| <field> |
| <name>performGoals</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| The goals to execute in perform phase for the release. |
| </description> |
| </field> |
| <field> |
| <name>commitByProject</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <defaultValue>false</defaultValue> |
| <description> |
| The commits must be done by modules or not. Set it to true in case of flat directory structure. |
| </description> |
| </field> |
| <field> |
| <name>branchCreation</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <description> |
| Whether to create a branch instead of do a release. |
| </description> |
| </field> |
| <field> |
| <name>updateBranchVersions</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <description> |
| Whether to update branch POM versions. |
| </description> |
| </field> |
| <field> |
| <name>updateWorkingCopyVersions</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <defaultValue>true</defaultValue> |
| <description> |
| Whether to update working copy POM versions. |
| </description> |
| </field> |
| <field> |
| <name>updateVersionsToSnapshot</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <description> |
| Whether to update branch versions to SNAPSHOT. |
| </description> |
| </field> |
| <field> |
| <name>suppressCommitBeforeTagOrBranch</name> |
| <version>2.1.0+</version> |
| <type>boolean</type> |
| <description> |
| Whether to suppress a commit of changes to the working copy before a tag or branch is created. |
| </description> |
| </field> |
| <field> |
| <name>waitBeforeTagging</name> |
| <version>2.2.0+</version> |
| <type>int</type> |
| <description> |
| Wait the specified number of seconds before creating a tag. |
| </description> |
| </field> |
| <field> |
| <name>allowTimestampedSnapshots</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <defaultValue>false</defaultValue> |
| <description> |
| Should timestamped SNAPSHOT dependencies be allowed? Default is to fail when any SNAPSHOT |
| dependency is found. |
| </description> |
| </field> |
| <field> |
| <name>defaultReleaseVersion</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| Default version to use for the tagged release or the new branch. |
| </description> |
| </field> |
| <field> |
| <name>defaultDevelopmentVersion</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| Default version to use for new working copy. |
| </description> |
| </field> |
| <field> |
| <name>projectVersionPolicyId</name> |
| <version>2.5.1+</version> |
| <type>String</type> |
| <defaultValue>default</defaultValue> |
| <description> |
| The role-hint for the VersionPolicy implementation used to calculate the project versions. |
| </description> |
| </field> |
| <field> |
| <name>projectNamingPolicyId</name> |
| <version>3.0.0+</version> |
| <type>String</type> |
| <!-- no default value to support scmTagNameFormat-style behavior --> |
| <description> |
| The role-hint for the NamingPolicy implementation used to calculate the project branch and tag names. |
| </description> |
| </field> |
| |
| <field> |
| <name>remoteTagging</name> |
| <version>1.0.0+</version> |
| <type>boolean</type> |
| <defaultValue>false</defaultValue> |
| <description> |
| NOTE : currently only implemented with svn scm. Enable a workaround to prevent issue due to svn client > 1.5.0 |
| (http://jira.codehaus.org/browse/SCM-406) |
| </description> |
| </field> |
| <field> |
| <name>scmReleasedPomRevision</name> |
| <version>1.0.0+</version> |
| <type>String</type> |
| <description> |
| NOTE : currently only implemented with svn scm. It contains the revision of the committed released pom to remotely tag |
| the source code with this revision. |
| </description> |
| </field> |
| |
| <field> |
| <name>pushChanges</name> |
| <version>2.0.0+</version> |
| <type>boolean</type> |
| <defaultValue>true</defaultValue> |
| <description> |
| Should distributed changes be pushed to the central repository? |
| For many distributed SCMs like Git, a change like a commit is only stored in your local copy of the repository. |
| Pushing the change allows your to more easily share it with other users. |
| </description> |
| </field> |
| |
| <field> |
| <name>localCheckout</name> |
| <version>2.0.0+</version> |
| <type>boolean</type> |
| <defaultValue>false</defaultValue> |
| <description> |
| If the scm provider should use local checkouts via file://${basedir} |
| instead of doing a clean checkout over the network. |
| This is very helpful for releasing large projects! |
| </description> |
| </field> |
| |
| <field> |
| <name>scmTagNameFormat</name> |
| <version>2.2.0+</version> |
| <type>String</type> |
| <description> |
| Specifies the format for generating a tag name. Property expansion is |
| used with the optional prefix of project, where properties are delimited |
| with @{ and } |
| </description> |
| </field> |
| |
| <!-- Announcement Information |
| |
| Announcement related info, this can be a second part of the process. |
| |
| o anything that might be of interest in the release |
| o issue management urls |
| o new content |
| o announcement text |
| |
| --> |
| </fields> |
| |
| <!-- Code Segments --> |
| <codeSegments> |
| <codeSegment> |
| <version>2.1.0+</version> |
| <code><![CDATA[ |
| public static final String DEVELOPMENT_KEY = "dev"; |
| |
| public static final String RELEASE_KEY = "rel"; |
| |
| public static final String ORIGINAL_VERSION = "original"; |
| |
| /** |
| * Field resolvedSnapshotDependencies. |
| */ |
| private java.util.Map<String, java.util.Map<String, String>> resolvedSnapshotDependencies; |
| |
| /** |
| * Field releaseVersions. |
| */ |
| private java.util.Map<String, String> releaseVersions; |
| |
| /** |
| * Field developmentVersions. |
| */ |
| private java.util.Map<String, String> developmentVersions; |
| |
| /** |
| * Field originalScmInfo. |
| */ |
| private java.util.Map<String, org.apache.maven.model.Scm> originalScmInfo; |
| |
| /** |
| * Method getResolvedSnapshotDependencies. |
| * |
| * @return Map |
| */ |
| public java.util.Map<String, java.util.Map<String, String>> getResolvedSnapshotDependencies() |
| { |
| if ( this.resolvedSnapshotDependencies == null ) |
| { |
| this.resolvedSnapshotDependencies = new java.util.HashMap<>(); |
| } |
| |
| return this.resolvedSnapshotDependencies; |
| } //-- java.util.Map<String, java.util.Map<String, String>> getResolvedSnapshotDependencies() |
| |
| /** |
| * Set a map of resolved snapshot dependencies versions. |
| * |
| * @param resolvedSnapshotDependencies |
| */ |
| public void setResolvedSnapshotDependencies( java.util.Map<String, java.util.Map<String, String>> resolvedSnapshotDependencies ) |
| { |
| this.resolvedSnapshotDependencies = resolvedSnapshotDependencies; |
| } //-- void setResolvedSnapshotDependencies( java.util.Map<String, java.util.Map<String, String>> ) |
| |
| /** |
| * Method getReleaseVersions. |
| * |
| * @return Map |
| */ |
| public java.util.Map<String, String> getReleaseVersions() |
| { |
| if ( this.releaseVersions == null ) |
| { |
| this.releaseVersions = new java.util.HashMap<>(); |
| } |
| |
| return this.releaseVersions; |
| } //-- java.util.Map<String, String> getReleaseVersions() |
| |
| /** |
| * Method addReleaseVersion. |
| * |
| * @param key |
| * @param value |
| */ |
| public void addReleaseVersion( String key, String value ) |
| { |
| getReleaseVersions().put( key, value ); |
| } //-- void addReleaseVersion( String, String ) |
| |
| /** |
| * Method getDevelopmentVersions. |
| * |
| * @return Map |
| */ |
| public java.util.Map<String, String> getDevelopmentVersions() |
| { |
| if ( this.developmentVersions == null ) |
| { |
| this.developmentVersions = new java.util.HashMap<>(); |
| } |
| |
| return this.developmentVersions; |
| } //-- java.util.Map<String, String> getDevelopmentVersions() |
| |
| /** |
| * Method addDevelopmentVersion. |
| * |
| * @param key |
| * @param value |
| */ |
| public void addDevelopmentVersion( String key, String value ) |
| { |
| getDevelopmentVersions().put( key, value ); |
| } //-- void addDevelopmentVersion( String, String ) |
| |
| /** |
| * Method getOriginalScmInfo. |
| * |
| * @return Map |
| */ |
| public java.util.Map<String, org.apache.maven.model.Scm> getOriginalScmInfo() |
| { |
| if ( this.originalScmInfo == null ) |
| { |
| this.originalScmInfo = new java.util.HashMap<>(); |
| } |
| |
| return this.originalScmInfo; |
| } //-- java.util.Map<Object, String> getOriginalScmInfo() |
| |
| /** |
| * Method addOriginalScmInfo. |
| * |
| * @param key |
| * @param value |
| */ |
| public void addOriginalScmInfo( String key, org.apache.maven.model.Scm value ) |
| { |
| getOriginalScmInfo().put( key, value ); |
| } //-- void addOriginalScmInfo( String, org.apache.maven.model.Scm ) |
| |
| /** |
| * Map a given snapshot dependency to a specified version from when it is released. |
| * |
| */ |
| public void mapResolvedSnapshotDependencies( String artifactName, String releaseVersion, String developmentVersion ) |
| { |
| if ( resolvedSnapshotDependencies == null ) |
| { |
| resolvedSnapshotDependencies = new java.util.HashMap<>(); |
| } |
| else |
| { |
| assert !resolvedSnapshotDependencies.containsKey( artifactName ); |
| } |
| |
| java.util.Map versionsMap = new java.util.HashMap<>(); |
| |
| versionsMap.put( DEVELOPMENT_KEY, developmentVersion ); |
| versionsMap.put( RELEASE_KEY, releaseVersion ); |
| resolvedSnapshotDependencies.put( artifactName, versionsMap ); |
| } |
| |
| /** |
| * Map a given project to a specified version from when it is released. |
| * |
| * @param projectId the project's group and artifact ID |
| * @param nextVersion the version to map to |
| */ |
| public void mapReleaseVersion( String projectId, String nextVersion ) |
| { |
| if ( releaseVersions == null ) |
| { |
| releaseVersions = new java.util.HashMap<>(); |
| } |
| |
| releaseVersions.put( projectId, nextVersion ); |
| } |
| |
| /** |
| * Map a given project to a specified version from when it is incremented and placed back into development. |
| * |
| * @param projectId the project's group and artifact ID |
| * @param nextVersion the version to map to |
| */ |
| public void mapDevelopmentVersion( String projectId, String nextVersion ) |
| { |
| if ( developmentVersions == null ) |
| { |
| developmentVersions = new java.util.HashMap<>(); |
| } |
| |
| developmentVersions.put( projectId, nextVersion ); |
| } |
| |
| /** |
| * Map a given project to a specified set of SCM information. |
| * |
| * @param projectId the project's group and artifact ID |
| * @param scm the original SCM information to store |
| */ |
| public void mapOriginalScmInfo( String projectId, org.apache.maven.model.Scm scm ) |
| { |
| if ( originalScmInfo == null ) |
| { |
| originalScmInfo = new java.util.HashMap<>(); |
| } |
| else |
| { |
| assert !originalScmInfo.containsKey( projectId ); |
| } |
| |
| originalScmInfo.put( projectId, scm ); |
| } |
| |
| /** |
| * A map of projects to original versions before any transformation. |
| */ |
| private java.util.Map originalVersions; |
| |
| /** |
| * Retrieve the original version map, before transformation, keyed by project's versionless identifier. |
| * |
| * @param reactorProjects The reactor projects. |
| * |
| * @return the map of project IDs to versions. |
| */ |
| public synchronized java.util.Map<String, String> getOriginalVersions( java.util.List<org.apache.maven.project.MavenProject> reactorProjects ) |
| { |
| if ( originalVersions == null ) |
| { |
| originalVersions = new java.util.HashMap<>(); |
| for ( org.apache.maven.project.MavenProject project : reactorProjects ) |
| { |
| originalVersions.put( org.apache.maven.artifact.ArtifactUtils.versionlessKey( project.getGroupId(), |
| project.getArtifactId() ), project.getVersion() ); |
| } |
| } |
| return originalVersions; |
| } |
| |
| /** |
| * Retrieve the release version for the resolved snapshot dependency. |
| * |
| */ |
| public String getDependencyDevelopmentVersion( String artifactConflictId ) |
| { |
| if ( ( resolvedSnapshotDependencies == null ) && ( resolvedSnapshotDependencies.containsKey( artifactConflictId ) ) ) |
| { |
| java.util.Map<String, String> versionMap = resolvedSnapshotDependencies.get( artifactConflictId ); |
| return versionMap.get( DEVELOPMENT_KEY ); |
| } |
| return null; |
| } |
| |
| /** |
| * Retrieve the release version for the resolved snapshot dependency. |
| * |
| */ |
| public String getDependencyReleaseVersion( String artifactConflictId ) |
| { |
| if ( ( resolvedSnapshotDependencies == null ) && ( resolvedSnapshotDependencies.containsKey( artifactConflictId ) ) ) |
| { |
| java.util.Map<String, String> versionMap = resolvedSnapshotDependencies.get( artifactConflictId ); |
| return versionMap.get( RELEASE_KEY ); |
| } |
| return null; |
| } |
| |
| boolean safeEquals( String a, String b ) |
| { |
| return a != null ? a.equals( b ) : b == null; |
| } |
| |
| public boolean equals( Object obj ) |
| { |
| if ( this == obj ) |
| { |
| return true; |
| } |
| if ( obj == null || getClass() != obj.getClass() ) |
| { |
| return false; |
| } |
| |
| ReleaseDescriptor that = (ReleaseDescriptor) obj; |
| |
| if ( updateDependencies != that.updateDependencies || |
| useReleaseProfile != that.useReleaseProfile || |
| autoVersionSubmodules != that.autoVersionSubmodules || |
| snapshotReleasePluginAllowed != that.snapshotReleasePluginAllowed || |
| commitByProject != that.commitByProject || |
| branchCreation != that.branchCreation || |
| updateBranchVersions != that.updateBranchVersions || |
| updateWorkingCopyVersions != that.updateWorkingCopyVersions|| |
| suppressCommitBeforeTagOrBranch != that.suppressCommitBeforeTagOrBranch || |
| updateVersionsToSnapshot != that.updateVersionsToSnapshot || |
| allowTimestampedSnapshots != that.allowTimestampedSnapshots|| |
| remoteTagging != that.remoteTagging || |
| localCheckout != that.localCheckout || |
| pushChanges != that.pushChanges |
| ) |
| { |
| return false; |
| } |
| |
| if ( !safeEquals( defaultDevelopmentVersion, that.defaultDevelopmentVersion ) || |
| !safeEquals( scmRelativePathProjectDirectory, that.scmRelativePathProjectDirectory ) || |
| !safeEquals( checkoutDirectory, that.checkoutDirectory ) || |
| !safeEquals( performGoals, that.performGoals ) || |
| !safeEquals( defaultReleaseVersion, that.defaultReleaseVersion ) || |
| !safeEquals( scmReleasedPomRevision, that.scmReleasedPomRevision ) |
| ) |
| { |
| return false; |
| } |
| |
| if ( addSchema != that.addSchema ) |
| { |
| return false; |
| } |
| if ( generateReleasePoms != that.generateReleasePoms ) |
| { |
| return false; |
| } |
| if ( interactive != that.interactive ) |
| { |
| return false; |
| } |
| if ( scmUseEditMode != that.scmUseEditMode ) |
| { |
| return false; |
| } |
| if ( !safeEquals( completedPhase, that.completedPhase ) ) |
| { |
| return false; |
| } |
| if ( ( checkModificationExcludes == null || ( checkModificationExcludes != null && checkModificationExcludes.size() == 0) ) && |
| ( that.checkModificationExcludes == null || ( that.checkModificationExcludes != null && that.checkModificationExcludes.size() == 0) ) ) |
| { |
| // Do nothing. This is a Modello workaround |
| } |
| else |
| { |
| if ( checkModificationExcludes != null ? !checkModificationExcludes.equals( that.checkModificationExcludes ) |
| : that.checkModificationExcludes != null ) |
| { |
| return false; |
| } |
| } |
| if ( ( developmentVersions == null || ( developmentVersions != null && developmentVersions.size() == 0) ) && |
| ( that.developmentVersions == null || ( that.developmentVersions != null && that.developmentVersions.size() == 0) ) ) |
| { |
| // Do nothing. This is a Modello workaround |
| } |
| else |
| { |
| if ( developmentVersions != null ? !developmentVersions.equals( that.developmentVersions ) |
| : that.developmentVersions != null ) |
| { |
| return false; |
| } |
| } |
| if ( ( originalScmInfo == null || (originalScmInfo != null && originalScmInfo.size() == 0 ) ) && |
| ( that.originalScmInfo == null || ( that.originalScmInfo != null && that.originalScmInfo.size() == 0 ) ) ) |
| { |
| // Do nothing. This is a Modello workaround |
| } |
| else |
| { |
| if ( originalScmInfo != null ? !compareScmCollections( that.originalScmInfo ) : that.originalScmInfo != null ) |
| { |
| return false; |
| } |
| } |
| if ( ( releaseVersions == null || ( releaseVersions != null && releaseVersions.size() == 0 ) ) && |
| ( that.releaseVersions == null || ( that.releaseVersions != null && that.releaseVersions.size() == 0 ) ) ) |
| { |
| // Do nothing. This is a Modello workaround |
| } |
| else |
| { |
| if ( releaseVersions != null ? !releaseVersions.equals( that.releaseVersions ) : that.releaseVersions != null ) |
| { |
| return false; |
| } |
| } |
| if ( !safeEquals( additionalArguments, that.additionalArguments ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( preparationGoals, that.preparationGoals ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( completionGoals, that.completionGoals ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( pomFileName, that.pomFileName ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( scmPrivateKeyPassPhrase, that.scmPrivateKeyPassPhrase ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( scmPassword, that.scmPassword ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( scmPrivateKey, that.scmPrivateKey ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( scmReleaseLabel, that.scmReleaseLabel ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( scmTagBase, that.scmTagBase ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( scmBranchBase, that.scmBranchBase ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( scmId, that.scmId ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( scmSourceUrl, that.scmSourceUrl ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( scmUsername, that.scmUsername ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( workingDirectory, that.workingDirectory ) ) |
| { |
| return false; |
| } |
| if ( !safeEquals( scmTagNameFormat, that.scmTagNameFormat ) ) |
| { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| private boolean compareScmCollections( java.util.Map that ) |
| { |
| // Must manually compare as Scm doesn't have an equals method |
| if ( that == null && originalScmInfo == null ) |
| { |
| return true; |
| } |
| |
| if ( ( that == null && originalScmInfo != null ) || ( that != null && originalScmInfo == null ) ) |
| { |
| return false; |
| } |
| |
| if ( that.size() != originalScmInfo.size() ) |
| { |
| return false; |
| } |
| |
| for ( java.util.Iterator i = originalScmInfo.entrySet().iterator(); i.hasNext(); ) |
| { |
| java.util.Map.Entry entry = (java.util.Map.Entry) i.next(); |
| |
| org.apache.maven.model.Scm thatScm = (org.apache.maven.model.Scm) that.get( entry.getKey() ); |
| |
| org.apache.maven.model.Scm thisScm = (org.apache.maven.model.Scm) entry.getValue(); |
| if ( thatScm == null && thisScm == null ) |
| { |
| return true; |
| } |
| else if ( thatScm == null ) |
| { |
| return false; |
| } |
| else if ( thisScm == null ) |
| { |
| return true; |
| } |
| |
| if ( thisScm.getConnection() != null ? !thisScm.getConnection().equals( thatScm.getConnection() ) |
| : thatScm.getConnection() != null ) |
| { |
| return false; |
| } |
| if ( thisScm.getDeveloperConnection() != null ? !thisScm.getDeveloperConnection().equals( |
| thatScm.getDeveloperConnection() ) : thatScm.getDeveloperConnection() != null ) |
| { |
| return false; |
| } |
| if ( thisScm.getUrl() != null ? !thisScm.getUrl().equals( thatScm.getUrl() ) : thatScm.getUrl() != null ) |
| { |
| return false; |
| } |
| if ( thisScm.getTag() != null ? !thisScm.getTag().equals( thatScm.getTag() ) : thatScm.getTag() != null ) |
| { |
| return false; |
| } |
| |
| if ( thisScm instanceof org.apache.maven.shared.release.scm.IdentifiedScm && thatScm instanceof org.apache.maven.shared.release.scm.IdentifiedScm ) |
| { |
| org.apache.maven.shared.release.scm.IdentifiedScm thisIdentifiedScm = (org.apache.maven.shared.release.scm.IdentifiedScm) thisScm; |
| org.apache.maven.shared.release.scm.IdentifiedScm thatIdentifiedScm = (org.apache.maven.shared.release.scm.IdentifiedScm) thatScm; |
| if ( thisIdentifiedScm.getId() != null ? !thisIdentifiedScm.getId().equals( thatIdentifiedScm.getId() ) : thatIdentifiedScm.getId() != null ) |
| { |
| return false; |
| } |
| } |
| } |
| |
| return true; |
| } |
| |
| public int hashCode() |
| { |
| int result = completedPhase != null ? completedPhase.hashCode() : 0; |
| result = 29 * result + ( scmReleaseLabel != null ? scmReleaseLabel.hashCode() : 0 ); |
| result = 29 * result + ( additionalArguments != null ? additionalArguments.hashCode() : 0 ); |
| result = 29 * result + ( preparationGoals != null ? preparationGoals.hashCode() : 0 ); |
| result = 29 * result + ( completionGoals != null ? completionGoals.hashCode() : 0 ); |
| result = 29 * result + ( pomFileName != null ? pomFileName.hashCode() : 0 ); |
| result = 29 * result + ( checkModificationExcludes != null ? checkModificationExcludes.hashCode() : 0 ); |
| result = 29 * result + ( scmTagBase != null ? scmTagBase.hashCode() : 0 ); |
| result = 29 * result + ( scmBranchBase != null ? scmBranchBase.hashCode() : 0 ); |
| result = 29 * result + ( scmUsername != null ? scmUsername.hashCode() : 0 ); |
| result = 29 * result + ( scmPassword != null ? scmPassword.hashCode() : 0 ); |
| result = 29 * result + ( scmId != null ? scmId.hashCode() : 0 ); |
| result = 29 * result + ( scmSourceUrl != null ? scmSourceUrl.hashCode() : 0 ); |
| result = 29 * result + ( scmPrivateKey != null ? scmPrivateKey.hashCode() : 0 ); |
| result = 29 * result + ( scmPrivateKeyPassPhrase != null ? scmPrivateKeyPassPhrase.hashCode() : 0 ); |
| result = 29 * result + ( workingDirectory != null ? workingDirectory.hashCode() : 0 ); |
| result = 29 * result + ( scmUseEditMode ? 1 : 0 ); |
| result = 29 * result + ( addSchema ? 1 : 0 ); |
| result = 29 * result + ( generateReleasePoms ? 1 : 0 ); |
| result = 29 * result + ( interactive ? 1 : 0 ); |
| result = 29 * result + ( releaseVersions != null ? releaseVersions.hashCode() : 0 ); |
| result = 29 * result + ( developmentVersions != null ? developmentVersions.hashCode() : 0 ); |
| result = 29 * result + ( originalScmInfo != null ? originalScmInfo.hashCode() : 0 ); |
| result = 29 * result + ( updateDependencies ? 1 : 0 ); |
| result = 29 * result + ( useReleaseProfile ? 1 : 0 ); |
| result = 29 * result + ( autoVersionSubmodules ? 1 : 0 ); |
| result = 29 * result + ( snapshotReleasePluginAllowed ? 1 : 0 ); |
| result = 29 * result + ( commitByProject ? 1 : 0 ); |
| result = 29 * result + ( branchCreation ? 1 : 0 ); |
| result = 29 * result + ( updateBranchVersions ? 1 : 0 ); |
| result = 29 * result + ( updateWorkingCopyVersions ? 1 : 0 ); |
| result = 29 * result + ( suppressCommitBeforeTagOrBranch ? 1 : 0 ); |
| result = 29 * result + ( updateVersionsToSnapshot ? 1 : 0 ); |
| result = 29 * result + ( allowTimestampedSnapshots ? 1 : 0 ); |
| result = 29 * result + ( remoteTagging ? 1 : 0 ); |
| result = 29 * result + ( localCheckout ? 1 : 0 ); |
| result = 29 * result + ( pushChanges ? 1 : 0 ); |
| result = 29 * result + ( defaultDevelopmentVersion != null ? defaultDevelopmentVersion.hashCode() : 0 ); |
| result = 29 * result + ( scmRelativePathProjectDirectory != null ? scmRelativePathProjectDirectory.hashCode() : 0 ); |
| result = 29 * result + ( checkoutDirectory != null ? checkoutDirectory.hashCode() : 0 ); |
| result = 29 * result + ( performGoals != null ? performGoals.hashCode() : 0 ); |
| result = 29 * result + ( defaultReleaseVersion != null ? defaultReleaseVersion.hashCode() : 0 ); |
| result = 29 * result + ( scmReleasedPomRevision != null ? scmReleasedPomRevision.hashCode() : 0 ); |
| |
| return result; |
| } |
| ]]></code> |
| </codeSegment> |
| </codeSegments> |
| </class> |
| </classes> |
| </model> |