processing / processing-library-template-ant

Processing Library Template for Eclipse
Other
141 stars 447 forks source link

Exclude `core.jar` from sketchbook copies. #31

Closed zedseven closed 1 year ago

zedseven commented 2 years ago

Starting with Processing 4, the IDE will refuse to load a sketchbook library if it contains the core.jar.

Zipped versions are unaffected since they didn't contain the file anyways, but it makes it a pain to develop with.

Here is the error that is shown:

The library "${project.name}" cannot be used
because it contains the processing.core libraries.
Please contact the library author for an update.

image

SableRaf commented 2 years ago

Thanks for your contribution Zacchary 🙂

@prisonerjohn could you review this and merge it?

vincentsijben commented 1 year ago

So, I ran into this myself this afternoon. While this PR is not yet merged, in the meantime you could simply change the following in resources/build.xml (thanks for https://github.com/ndsh/occasional-knowledge)

<target name="copyToSketchbook">
    …
    <fileset dir="${project.tmp}/${project.name}"/>
</target>

into

<target name="copyToSketchbook">
    …
<fileset dir="${project.tmp}/${project.name}">
        <!--
            https://github.com/processing/processing-library-template/pull/31
            To avoid the following error in Processing 4.0 and newer:
            The library "${project.name}" cannot be used
            because it contains the processing.core libraries.
            Please contact the library author for an update.
         -->
        <exclude name="**/core.jar"/>
    </fileset>
</target>
benfry commented 1 year ago

Thanks for the fix @zedseven.