Skip to content
Permalink
Browse files
Fix typos: "detatch" -> "detach".
  • Loading branch information
garydgregory committed Feb 14, 2018
1 parent 383f243 commit 7cce8cb29d76e6642e65d67a44f647c20d80bbb7
Showing 2 changed files with 11 additions and 11 deletions.
@@ -50,7 +50,7 @@ public class CommonsDistributionDetachmentMojo extends AbstractMojo {
/**
* A list of "artifact types" in the maven vernacular, to
* be detached from the deployment. For the time being we want
* all artifacts generated by the maven-assembly-plugin to be detatched
* all artifacts generated by the maven-assembly-plugin to be detached
* from the deployment, namely *-src.zip, *-src.tar.gz, *-bin.zip,
* *-bin.tar.gz, and the corresponding .asc pgp signatures.
*/
@@ -66,9 +66,9 @@ public class CommonsDistributionDetachmentMojo extends AbstractMojo {

/**
* This list is supposed to hold the maven references to the aformentioned artifacts so that we
* can upload them to svn after they've been detatched from the maven deployment.
* can upload them to svn after they've been detached from the maven deployment.
*/
private List<Artifact> detatchedArtifacts = new ArrayList<>();
private List<Artifact> detachedArtifacts = new ArrayList<>();

/**
* The maven project context injection so that we can get a hold of the variables at hand.
@@ -93,10 +93,10 @@ public void execute() throws MojoExecutionException {
getLog().info("Detatching Assemblies");
for (Object attachedArtifact : project.getAttachedArtifacts()) {
if (ARTIFACT_TYPES_TO_DETATCH.contains(((Artifact) attachedArtifact).getType())) {
detatchedArtifacts.add((Artifact) attachedArtifact);
detachedArtifacts.add((Artifact) attachedArtifact);
}
}
for (Artifact artifactToRemove : detatchedArtifacts) {
for (Artifact artifactToRemove : detachedArtifacts) {
project.getAttachedArtifacts().remove(artifactToRemove);
}
if (!workingDirectory.exists()) {
@@ -116,8 +116,8 @@ public void execute() throws MojoExecutionException {
*/
private void copyRemovedArtifactsToWorkingDirectory() throws MojoExecutionException {
StringBuffer copiedArtifactAbsolutePath;
getLog().info("Copying detatched artifacts to working directory.");
for (Artifact artifact: detatchedArtifacts) {
getLog().info("Copying detached artifacts to working directory.");
for (Artifact artifact: detachedArtifacts) {
File artifactFile = artifact.getFile();
copiedArtifactAbsolutePath = new StringBuffer(workingDirectory.getAbsolutePath());
copiedArtifactAbsolutePath.append("/");
@@ -137,7 +137,7 @@ private void copyRemovedArtifactsToWorkingDirectory() throws MojoExecutionExcept
* properly wrapped so that maven can handle it.
*/
private void sha1AndMd5SignArtifacts() throws MojoExecutionException {
for (Artifact artifact : detatchedArtifacts) {
for (Artifact artifact : detachedArtifacts) {
if (!artifact.getFile().getName().contains("asc")) {
try {
FileInputStream artifactFileInputStream = new FileInputStream(artifact.getFile());
@@ -44,7 +44,7 @@ protected void after() {
}
};

private CommonsDistributionDetachmentMojo detatchmentMojo;
private CommonsDistributionDetachmentMojo detachmentMojo;

private CommonsDistributionStagingMojo mojoForTest;

@@ -57,8 +57,8 @@ public void testSuccess() throws Exception {
assertNotNull(detachmentPom);
assertTrue(detachmentPom.exists());
mojoForTest = (CommonsDistributionStagingMojo) rule.lookupMojo("stage-distributions", testPom);
detatchmentMojo = (CommonsDistributionDetachmentMojo) rule.lookupMojo("detach-distributions", detachmentPom);
detatchmentMojo.execute();
detachmentMojo = (CommonsDistributionDetachmentMojo) rule.lookupMojo("detach-distributions", detachmentPom);
detachmentMojo.execute();
File releaseNotesBasedir = new File("src/test/resources/mojos/stage-distributions/");
mojoForTest.setBasedir(releaseNotesBasedir);
mojoForTest.execute();

0 comments on commit 7cce8cb

Please sign in to comment.