Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A016F200B78 for ; Fri, 19 Aug 2016 03:36:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9EBF3160AB7; Fri, 19 Aug 2016 01:36:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 190CB160AAE for ; Fri, 19 Aug 2016 03:36:58 +0200 (CEST) Received: (qmail 69925 invoked by uid 500); 19 Aug 2016 01:36:58 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 69913 invoked by uid 99); 19 Aug 2016 01:36:58 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Aug 2016 01:36:58 +0000 Received: from mail-qt0-f172.google.com (mail-qt0-f172.google.com [209.85.216.172]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id BD78D1A0292 for ; Fri, 19 Aug 2016 01:36:57 +0000 (UTC) Received: by mail-qt0-f172.google.com with SMTP id 52so5058125qtq.3 for ; Thu, 18 Aug 2016 18:36:57 -0700 (PDT) X-Gm-Message-State: AEkoouuRjmFqEg8gocApALDLqvUImc6cYNjFhp5WnK030V8Wvx1jW0Oh+bejHkbPb8SIipn4RBeJNXKNqpTULw== X-Received: by 10.237.56.170 with SMTP id k39mr5881682qte.138.1471570616791; Thu, 18 Aug 2016 18:36:56 -0700 (PDT) MIME-Version: 1.0 From: Christopher Date: Fri, 19 Aug 2016 01:36:46 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Create test jar during build without attaching To: Maven Users List Content-Type: multipart/alternative; boundary=001a11410d70e03fc6053a62bbce archived-at: Fri, 19 Aug 2016 01:36:59 -0000 --001a11410d70e03fc6053a62bbce Content-Type: text/plain; charset=UTF-8 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 false 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. --001a11410d70e03fc6053a62bbce--