Skip to content

Commit

Permalink
#9: Make parameters unique for clean-server goal
Browse files Browse the repository at this point in the history
  • Loading branch information
jgawor committed Feb 24, 2016
1 parent b4fcf43 commit ddf78c9
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 59 deletions.
102 changes: 51 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Collection of Maven plugins and archetypes for managing WebSphere Application Se
* [run-server](#run-server)
* [stop-server](#stop-server)
* [package-server](#package-server)
* [clean-server](#clean-server)
* [dump-server](#dump-server)
* [java-dump-server](#java-dump-server)
* [deploy](#deploy)
Expand Down Expand Up @@ -479,6 +480,56 @@ Example:
</plugin>
```

##### clean-server
---
Deletes every file in the `${outputDirectory}/logs`, `${outputDirectory}/workarea`, `${userDirectory}/dropins` or `${userDirectory}/apps`.

###### Additional Parameters

| Parameter | Description | Required |
| --------- | ------------ | ----------|
| cleanLogs | Delete all the files in the `${outputDirectory}/logs` directory. The default value is `true`. | No |
| cleanWorkarea | Delete all the files in the `${outputDirectory}/workarea` directory. The default value is `true`. | No |
| cleanDropins | Delete all the files in the `${userDirectory}/dropins` directory. The default value is `false`. | No |
| cleanApps | Delete all the files in the `${userDirectory}/apps` directory. The default value is `false`. | No |

###### Examples

Remove every app deployed to the `${userDirectory}/dropins` and every file in the `${outputDirectory}/workarea` and `${outputDirectory}/logs` directories.

```xml
<project>
...
<build>
<plugins>
<plugin>
<groupId>net.wasdev.wlp.maven.plugins</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<executions>
...
<execution>
<id>clean</id>
<phase>post-integration-test</phase>
<goals>
<goal>clean-server</goal>
</goals>
<configuration>
<cleanDropins>true</dropins>
</configuration>
</execution>
...
</executions>
<configuration>
<installDirectory>/opt/ibm/wlp</installDirectory>
<serverName>test</serverName>
</configuration>
</plugin>
</plugins>
</build>
...
</project>
```

##### dump-server
---
Dump diagnostic information from the server into an archive.
Expand Down Expand Up @@ -864,57 +915,6 @@ Example:
</project>
```

##### clean-goal
---

The `clean` goal deletes every file in the `${outputDirectory}/logs`, `${outputDirectory}/workarea`, `${userDirectory}/dropins` or `${userDirectory}/apps`.

###### Additional Parameters

| Parameter | Description | Required |
| --------- | ------------ | ----------|
| logs | Delete all the files in the `${outputDirectory}/logs` directory. The default value is `true`. | No |
| workarea | Delete all the files in the `${outputDirectory}/workarea` directory. The default value is `true`. | No |
| dropins | Delete all the files in the `${userDirectory}/dropins` directory. The default value is `false`. | No |
| apps | Delete all the files in the `${userDirectory}/apps` directory. The default value is `false`. | No |

###### Examples

Remove every app deployed to the `${userDirectory}/dropins` and every file in the `${outputDirectory}/workarea` and `${outputDirectory}/logs` directories.

```xml
<project>
...
<build>
<plugins>
<plugin>
<groupId>net.wasdev.wlp.maven.plugins</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<executions>
...
<execution>
<id>clean</id>
<phase>post-integration-test</phase>
<goals>
<goal>clean-server</goal>
</goals>
<configuration>
<dropins>true</dropins>
</configuration>
</execution>
...
</executions>
<configuration>
<installDirectory>/opt/ibm/wlp</installDirectory>
<serverName>test</serverName>
</configuration>
</plugin>
</plugins>
</build>
...
</project>
```

## Packaging types

### liberty-assembly
Expand Down
6 changes: 3 additions & 3 deletions liberty-maven-plugin/src/it/tests/basic-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@
<goal>clean-server</goal>
</goals>
<configuration>
<dropins>true</dropins>
<apps>true</apps>
<cleanDropins>true</cleanDropins>
<cleanApps>true</cleanApps>
</configuration>
</execution>
<execution>
Expand Down Expand Up @@ -215,4 +215,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2015.
* (C) Copyright IBM Corporation 2016.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,25 +27,25 @@ public class CleanServerMojo extends StartDebugMojoSupport {

/**
* Clean the logs directory.
* @parameter expression="${logs}" default-value="true"
* @parameter expression="${cleanLogs}" default-value="true"
*/
private boolean logs = true;

/**
* Clean the workarea directory.
* @parameter expression="${workarea}" default-value="true"
* @parameter expression="${cleanWorkarea}" default-value="true"
*/
private boolean workarea = true;

/**
* Clean the dropins directory.
* @parameter expression="${dropins}" default-value="false"
* @parameter expression="${cleanDropins}" default-value="false"
*/
private boolean dropins = false;

/**
* Clean the apps directory.
* @parameter expression="${apps}" default-value="false"
* @parameter expression="${cleanApps}" default-value="false"
*/
private boolean apps = false;

Expand Down

0 comments on commit ddf78c9

Please sign in to comment.