Skip to content

Commit ce0786a

Browse files
Merge branch 'release/3.12'
2 parents 9d5d869 + d4ad6b4 commit ce0786a

File tree

6 files changed

+54
-53
lines changed

6 files changed

+54
-53
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Java_Certificado [![MIT License](https://img.shields.io/github/license/Samuel-Oliveira/Java_Certificado.svg)](https://github.com/Samuel-Oliveira/Java_Certificado/blob/master/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/br.com.swconsultoria/java_certificado.svg?label=Maven%20Central)](https://search.maven.org/artifact/br.com.swconsultoria/java_certificado/3.10/jar)
1+
# Java_Certificado [![MIT License](https://img.shields.io/github/license/Samuel-Oliveira/Java_Certificado.svg)](https://github.com/Samuel-Oliveira/Java_Certificado/blob/master/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/br.com.swconsultoria/java_certificado.svg?label=Maven%20Central)](https://search.maven.org/artifact/br.com.swconsultoria/java_certificado/3.12/jar)
22

33
Projeto Java de Gerenciamentos de Certificado Digital
44

@@ -16,7 +16,7 @@ Para Iniciar :
1616
<dependency>
1717
<groupId>br.com.swconsultoria</groupId>
1818
<artifactId>java_certificado</artifactId>
19-
<version>3.10</version>
19+
<version>3.12</version>
2020
</dependency>
2121
```
2222

@@ -25,6 +25,12 @@ Veja a [Wiki](https://Samuel-Oliveira.github.io/Java_Certificado/), para ter um
2525
________________________________________________________________________________________________
2626
# Historico de Versões
2727

28+
## v3.12 - 06/07/2025
29+
- Atualizado CACERT
30+
31+
## v3.11 - 01/07/2025
32+
- Atualizado CACERT
33+
-
2834
## v3.10 - 20/06/2025
2935
- Atualizado CACERT
3036

cacert

-2.81 KB
Binary file not shown.

pom.xml

Lines changed: 40 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>br.com.swconsultoria</groupId>
44
<artifactId>java_certificado</artifactId>
5-
<version>3.12-SNAPSHOT</version>
5+
<version>3.12</version>
66
<name>Java_Certificado</name>
77
<description>Api java para gerenciamento de certificados digitais</description>
88
<url>https://github.com/Samuel-Oliveira/Java_Certificado</url>
@@ -19,26 +19,28 @@
1919
<url>https://github.com/Samuel-Oliveira/Java_Certificado</url>
2020
<connection>scm:git:[email protected]:Samuel-Oliveira/Java_Certificado.git</connection>
2121
<developerConnection>scm:git:[email protected]:Samuel-Oliveira/Java_Certificado.git</developerConnection>
22-
<tag>java_certificado-a-3.7</tag>
22+
<tag>java_certificado</tag>
2323
</scm>
2424

2525
<properties>
2626
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2727
<maven.compiler.source>1.8</maven.compiler.source>
2828
<maven.compiler.target>1.8</maven.compiler.target>
2929
<java.version>1.8</java.version>
30-
</properties>
3130

32-
<distributionManagement>
33-
<snapshotRepository>
34-
<id>sonatype-nexus</id>
35-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
36-
</snapshotRepository>
37-
<repository>
38-
<id>sonatype-nexus</id>
39-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
40-
</repository>
41-
</distributionManagement>
31+
<!-- Versões -->
32+
<commons-httpclient.version>3.1</commons-httpclient.version>
33+
<junit-jupiter-engine.version>5.13.3</junit-jupiter-engine.version>
34+
<jmockit.version>1.49</jmockit.version>
35+
<lombok.version>1.18.38</lombok.version>
36+
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
37+
<central-publishing-maven-plugin.version>0.8.0</central-publishing-maven-plugin.version>
38+
<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
39+
<maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
40+
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
41+
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
42+
<maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
43+
</properties>
4244

4345
<developers>
4446
<developer>
@@ -52,54 +54,44 @@
5254
<dependency>
5355
<groupId>commons-httpclient</groupId>
5456
<artifactId>commons-httpclient</artifactId>
55-
<version>3.1</version>
57+
<version>${commons-httpclient.version}</version>
5658
</dependency>
5759
<dependency>
5860
<groupId>org.junit.jupiter</groupId>
5961
<artifactId>junit-jupiter-engine</artifactId>
60-
<version>5.3.1</version>
62+
<version>${junit-jupiter-engine.version}</version>
6163
<scope>test</scope>
6264
</dependency>
6365
<dependency>
6466
<groupId>org.jmockit</groupId>
6567
<artifactId>jmockit</artifactId>
66-
<version>1.24</version>
68+
<version>${jmockit.version}</version>
6769
<scope>test</scope>
6870
</dependency>
6971
<dependency>
7072
<groupId>org.projectlombok</groupId>
7173
<artifactId>lombok</artifactId>
72-
<version>1.18.30</version>
74+
<version>${lombok.version}</version>
7375
<scope>provided</scope>
7476
</dependency>
7577
</dependencies>
78+
7679
<build>
7780
<finalName>${project.artifactId}-${project.version}</finalName>
7881
<plugins>
7982
<plugin>
8083
<groupId>org.apache.maven.plugins</groupId>
8184
<artifactId>maven-compiler-plugin</artifactId>
82-
<version>3.8.0</version>
85+
<version>${maven-compiler-plugin.version}</version>
8386
<configuration>
84-
<source>1.8</source>
85-
<target>1.8</target>
86-
</configuration>
87-
</plugin>
88-
<plugin>
89-
<groupId>org.sonatype.plugins</groupId>
90-
<artifactId>nexus-staging-maven-plugin</artifactId>
91-
<version>1.6.13</version>
92-
<extensions>true</extensions>
93-
<configuration>
94-
<serverId>sonatype-nexus</serverId>
95-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
96-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
87+
<source>${maven.compiler.source}</source>
88+
<target>${maven.compiler.target}</target>
9789
</configuration>
9890
</plugin>
9991
<plugin>
10092
<groupId>org.apache.maven.plugins</groupId>
10193
<artifactId>maven-gpg-plugin</artifactId>
102-
<version>1.6</version>
94+
<version>${maven-gpg-plugin.version}</version>
10395
<executions>
10496
<execution>
10597
<id>sign-artifacts</id>
@@ -110,19 +102,10 @@
110102
</execution>
111103
</executions>
112104
</plugin>
113-
<plugin>
114-
<groupId>org.apache.maven.plugins</groupId>
115-
<artifactId>maven-release-plugin</artifactId>
116-
<version>3.0.0</version>
117-
<configuration>
118-
<pushChanges>false</pushChanges>
119-
<localCheckout>true</localCheckout>
120-
</configuration>
121-
</plugin>
122105
<plugin>
123106
<groupId>org.apache.maven.plugins</groupId>
124107
<artifactId>maven-assembly-plugin</artifactId>
125-
<version>3.1.1</version>
108+
<version>${maven-assembly-plugin.version}</version>
126109
<configuration>
127110
<descriptorRefs>
128111
<descriptorRef>jar-with-dependencies</descriptorRef>
@@ -142,17 +125,17 @@
142125
<plugin>
143126
<groupId>org.apache.maven.plugins</groupId>
144127
<artifactId>maven-surefire-plugin</artifactId>
145-
<version>3.0.0</version>
128+
<version>${maven-surefire-plugin.version}</version>
146129
<configuration>
147130
<argLine>
148-
-javaagent:"${settings.localRepository}"/org/jmockit/jmockit/1.24/jmockit-1.24.jar
131+
-javaagent:"${settings.localRepository}"/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar
149132
</argLine>
150133
</configuration>
151134
</plugin>
152135
<plugin>
153136
<groupId>org.apache.maven.plugins</groupId>
154137
<artifactId>maven-source-plugin</artifactId>
155-
<version>3.2.1</version>
138+
<version>${maven-source-plugin.version}</version>
156139
<executions>
157140
<execution>
158141
<id>attach-sources</id>
@@ -165,7 +148,7 @@
165148
<plugin>
166149
<groupId>org.apache.maven.plugins</groupId>
167150
<artifactId>maven-javadoc-plugin</artifactId>
168-
<version>3.5.0</version>
151+
<version>${maven-javadoc-plugin.version}</version>
169152
<executions>
170153
<execution>
171154
<id>attach-javadocs</id>
@@ -178,6 +161,16 @@
178161
<failOnError>false</failOnError>
179162
</configuration>
180163
</plugin>
164+
<plugin>
165+
<groupId>org.sonatype.central</groupId>
166+
<artifactId>central-publishing-maven-plugin</artifactId>
167+
<version>${central-publishing-maven-plugin.version}</version>
168+
<extensions>true</extensions>
169+
<configuration>
170+
<publishingServerId>central</publishingServerId>
171+
<autoPublish>true</autoPublish>
172+
</configuration>
173+
</plugin>
181174
</plugins>
182175
</build>
183-
</project>
176+
</project>

src/main/java/br/com/swconsultoria/certificado/CertificadoService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public static void inicializaCertificado(Certificado certificado, InputStream ca
6262

6363
log.info(String.format("JAVA-CERTIFICADO | Samuel Oliveira | [email protected] " +
6464
"| VERSAO=%s | DATA_VERSAO=%s | CNPJ/CPF=%s | VENCIMENTO=%s | ALIAS=%s | TIPO=%s | CAMINHO=%s | CACERT=%s | SSL=%s | Multithreading=%s",
65-
"3.10",
66-
"20/06/2025",
65+
"3.12",
66+
"06/07/2025",
6767
certificado.getCnpjCpf(),
6868
certificado.getDataHoraVencimento(),
6969
certificado.getNome().toUpperCase(),

src/main/java/br/com/swconsultoria/certificado/util/CacertUtil.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
import javax.net.ssl.*;
77
import java.io.*;
8+
import java.nio.file.Files;
9+
import java.nio.file.Paths;
810
import java.security.*;
911
import java.security.cert.CertificateEncodingException;
1012
import java.security.cert.CertificateException;
@@ -38,14 +40,14 @@ public static void main(String[] args) {
3840
char[] senha = SENHA_PADRAO_CACERT.toCharArray();
3941
File arquivoCacert = new File(PASTA_JAVA + "/jre/lib/security/cacerts");
4042

41-
InputStream in = new FileInputStream(arquivoCacert);
43+
InputStream in = Files.newInputStream(arquivoCacert.toPath());
4244
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
4345
ks.load(in, senha);
4446
in.close();
4547

4648
lista.forEach(endereco -> get(endereco, ks));
4749

48-
OutputStream out = new FileOutputStream(CacertUtil.DESTINO_CACERT);
50+
OutputStream out = Files.newOutputStream(Paths.get(CacertUtil.DESTINO_CACERT));
4951
ks.store(out, senha);
5052
out.close();
5153

src/main/resources/cacert

-2.81 KB
Binary file not shown.

0 commit comments

Comments
 (0)