Hello Christopher, it seems the jar is a test resource, so it is not different from a jpg which could be included as well in this way IMO.
Regards Mirko -- Sent from my mobile Am 19.08.2016 03:47 schrieb "Christopher" <ctubb...@apache.org>: If this were a personal project, I'd probably do that... but this is for an ASF project, and I don't want to put us in a position where we are releasing with binaries in the source artifact. On Thu, Aug 18, 2016 at 9:39 PM jieryn <jie...@gmail.com> wrote: > Create the jar and then put it under src/test/resources/my.jar and > then refer to that my.jar in your testcase. It seems like an awful lot > of trouble to dynamically create this test artifact, when you could > just create it once and then add it to your repository. Yes, adding > jars to your scm is generally bad, but this seems like a perfect > exception. > > On Thu, Aug 18, 2016 at 9:36 PM, Christopher <ctubb...@apache.org> wrote: > > Hi Maven Users list, > > > > What's the best way to create a jar during a build without attaching it? > > > > Currently, our pom is configured to use the maven-jar-plugin to create > it, > > but that plugin attaches an artifact, which gets deployed. We don't want > > that. That doesn't seem to be configurable. > > > > We could create a mini project and use maven-invoker-plugin to package > it, > > but that's a lot of overhead (configuration and processing time) for a > very > > small test jar containing a single file (used to test a classloader). > > > > We've also considered just using maven-exec-plugin to execute the jar > > command-line tool, but that's tricky to get right, accounting for > > JAVA_HOME, toolchains, etc. > > > > Any suggestions, or is maven-invoker-plugin the best option? > > > > I think the maven-assembly-plugin might be able to do it, and it has an > > <attach>false</attach> option, but I've never used it like this before. > If > > that's the best option, does anybody have any examples of that kind of > > thing? > > > > Thanks. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >