Skip to content

Commit 1b6bb18

Browse files
Merge pull request #324 from Samuel-Oliveira/develop
Develop
2 parents c30ad0c + 9e62394 commit 1b6bb18

File tree

411 files changed

+11877
-194523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+11877
-194523
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Liberar nova versão Maven
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Release version'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
release:
13+
name: Build, Test and Release
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Setup Java 8
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: '8'
27+
distribution: 'temurin'
28+
cache: maven
29+
30+
- name: Set release version
31+
run: |
32+
VERSION="${{ github.event.inputs.version }}"
33+
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
34+
mvn versions:set -DnewVersion=$VERSION
35+
mvn versions:commit
36+
37+
- name: Build and test with Java 8
38+
run: |
39+
mvn clean compile test -B
40+
41+
- name: Setup Maven settings.xml
42+
run: |
43+
mkdir -p ~/.m2
44+
cat > ~/.m2/settings.xml << 'EOF'
45+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
46+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
47+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
48+
<servers>
49+
<server>
50+
<id>central</id>
51+
<username>${{ secrets.MAVEN_CENTRAL_USERNAME }}</username>
52+
<password>${{ secrets.MAVEN_CENTRAL_PASSWORD }}</password>
53+
</server>
54+
</servers>
55+
</settings>
56+
EOF
57+
58+
- name: Setup GPG
59+
env:
60+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
61+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
62+
run: |
63+
# Import GPG key
64+
echo "$GPG_PRIVATE_KEY" | gpg --batch --import
65+
66+
# Configure GPG for non-interactive mode
67+
echo "use-agent" >> ~/.gnupg/gpg.conf
68+
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
69+
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
70+
71+
# Restart GPG agent
72+
gpgconf --kill gpg-agent || true
73+
gpgconf --launch gpg-agent
74+
75+
# Get the key ID and verify it's the correct one
76+
GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | grep "1F93637480018AD7" | head -1 | awk '{print $2}' | cut -d'/' -f2)
77+
echo "GPG_KEY_ID=$GPG_KEY_ID" >> $GITHUB_ENV
78+
echo "Using GPG Key ID: $GPG_KEY_ID"
79+
80+
# Test signing
81+
echo "test signing" | gpg --clearsign --armor --pinentry-mode loopback --batch --passphrase "$GPG_PASSPHRASE" --default-key "1F93637480018AD7"
82+
83+
- name: Deploy to Maven Central Portal
84+
env:
85+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
86+
run: |
87+
export GPG_TTY=$(tty)
88+
git config user.name "github-actions[bot]"
89+
git config user.email "github-actions[bot]@users.noreply.github.com"
90+
mvn deploy -B --no-transfer-progress
91+
92+
- name: Create GitHub Release
93+
if: success()
94+
uses: softprops/action-gh-release@v2
95+
with:
96+
tag_name: v${{ env.RELEASE_VERSION }}
97+
name: Release v${{ env.RELEASE_VERSION }}
98+
body_path: CHANGELOG.md
99+
draft: false
100+
prerelease: false
101+
files: |
102+
target/paf-nfce-${{ env.RELEASE_VERSION }}.jar
103+
target/paf-nfce-${{ env.RELEASE_VERSION }}-sources.jar
104+
target/paf-nfce-${{ env.RELEASE_VERSION }}-javadoc.jar

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010

1111
package:
12-
runs-on: ubuntu-24.04
12+
runs-on: ubuntu-latest
1313
name: Empacotar executavel
1414
steps:
1515
- uses: actions/checkout@v2

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
21
target/
32
.idea/
43
*.iml
54
/target/
6-
/src/test/java/br/com/swconsultoria/nfe/teste/

CHANGELOG.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# Notas de versão
2-
- Alterado URLs Consulta Cadastro AM
3-
- Alterado URLs QRCode GO
4-
- Alterado URLs ConsultaNFCe RN
5-
- Atualizado Layout RT com Nota Técnica 2025.002.v.1.20
6-
- Adicionado Impressao de NFe, NFCe e CCe : https://github.com/Samuel-Oliveira/Java_NFe/wiki/14-:-Impressao
2+
- Atualizado Schema Reforma Tributaria
3+
- Remoçao de classes duplicadas
4+
- Reforacao JAXB

README.md

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Java-NFe [![MIT License](https://img.shields.io/github/license/Samuel-Oliveira/Java_NFe.svg) ](https://github.com/Samuel-Oliveira/Java_NFe/blob/master/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/br.com.swconsultoria/java-nfe.svg?label=Maven%20Central)](https://search.maven.org/artifact/br.com.swconsultoria/java-nfe/4.00.41/jar)
1+
# Java-NFe [![MIT License](https://img.shields.io/github/license/Samuel-Oliveira/Java_NFe.svg) ](https://github.com/Samuel-Oliveira/Java_NFe/blob/master/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/br.com.swconsultoria/java-nfe.svg?label=Maven%20Central)](https://search.maven.org/artifact/br.com.swconsultoria/java-nfe/4.00.42/jar)
22
Biblioteca Java para consumo do WebService de NFe/NFCe
33

44
### Powered by
@@ -22,7 +22,7 @@ Para Iniciar :
2222
<dependency>
2323
<groupId>br.com.swconsultoria</groupId>
2424
<artifactId>java-nfe</artifactId>
25-
<version>4.00.41</version>
25+
<version>4.00.42</version>
2626
</dependency>
2727
```
2828

@@ -34,7 +34,7 @@ repositories {
3434
}
3535
}
3636
dependencies {
37-
implementation "br.com.swconsultoria:java-nfe:4.00.41"
37+
implementation "br.com.swconsultoria:java-nfe:4.00.42"
3838
}
3939
```
4040

@@ -43,31 +43,7 @@ Veja a Wiki https://github.com/Samuel-Oliveira/Java_NFe/wiki, para ter um Tutori
4343
________________________________________________________________________________________________
4444
# 🚨 Atenção — Reforma Tributária na NF-e / NFC-e
4545

46-
Foram adicionadas as classes com o **layout da Reforma Tributária**.
47-
Para garantir que não haja impacto nos sistemas em produção, **todas as novas classes estão isoladas** no seguinte pacote: br.com.swconsultoria.nfe.schema_rt.nfe
48-
49-
---
50-
51-
## 🧠 O que muda?
52-
53-
A reforma, neste momento, afeta apenas as seguintes funções:
54-
55-
- 🔍 `consultaRecibo` — Consulta NF-e / NFC-e Assíncrona
56-
- 🧾 `montaNfe` — Montagem, Assinatura e Validação do XML
57-
- 🚀 `enviarNfe` — Envio de NF-e / NFC-e
58-
59-
Para utilizar essas funções adaptadas à Reforma Tributária, utilize a classe: **NfeRT**
60-
61-
---
62-
63-
## 📦 Schemas XSD
64-
65-
Foi adicionado um arquivo ZIP com os novos schemas: **schemas_rt.zip**
66-
67-
**Importante:**
68-
Esse arquivo deve ser **extraído na mesma pasta dos schemas atuais**, sobrescrevendo-os temporariamente **apenas se você deseja testar o novo layout da Reforma Tributária**.
69-
70-
---
46+
Foram adicionadas as classes com o **layout da Reforma Tributária** a partir da versao 4.00.42.
7147

7248
## 🗓️ Cronograma de Implantação da Reforma Tributária (NF-e / NFC-e)
7349

@@ -97,6 +73,11 @@ ________________________________________________________________________________
9773

9874
# Historico de Versões
9975

76+
## v4.00.42 - 31/08/2025 - Schemas PL.010b (v1.1)
77+
- Atualizado Schema Reforma Tributaria
78+
- Remoçao de classes duplicadas
79+
- Reforacao JAXB
80+
10081
## v4.00.41 - 31/07/2025 - Schemas PL.009p1 e PL.010b
10182
- Alterado URLs Consulta Cadastro AM
10283
- Alterado URLs QRCode GO

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>br.com.swconsultoria</groupId>
55
<artifactId>java-nfe</artifactId>
6-
<version>4.00.41</version>
6+
<version>4.00.42</version>
77
<name>Java_NFe</name>
88
<description>Api java para consumo do webService de nota fiscal eletronica</description>
99
<url>https://github.com/Samuel-Oliveira/Java_NFe</url>

schemas.zip

-1.01 KB
Binary file not shown.

schemas_rt/DFeTiposBasicos_v1.00.xsd renamed to schemas/DFeTiposBasicos_v1.00.xsd

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828
<xs:pattern value="\d{6}"/>
2929
</xs:restriction>
3030
</xs:simpleType>
31+
<xs:simpleType name="TcCredPres">
32+
<xs:annotation>
33+
<xs:documentation>Código de Classificação do Crédito Presumido do IBS e da CBS, conforme tabela cCredPres</xs:documentation>
34+
</xs:annotation>
35+
<xs:restriction base="xs:string">
36+
<xs:whiteSpace value="preserve"/>
37+
<xs:pattern value="\d{2}"/>
38+
</xs:restriction>
39+
</xs:simpleType>
3140
<xs:simpleType name="TDec1104">
3241
<xs:annotation>
3342
<xs:documentation>Tipo Decimal com 15 dígitos, sendo 11 de corpo e 4 decimais</xs:documentation>
@@ -860,9 +869,9 @@
860869
<xs:documentation>Tipo Crédito Presumido</xs:documentation>
861870
</xs:annotation>
862871
<xs:sequence>
863-
<xs:element name="cCredPres">
872+
<xs:element name="cCredPres" type="TcCredPres">
864873
<xs:annotation>
865-
<xs:documentation>Usar tabela Cred Presumido, para o emitente da nota.</xs:documentation>
874+
<xs:documentation>Código de Classificação do Crédito Presumido do IBS e da CBS</xs:documentation>
866875
</xs:annotation>
867876
</xs:element>
868877
<xs:element name="pCredPres" type="TDec_0302_04">

0 commit comments

Comments
 (0)