diff --git a/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/Compiler.java b/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/Compiler.java
index 5394eaf..580099e 100644
--- a/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/Compiler.java
+++ b/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/Compiler.java
@@ -110,7 +110,7 @@ protected File getOutArtifact(ParametersDto parameters){
}
protected void writeResourceToOut(String resource, PrintWriter out) throws IOException {
- URL url = Thread.currentThread().getContextClassLoader().getResource(resource);
+ URL url = getClass().getResource(resource);
if(url == null){
throw new FileNotFoundException(String.format(
"Resource %s not loaded",
diff --git a/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FeatureToHTMLCompiler.java b/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FeatureToHTMLCompiler.java
index 6a24532..bd13689 100644
--- a/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FeatureToHTMLCompiler.java
+++ b/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FeatureToHTMLCompiler.java
@@ -45,7 +45,7 @@ public void build() throws Exception {
out.print("");
out.print(String.format("
%s", parameters.getProjectName()));
out.print("");
out.print("");
out.print("");
diff --git a/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FeatureToPDFCompiler.java b/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FeatureToPDFCompiler.java
index 159ed5f..f0d3bcc 100644
--- a/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FeatureToPDFCompiler.java
+++ b/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FeatureToPDFCompiler.java
@@ -42,8 +42,8 @@ public void build() throws Exception {
try (
FileOutputStream fosPDF = new FileOutputStream(outArtifact);
- InputStream css = Objects.requireNonNull(Thread.currentThread().getContextClassLoader()
- .getResource("htmlTemplate/dist/feature-pdf.min.css"))
+ InputStream css = Objects.requireNonNull(getClass()
+ .getResource("../dist/feature-pdf.min.css"))
.openStream();
){
parameters.setEmbedImages(false);
diff --git a/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FolderToHTMLCompiler.java b/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FolderToHTMLCompiler.java
index 64f31d1..0f615c0 100644
--- a/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FolderToHTMLCompiler.java
+++ b/core/src/main/java/com/github/clagomess/pirilampo/core/compilers/FolderToHTMLCompiler.java
@@ -165,7 +165,7 @@ public void build() throws Exception {
out.print("");
out.print(String.format("
%s", parameters.getProjectName()));
out.print("