This message was deleted.
# general
s
This message was deleted.
d
Here is one, and its parent pom that contains the packaging plugin config, etc.
a
Hi David, I was hoping for a very simple or basic pom.xml file that creates a jar package for the the sample java functions in the pulsar repo.
d
It would basically be the parent pom file then. It includes the dependencies you need along with the NAR packaging config, which is the preferred packaging for Java Pulsar Functions. You can use the shade plugin module if you prefer bundling it as a JAR file,
Copy code
<plugin>
            		<groupId>org.apache.maven.plugins</groupId>
        			<artifactId>maven-shade-plugin</artifactId>
        			<version>${maven-shade-plugin.version}</version>

            		<executions>
                		<execution>
              	      		<phase>package</phase>
                	    	<goals>
                    	    	<goal>shade</goal>
                    		</goals>
                		</execution>
            		</executions>
            		<configuration>
              			<filters> 
                			<filter>
                  				<artifact>*:*</artifact>
                  				<excludes>
					            	<exclude>META-INF/*.SF</exclude>
                    				<exclude>META-INF/*.DSA</exclude>
					                <exclude>META-INF/*.RSA</exclude>
                    				<exclude>META-INF/MANIFEST.MF</exclude>
					            </excludes>
                			</filter>
             			</filters>
            		</configuration>
        		</plugin>
a
David, I also found two pom files in the Pulsar site. One is for JAR another for NAR. You said NAR format is preferred. Could you elaborate on that. Thanks !!!
d
Sure, the NAR format is based on the package management developed as part of the Apache NiFi project. The packaging allows the pulsar functions framework to use a separate Classloader thread to load the dependencies for a Pulsar Function, which allows us to avoid package collisions when functions use different versions of the same library.