Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Commit 078d813

Browse files
authored
Merge pull request #19 from zlamalp/bump
Updated all possible dependencies to the latest versions
2 parents d5eb00d + 38de12c commit 078d813

File tree

5 files changed

+95
-62
lines changed

5 files changed

+95
-62
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ After creating properties file, add following properties in it:
4141
* `member_identifier` type of identifier you use in input files to identifier user
4242
* `allow_delete` true/false value determine, if users missing in input file are deleted from domain or just suspended
4343
* `allow_delete_teamdrive` true/false value determine, if TeamDrive is deleted when missing in input file or just all permissions are removed
44+
* `dry_run` true/false value determine, if this tool performs only READ or READ/WRITE operations with Gooogle API. If true, WRITE actions are logged, but not actually performed.
4445

4546
Your properties file should look like this:
4647

@@ -51,6 +52,7 @@ service_account_pkcs12_file_path=/etc/perun/name_of_your_p12_file
5152
scopes=https://www.googleapis.com/auth/admin.directory.group,https://www.googleapis.com/auth/admin.directory.orgunit,https://www.googleapis.com/auth/admin.directory.user,https://www.googleapis.com/auth/groups,https://www.googleapis.com/auth/userinfo.email
5253
member_identifier=id
5354
allow_delete=false
55+
dry_run=false
5456
```
5557

5658
## Usage
@@ -114,11 +116,11 @@ Second argument is type of action: "users", "groups" or "teamDrives".
114116
Third argument is path to CSV file (users, groups or teamDrives - depending on action)
115117

116118
```
117-
java -jar ./GoogleGroupConnector-2.0.0.jar DOMAIN ACTION PATH_TO_CSV_FILE
119+
java -jar ./google-group-connector-2.0.0.jar DOMAIN ACTION PATH_TO_CSV_FILE
118120
```
119121

120122
By default, application logs to console. You can change default logging by passing own logback configuration.
121123

122124
```$xslt
123-
java -Dlogback.configurationFile=file:///etc/perun/logback-google-groups.xml -jar ./GoogleGroupConnector-2.0.0.jar DOMAIN ACTION PATH_TO_CSV_FILE
125+
java -Dlogback.configurationFile=file:///etc/perun/logback-google-groups.xml -jar ./google-group-connector-2.0.0.jar DOMAIN ACTION PATH_TO_CSV_FILE
124126
```

pom.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55

66
<groupId>cz.metacentrum.perun.core</groupId>
7-
<artifactId>GoogleGroupConnector</artifactId>
7+
<artifactId>google-group-connector</artifactId>
88
<version>2.0.0</version>
99
<packaging>jar</packaging>
1010

@@ -22,14 +22,14 @@
2222
<!-- Build an executable JAR -->
2323
<groupId>org.apache.maven.plugins</groupId>
2424
<artifactId>maven-jar-plugin</artifactId>
25-
<version>3.0.2</version>
25+
<version>3.2.0</version>
2626
</plugin>
2727

2828
<!-- Package JAR with Main class and all libraries -->
2929
<plugin>
3030
<groupId>org.apache.maven.plugins</groupId>
3131
<artifactId>maven-shade-plugin</artifactId>
32-
<version>3.0.0</version>
32+
<version>3.2.4</version>
3333
<configuration>
3434
<createDependencyReducedPom>false</createDependencyReducedPom>
3535
</configuration>
@@ -55,7 +55,7 @@
5555
<plugin>
5656
<groupId>org.codehaus.mojo</groupId>
5757
<artifactId>exec-maven-plugin</artifactId>
58-
<version>1.6.0</version>
58+
<version>3.0.0</version>
5959
<executions>
6060
<execution>
6161
<goals>
@@ -75,32 +75,32 @@
7575
<dependency>
7676
<groupId>com.google.apis</groupId>
7777
<artifactId>google-api-services-admin-directory</artifactId>
78-
<version>directory_v1-rev91-1.23.0</version>
78+
<version>directory_v1-rev118-1.25.0</version>
7979
</dependency>
8080
<dependency>
8181
<groupId>com.google.apis</groupId>
8282
<artifactId>google-api-services-drive</artifactId>
83-
<version>v3-rev101-1.23.0</version>
83+
<version>v3-rev197-1.25.0</version>
8484
</dependency>
8585
<dependency>
8686
<groupId>com.google.http-client</groupId>
8787
<artifactId>google-http-client-jackson2</artifactId>
88-
<version>1.23.0</version>
88+
<version>1.35.0</version>
8989
</dependency>
9090
<dependency>
9191
<groupId>com.google.api-client</groupId>
9292
<artifactId>google-api-client</artifactId>
93-
<version>1.23.0</version>
93+
<version>1.30.9</version>
9494
</dependency>
9595
<dependency>
9696
<groupId>com.opencsv</groupId>
9797
<artifactId>opencsv</artifactId>
98-
<version>4.1</version>
98+
<version>5.2</version>
9999
</dependency>
100100
<dependency>
101101
<groupId>org.apache.commons</groupId>
102102
<artifactId>commons-lang3</artifactId>
103-
<version>3.7</version>
103+
<version>3.10</version>
104104
</dependency>
105105
<dependency>
106106
<groupId>ch.qos.logback</groupId>

src/main/java/cz/metacentrum/perun/googlegroupconnector/GoogleGroupsConnection.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ public interface GoogleGroupsConnection {
3232
* Build and return an authorized Drive client service.
3333
*
3434
* @return an authorized Drive client service
35-
* @throws IOException
3635
*/
37-
Drive getDriveService() throws IOException;
36+
Drive getDriveService();
3837

3938

4039
}

src/main/java/cz/metacentrum/perun/googlegroupconnector/GoogleGroupsConnectionImpl.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
* email and user email filled in.
3333
*
3434
* @author Sona Mastrakova <sona.mastrakova@gmail.com>
35-
* @date 29.7.2015
3635
*/
3736
public class GoogleGroupsConnectionImpl implements GoogleGroupsConnection {
3837

@@ -73,7 +72,7 @@ public Directory getDirectoryService() {
7372
}
7473

7574
@Override
76-
public Drive getDriveService() throws IOException {
75+
public Drive getDriveService() {
7776
return new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, authorize()).setApplicationName(APPLICATION_NAME).build();
7877
}
7978

@@ -125,7 +124,7 @@ private void loadProperties() throws IOException, GeneralSecurityException {
125124
try {
126125
input.close();
127126
} catch (IOException ex) {
128-
log.error("Problem with I/O operation while closing file \'" + PROPERTIES_PATH + "\'.", ex);
127+
log.error("Problem with I/O operation while closing file '" + PROPERTIES_PATH + "'.", ex);
129128
}
130129
}
131130
}

0 commit comments

Comments
 (0)