maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher <ctubb...@apache.org>
Subject Re: Create test jar during build without attaching
Date Fri, 19 Aug 2016 18:43:49 GMT
It is a test resource, built from source. I think it's substantively
different from a jpg, because it is derived from the creative work (source
code), and does not itself represent the creative work like a jpg does.
Compiled code does not meet the definition of open source from the Open
Source Initiative (https://opensource.org/osd), and we'd prefer to keep our
source code free from compiled code as much as possible. So, even if it
would be an "acceptable" case, we're trying to find a solution which avoids
that. We were actually doing that until recently, and we're trying to take
positive action to correct it.

In any case, my goal for this thread was to find solutions which allow me
to avoid having the binary in SCM, not to convince myself I don't need to.
:)

On Fri, Aug 19, 2016 at 4:44 AM Mirko Friedenhagen <mfriedenhagen@gmail.com>
wrote:

> 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" <ctubbsii@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 <jieryn@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 <ctubbsii@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-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message