io7m-com / primogenitor

io7m root POM
ISC License
5 stars 1 forks source link

Error assembling JAR: Manifest file does exist #51

Open abroekhuis opened 3 years ago

abroekhuis commented 3 years ago

Not a bug, more a remark on the blog post at https://blog.io7m.com/2019/05/16/instant-code-reloading.xhtml

In this post you refer to the un-existing manifest file in a parent pom. Instead of creating this file, it is also possible to setup the jar plugin and add the skipIfEmpty configuration to the execution.

`

jar
<goals>
      <goal>jar</goal>
</goals>
<configuration>
    <skipIfEmpty>true</skipIfEmpty>
</configuration>

`

io7m commented 3 years ago

Hello! Just noticing this ticket today. Sorry for the delay!

It's certainly possible to do that, but I'd personally avoid it because creating an empty jar file is something you'd normally want to prevent in a build. As I mentioned in the blog:

I strongly recommend not doing this as part of the actual Maven build itself; this is something that's only needed by developers who are making use of this live code updating setup during development, and isn't something that the Maven build needs to know about. By executing specific plugins, we're not calling Maven in the way that it would normally be called and therefore it's up to us to ensure that things are set up correctly so that the plugins can work.