Fixed dependencies

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-dashboard-harvester-se-plugin@174562 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2018-12-05 08:52:19 +00:00
parent 3923486937
commit a0f5cc0331
2 changed files with 92 additions and 4 deletions

56
pom.xml
View File

@ -52,6 +52,12 @@
<artifactId>smart-executor-api</artifactId>
<version>[1.5.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@ -64,6 +70,11 @@
<version>[1.3.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-encryption</artifactId>
@ -95,6 +106,12 @@
<artifactId>home-library-jcr</artifactId>
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.gcube.resources</groupId>
<artifactId>common-gcore-resources</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
@ -104,19 +121,44 @@
<scope>compile</scope>
</dependency>
<!-- Dependencies force to provided -->
<dependency>
<groupId>org.gcube.resources.discovery</groupId>
<artifactId>ic-client</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.resources</groupId>
<artifactId>registry-publisher</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.resources</groupId>
<artifactId>common-gcore-resources</artifactId>
<scope>provided</scope>
</dependency>
<!-- END Dependencies force to provided -->
<dependency>
<groupId>org.gcube.resources.discovery</groupId>
<artifactId>ic-client</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.gcube.resources</groupId>
<artifactId>common-gcore-resources</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.gcube.resources</groupId>
<artifactId>registry-publisher</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@ -135,6 +177,12 @@
<groupId>org.gcube.accounting</groupId>
<artifactId>accounting-lib</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>

View File

@ -34,6 +34,10 @@ import org.gcube.dataharvest.utils.ContextTest;
import org.gcube.dataharvest.utils.DateUtils;
import org.gcube.dataharvest.utils.Utils;
import org.gcube.resourcemanagement.support.server.managers.context.ContextManager;
import org.gcube.vremanagement.executor.api.rest.SmartExecutor;
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
import org.gcube.vremanagement.executor.client.SmartExecutorClientFactory;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -115,6 +119,42 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
}
}
@Test
public void launchPluginOnSmartExecutor() {
try {
Utils.setContext(ROOT);
SmartExecutor smartExecutor = SmartExecutorClientFactory.create(DataHarvestPluginDeclaration.NAME);
Assert.assertNotNull(smartExecutor);
Map<String,Object> inputs = new HashMap<>();
AggregationType aggregationType = AggregationType.MONTHLY;
inputs.put(AccountingDataHarvesterPlugin.MEASURE_TYPE_INPUT_PARAMETER, aggregationType.name());
inputs.put(AccountingDataHarvesterPlugin.GET_VRE_USERS_INPUT_PARAMETER, true);
inputs.put(AccountingDataHarvesterPlugin.RERUN_INPUT_PARAMETER, true);
inputs.put(AccountingDataHarvesterPlugin.DRY_RUN_INPUT_PARAMETER, true);
/*
Calendar from = DateUtils.getStartCalendar(2016, Calendar.SEPTEMBER, 1);
String fromDate = DateUtils.LAUNCH_DATE_FORMAT.format(from.getTime());
logger.trace("{} is {}", AccountingDataHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate);
inputs.put(AccountingDataHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate);
*/
LaunchParameter launchParameter = new LaunchParameter(DataHarvestPluginDeclaration.NAME, inputs);
smartExecutor.launch(launchParameter);
logger.info("End.");
} catch(Exception e) {
logger.error("", e);
}
}
// @Test
public void launchOldData() {
try {