maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jieryn <jie...@gmail.com>
Subject Re: Create test jar during build without attaching
Date Fri, 19 Aug 2016 18:30:27 GMT
Confirmed. Is it so bad, though? :) I like the argument comparing
putting .jpeg files in there.

On Fri, Aug 19, 2016 at 2:13 PM, Christopher <ctubbsii@apache.org> wrote:
> src/test/resources are included in the source-release artifact, yes.
>
> On Fri, Aug 19, 2016 at 1:56 AM jieryn <jieryn@gmail.com> wrote:
>
>> Would src/test/resources be included in the src artifact? I suspect not.
>>
>> On Thu, Aug 18, 2016 at 9:47 PM, Christopher <ctubbsii@apache.org> wrote:
>> > 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
>> >>
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message