Line 1... |
Line 1... |
1 |
/* */ package net.brutex.xservices.util;
|
1 |
/* */ package net.brutex.xservices.util;
|
2 |
/* */
|
2 |
/* */
|
3 |
/* */ import java.io.File;
|
3 |
/* */ import java.io.File;
|
4 |
/* */ import net.brutex.xservices.types.scm.ItemType;
|
4 |
/* */ import net.brutex.xservices.types.scm.ItemType;
|
5 |
/* */ import net.brutex.xservices.ws.rs.CVSInfoImpl;
|
5 |
import net.brutex.xservices.util.CVSRoot;
|
- |
|
6 |
|
6 |
/* */ import org.apache.commons.configuration.Configuration;
|
7 |
import org.apache.commons.configuration2.PropertiesConfiguration;
|
7 |
/* */ import org.apache.commons.configuration.ConfigurationException;
|
8 |
import org.apache.commons.configuration2.builder.fluent.Configurations;
|
8 |
/* */ import org.apache.commons.configuration.PropertiesConfiguration;
|
9 |
import org.apache.commons.configuration2.ex.ConfigurationException;
|
- |
|
10 |
import org.apache.logging.log4j.LogManager;
|
9 |
/* */ import org.apache.log4j.Logger;
|
11 |
import org.apache.logging.log4j.Logger;
|
10 |
/* */ import org.netbeans.lib.cvsclient.Client;
|
12 |
/* */ import org.netbeans.lib.cvsclient.Client;
|
11 |
/* */ import org.netbeans.lib.cvsclient.admin.StandardAdminHandler;
|
13 |
/* */ import org.netbeans.lib.cvsclient.admin.StandardAdminHandler;
|
12 |
/* */ import org.netbeans.lib.cvsclient.command.CommandAbortedException;
|
14 |
/* */ import org.netbeans.lib.cvsclient.command.CommandAbortedException;
|
13 |
/* */ import org.netbeans.lib.cvsclient.command.GlobalOptions;
|
15 |
/* */ import org.netbeans.lib.cvsclient.command.GlobalOptions;
|
14 |
/* */ import org.netbeans.lib.cvsclient.connection.AuthenticationException;
|
16 |
/* */ import org.netbeans.lib.cvsclient.connection.AuthenticationException;
|
Line 18... |
Line 20... |
18 |
/* */ {
|
20 |
/* */ {
|
19 |
/* */ private final File configfile;
|
21 |
/* */ private final File configfile;
|
20 |
/* */ private final PServerConnection connection;
|
22 |
/* */ private final PServerConnection connection;
|
21 |
/* */ private final CVSRoot root;
|
23 |
/* */ private final CVSRoot root;
|
22 |
/* */ private final GlobalOptions globalOptions;
|
24 |
/* */ private final GlobalOptions globalOptions;
|
23 |
/* 41 */ final Logger logger = Logger.getLogger(CVSInfoImpl.class);
|
25 |
/* 41 */ final Logger logger = LogManager.getLogger();
|
24 |
/* */ public final Client client;
|
26 |
/* */ public final Client client;
|
25 |
/* */
|
27 |
/* */
|
26 |
/* */ public Client getClient()
|
28 |
/* */ public Client getClient()
|
27 |
/* */ {
|
29 |
/* */ {
|
28 |
/* 49 */ return this.client;
|
30 |
/* 49 */ return this.client;
|
Line 32... |
Line 34... |
32 |
/* 53 */ System.setProperty("cvsClientLog", "c:/temp/cvs.log");
|
34 |
/* 53 */ System.setProperty("cvsClientLog", "c:/temp/cvs.log");
|
33 |
/* 54 */ if ((config == null) || (!config.exists()) || (config.isDirectory())) {
|
35 |
/* 54 */ if ((config == null) || (!config.exists()) || (config.isDirectory())) {
|
34 |
/* 55 */ throw new ConfigurationException("Config file not found");
|
36 |
/* 55 */ throw new ConfigurationException("Config file not found");
|
35 |
/* */ }
|
37 |
/* */ }
|
36 |
/* 57 */ this.configfile = config;
|
38 |
/* 57 */ this.configfile = config;
|
- |
|
39 |
Configurations configs = new Configurations();
|
- |
|
40 |
|
37 |
/* 58 */ Configuration configuration = new PropertiesConfiguration(this.configfile);
|
41 |
/* 58 */ PropertiesConfiguration configuration = configs.properties(this.configfile);
|
38 |
/* */
|
42 |
/* */
|
39 |
/* 60 */ String cvsroot = configuration.getString("CVSROOT");
|
43 |
/* 60 */ String cvsroot = configuration.getString("CVSROOT");
|
40 |
/* 61 */ String workdir = configuration.getString("WORKDIR");
|
44 |
/* 61 */ String workdir = configuration.getString("WORKDIR");
|
41 |
/* 62 */ String password = configuration.getString("PASSWORD");
|
45 |
/* 62 */ String password = configuration.getString("PASSWORD");
|
42 |
/* */
|
46 |
/* */
|