Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2
-
None
-
None
Description
We have quite some projects with integration tests that have only test code, but no sources (neither Java nor other resources) that are included into the main artifact. With jar-plugin version 2.2 these kind of projects suddenly fail:
[INFO] ------------------------------------------------------------------------ [INFO] Building eIP TempAccess Integration Tests [INFO] task-segment: [clean, deploy] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean] [INFO] Deleting directory D:\work\standard\eIP\TempAccess\EnterpriseArchive\integration-test-jar\target [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Compiling 1 source file to D:\work\standard\eIP\TempAccess\EnterpriseArchive\integration-test-jar\target\test-classes [INFO] [surefire:test] [INFO] Tests are skipped. [INFO] [jar:jar] [WARNING] JAR will be empty - no content was marked for inclusion! [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error assembling JAR Embedded error: You must set at least one file. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 14 minutes 44 seconds [INFO] Finished at: Wed Apr 16 08:18:43 CEST 2008 [INFO] Final Memory: 111M/200M [INFO] ------------------------------------------------------------------------
With 2.1 an empty main jar has been created and this behaviour was explicitly acknowledged in MJAR-8.
We stumbled about this upgrading from M205 to M209 that allowed us to use also the newer jar-plugin version. Currently we're stuck with jar-plugin version 2.1 because of this.
Attachments
Attachments
Issue Links
- is related to
-
MJAR-8 Maven creates jar for a project without java sources
- Closed
-
MJAR-20 Don't create empty jars
- Closed
-
MSHARED-135 Update to plexus-archiver-1.0-alpha-12 to allow Manifest-only jars
- Closed