How to package sources in a jar in Netbeans for maven projects?
问题 When building maven projects (Java) in Netbeans, by default, sources are left out. How to package sources in a jar in Netbeans for maven projects? Something like: myproject.jar myproject-sources.jar 回答1: You can do it in two ways. First way - Project Properties Right click on the project > Properties Go to > Actions Either add a custom one (click Add custom... ) for a separate action or add it to an existing one (e.g. Build with dependencies) by selecting it. In the Execute Goals menu, add