Skip to content

Commit

Permalink
fix(jans-client-api): remove jans-config-api dependency and solve wro…
Browse files Browse the repository at this point in the history
…ng test dependencies (#1737)
  • Loading branch information
jmunozherbas authored Jul 8, 2022
1 parent d27755c commit 97dbe9c
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 53 deletions.
2 changes: 1 addition & 1 deletion jans-client-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ mvn test -Djans.base=/etc/jans
`Djans.base` is the conf path of the local running `jans-auth-server`
### Running tests with external jans-client-api
```
mvn test -Dtest.client.api.url=http://localhost:9999/jans-client-api-server/
mvn test -Dmaven.test.skip=false -Dtest.client.api.url=http://localhost:9999/jans-client-api-server/
```
`Dtest.client.api.url` is the url of a running `jans-client-api-server`

Expand Down
37 changes: 24 additions & 13 deletions jans-client-api/gen-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,30 @@
</plugins>
</build>
</profile>
<profile>
<id>test-dependencies</id>
<activation>
<property>
<name>maven.test.skip</name>
<value>false</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-client-api-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>

<dependencies>
Expand All @@ -225,19 +249,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-client-api-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
18 changes: 4 additions & 14 deletions jans-client-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<guava.version>31.1-jre</guava.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<jans.version>1.0.1</jans.version>
<jans.version>1.0.2-SNAPSHOT</jans.version>
<weld.version>4.0.3.Final</weld.version>
<jetty.version>11.0.8</jetty.version>
<org.jboss.resteasy.client.microprofile.version>4.7.5.Final</org.jboss.resteasy.client.microprofile.version>
Expand Down Expand Up @@ -90,9 +90,9 @@
</repositories>

<scm>
<url>https://github.com/JanssenProject/jans-config-api</url>
<connection>scm:git:git://github.com/JanssenProject/jans-config-api.git</connection>
<developerConnection>scm:git:git@github.com:v/jans-config-api.git</developerConnection>
<url>https://github.com/JanssenProject/jans-client-api</url>
<connection>scm:git:git://github.com/JanssenProject/jans-client-api.git</connection>
<developerConnection>scm:git:git@github.com:v/jans-client-api.git</developerConnection>
</scm>

<dependencyManagement>
Expand Down Expand Up @@ -136,16 +136,6 @@
<artifactId>jans-client-api-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-config-api-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-config-api-shared</artifactId>
<version>${jans.version}</version>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-core-server</artifactId>
Expand Down
40 changes: 25 additions & 15 deletions jans-client-api/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@
<groupId>io.jans</groupId>
<artifactId>jans-core-service</artifactId>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-config-api-common</artifactId>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-config-api-shared</artifactId>
</dependency>

<dependency>
<groupId>io.jans</groupId>
Expand All @@ -104,13 +96,7 @@
<artifactId>jans-client-api-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-client-api-common</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-client-api</artifactId>
Expand Down Expand Up @@ -836,5 +822,29 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>test-dependencies</id>
<activation>
<property>
<name>maven.test.skip</name>
<value>false</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-client-api-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import io.jans.ca.server.persistence.modal.OrganizationBranch;
import io.jans.ca.server.persistence.modal.RpObject;
import io.jans.ca.server.service.MigrationService;
import io.jans.configapi.model.status.StatsData;
import io.jans.orm.PersistenceEntryManager;
import io.jans.orm.exception.EntryPersistenceException;
import io.jans.orm.model.base.SimpleBranch;
Expand Down Expand Up @@ -49,7 +48,6 @@ public class MainPersistenceService implements PersistenceService {
@Inject
Logger logger;

private StatsData statsData;
private static final String BASE_DN = "o=jans";
private static final String OU_CONFIGURATION = "configuration";
private static final String OU_JANS_CLIENT_API = "jans-client-api";
Expand Down Expand Up @@ -86,14 +84,6 @@ public String getPersistenceType() {
return configurationFactory.getBaseConfiguration().getString("persistence.type");
}

public StatsData getStatsData() {
return statsData;
}

public void setStatsData(StatsData statsData) {
this.statsData = statsData;
}

public void create() {
logger.debug("Creating JansPersistence for Api Client...");
try {
Expand Down

0 comments on commit 97dbe9c

Please sign in to comment.