Skip to content

Commit

Permalink
fixing maven-resources-plugin for localization AND version display
Browse files Browse the repository at this point in the history
  • Loading branch information
i-make-robots committed Feb 3, 2025
1 parent 1d707d5 commit 4b7a0ab
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 26 deletions.
27 changes: 14 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,24 @@ It pairs really well with Marlin-polargraph, the code in the brain of the robot
</repositories>

<build>
<!-- See: http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
and http://stackoverflow.com/a/3697482 -->
<resources>
<!-- General (non-filtered) resources -->
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<filtering>false</filtering> <!-- Default, no filtering -->
<excludes>
<exclude>**/*.properties</exclude>
<exclude>makelangelo.properties</exclude> <!-- Exclude this file from unfiltered resources -->
</excludes>
</resource>

<!-- Filter only makelangelo.properties -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering> <!-- Enable filtering for selected files -->
<includes>
<include>makelangelo.properties</include> <!-- Only this file -->
</includes>
</resource>
</resources>

<plugins>
Expand Down Expand Up @@ -588,7 +589,7 @@ It pairs really well with Marlin-polargraph, the code in the brain of the robot
<dependency>
<groupId>com.github.marginallyclever</groupId>
<artifactId>donatello</artifactId>
<version>1.4.0</version>
<version>1.4.1</version>
</dependency>

<!-- read audio files -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,27 @@
import org.slf4j.LoggerFactory;

/**
* Register custom nodes for {@link Turtle}s.
* Register custom {@link com.marginallyclever.nodegraphcore.Node}s for {@link Turtle}s in the {@link NodeFactory}.
* Register the types with the JSON DAO factory.
* @author Dan Royer
* @since 2022-02-01
*/
public class DonatelloRegistry implements DAORegistry, NodeRegistry {
private static final Logger logger = LoggerFactory.getLogger(DonatelloRegistry.class);
public class MakelangeloRegistry implements DAORegistry, NodeRegistry {
private static final Logger logger = LoggerFactory.getLogger(MakelangeloRegistry.class);

public String getName() {
return "Makelangelo";
}

@Override
public void registerDAO() {
logger.info("Registering makelangelo-software DAOs");
DAO4JSONFactory.registerDAO(Turtle.class,new TurtleDAO4JSON());
}

@Override
public void registerNodes() {
logger.info("Registering makelangelo-software nodes");
NodeFactory.registerAllNodesInPackage("com.marginallyclever.makelangelo.donatelloimpl");
}

@Override
public void registerDAO() {
logger.info("Registering makelangelo-software DAOs");
DAO4JSONFactory.registerDAO(Turtle.class,new TurtleDAO4JSON());
}
}
6 changes: 4 additions & 2 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.marginallyclever.makelangelo.donatelloimpl.MakelangeloRegistry;

module com.marginallyclever.makelangelo {
requires org.slf4j;
requires jssc;
Expand Down Expand Up @@ -55,9 +57,9 @@
// http://tutorials.jenkov.com/java/modules.html
uses com.marginallyclever.nodegraphcore.NodeRegistry;
provides com.marginallyclever.nodegraphcore.NodeRegistry with
com.marginallyclever.makelangelo.donatelloimpl.DonatelloRegistry;
MakelangeloRegistry;

uses com.marginallyclever.nodegraphcore.DAORegistry;
provides com.marginallyclever.nodegraphcore.DAORegistry with
com.marginallyclever.makelangelo.donatelloimpl.DonatelloRegistry;
MakelangeloRegistry;
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
com.marginallyclever.makelangelo.donatelloimpl.DonatelloRegistry
com.marginallyclever.makelangelo.donatelloimpl.MakelangeloRegistry
Original file line number Diff line number Diff line change
@@ -1 +1 @@
com.marginallyclever.makelangelo.donatelloimpl.DonatelloRegistry
com.marginallyclever.makelangelo.donatelloimpl.MakelangeloRegistry

0 comments on commit 4b7a0ab

Please # to comment.