Skip to content

Commit

Permalink
[#14] initial draft for a Mojo.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarwell committed Apr 25, 2022
1 parent 861c4a7 commit 35e5daa
Show file tree
Hide file tree
Showing 26 changed files with 142 additions and 306 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<settingsFile>src/it/settings.xml</settingsFile>
<settingsFile>src/old_it/settings.xml</settingsFile>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
</configuration>
<executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.Parameter;

import java.io.File;
import java.text.MessageFormat;
import java.util.ResourceBundle;

Expand Down Expand Up @@ -49,6 +50,13 @@ public abstract class AbstractKeyToolMojo
@Parameter( defaultValue = "false" )
private boolean verbose;

/**
* Where to execute the keytool command.
*/
@Parameter( defaultValue = "${basedir}", required = true, alias = "workingdir" )
private File workingDirectory;


/**
* @return value of the {@link #skip} flag
*/
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@
import org.apache.maven.plugins.annotations.Parameter;

/**
* Abstract mojo to execute a {@link KeyToolRequestWithKeyStoreAndAliasParameters} request.
* Abstract mojo to execute a store with alias parameters request.
*
* @param <R> generic type of request used by the mojo
* @author tchemit <[email protected]>
* @since 1.2
*/
public abstract class AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo<R extends KeyToolRequestWithKeyStoreAndAliasParameters>
extends AbstractKeyToolRequestWithKeyStoreParametersMojo<R>
public abstract class AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo
extends AbstractKeyToolRequestWithKeyStoreParametersMojo
{
/**
* Password through protected mechanism.
Expand All @@ -48,24 +47,18 @@ public abstract class AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo<R

/**
* Constructor of abstract mojo.
*
* @param requestType type of keytool request used by the mojo
*/
protected AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo( Class<R> requestType )
protected AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo()
{
super( requestType );
}

/**
* {@inheritDoc}
*/
@Override
protected R createKeytoolRequest()
public boolean isPasswordProtected()
{
R request = super.createKeytoolRequest();
return passwordProtected;
}

request.setPasswordProtected( this.passwordProtected );
request.setAlias( this.alias );
return request;
public String getAlias()
{
return alias;
}
}
Loading

0 comments on commit 35e5daa

Please sign in to comment.