├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── ReleaseNotes.md ├── jira ├── PLXCOMP-1.json ├── PLXCOMP-10.json ├── PLXCOMP-100.json ├── PLXCOMP-101.json ├── PLXCOMP-102.json ├── PLXCOMP-103.json ├── PLXCOMP-104.json ├── PLXCOMP-105.json ├── PLXCOMP-106.json ├── PLXCOMP-107.json ├── PLXCOMP-108.json ├── PLXCOMP-109.json ├── PLXCOMP-11.json ├── PLXCOMP-110.json ├── PLXCOMP-111.json ├── PLXCOMP-112.json ├── PLXCOMP-113.json ├── PLXCOMP-114.json ├── PLXCOMP-115.json ├── PLXCOMP-116.json ├── PLXCOMP-117.json ├── PLXCOMP-118.json ├── PLXCOMP-119.json ├── PLXCOMP-12.json ├── PLXCOMP-120.json ├── PLXCOMP-121.json ├── PLXCOMP-122.json ├── PLXCOMP-123.json ├── PLXCOMP-124.json ├── PLXCOMP-125.json ├── PLXCOMP-126.json ├── PLXCOMP-127.json ├── PLXCOMP-128.json ├── PLXCOMP-129.json ├── PLXCOMP-13.json ├── PLXCOMP-130.json ├── PLXCOMP-131.json ├── PLXCOMP-132.json ├── PLXCOMP-133.json ├── PLXCOMP-138.json ├── PLXCOMP-139.json ├── PLXCOMP-14.json ├── PLXCOMP-140.json ├── PLXCOMP-141.json ├── PLXCOMP-142.json ├── PLXCOMP-143.json ├── PLXCOMP-144.json ├── PLXCOMP-145.json ├── PLXCOMP-146.json ├── PLXCOMP-147.json ├── PLXCOMP-148.json ├── PLXCOMP-149.json ├── PLXCOMP-15.json ├── PLXCOMP-150.json ├── PLXCOMP-151.json ├── PLXCOMP-152.json ├── PLXCOMP-153.json ├── PLXCOMP-154.json ├── PLXCOMP-155.json ├── PLXCOMP-156.json ├── PLXCOMP-157.json ├── PLXCOMP-158.json ├── PLXCOMP-159.json ├── PLXCOMP-16.json ├── PLXCOMP-160.json ├── PLXCOMP-161.json ├── PLXCOMP-162.json ├── PLXCOMP-163.json ├── PLXCOMP-164.json ├── PLXCOMP-165.json ├── PLXCOMP-166.json ├── PLXCOMP-167.json ├── PLXCOMP-168.json ├── PLXCOMP-169.json ├── PLXCOMP-17.json ├── PLXCOMP-170.json ├── PLXCOMP-171.json ├── PLXCOMP-172.json ├── PLXCOMP-173.json ├── PLXCOMP-174.json ├── PLXCOMP-175.json ├── PLXCOMP-176.json ├── PLXCOMP-177.json ├── PLXCOMP-178.json ├── PLXCOMP-179.json ├── PLXCOMP-18.json ├── PLXCOMP-180.json ├── PLXCOMP-181.json ├── PLXCOMP-182.json ├── PLXCOMP-183.json ├── PLXCOMP-184.json ├── PLXCOMP-185.json ├── PLXCOMP-186.json ├── PLXCOMP-187.json ├── PLXCOMP-188.json ├── PLXCOMP-189.json ├── PLXCOMP-19.json ├── PLXCOMP-190.json ├── PLXCOMP-191.json ├── PLXCOMP-192.json ├── PLXCOMP-193.json ├── PLXCOMP-194.json ├── PLXCOMP-195.json ├── PLXCOMP-196.json ├── PLXCOMP-197.json ├── PLXCOMP-198.json ├── PLXCOMP-199.json ├── PLXCOMP-2.json ├── PLXCOMP-20.json ├── PLXCOMP-200.json ├── PLXCOMP-201.json ├── PLXCOMP-202.json ├── PLXCOMP-203.json ├── PLXCOMP-204.json ├── PLXCOMP-205.json ├── PLXCOMP-206.json ├── PLXCOMP-207.json ├── PLXCOMP-208.json ├── PLXCOMP-209.json ├── PLXCOMP-21.json ├── PLXCOMP-210.json ├── PLXCOMP-211.json ├── PLXCOMP-212.json ├── PLXCOMP-213.json ├── PLXCOMP-214.json ├── PLXCOMP-215.json ├── PLXCOMP-216.json ├── PLXCOMP-217.json ├── PLXCOMP-218.json ├── PLXCOMP-219.json ├── PLXCOMP-22.json ├── PLXCOMP-220.json ├── PLXCOMP-221.json ├── PLXCOMP-222.json ├── PLXCOMP-223.json ├── PLXCOMP-224.json ├── PLXCOMP-225.json ├── PLXCOMP-226.json ├── PLXCOMP-227.json ├── PLXCOMP-228.json ├── PLXCOMP-229.json ├── PLXCOMP-23.json ├── PLXCOMP-230.json ├── PLXCOMP-231.json ├── PLXCOMP-232.json ├── PLXCOMP-233.json ├── PLXCOMP-234.json ├── PLXCOMP-235.json ├── PLXCOMP-236.json ├── PLXCOMP-237.json ├── PLXCOMP-238.json ├── PLXCOMP-239.json ├── PLXCOMP-24.json ├── PLXCOMP-240.json ├── PLXCOMP-241.json ├── PLXCOMP-242.json ├── PLXCOMP-243.json ├── PLXCOMP-244.json ├── PLXCOMP-245.json ├── PLXCOMP-246.json ├── PLXCOMP-247.json ├── PLXCOMP-248.json ├── PLXCOMP-249.json ├── PLXCOMP-25.json ├── PLXCOMP-250.json ├── PLXCOMP-251.json ├── PLXCOMP-252.json ├── PLXCOMP-253.json ├── PLXCOMP-254.json ├── PLXCOMP-255.json ├── PLXCOMP-256.json ├── PLXCOMP-257.json ├── PLXCOMP-258.json ├── PLXCOMP-259.json ├── PLXCOMP-26.json ├── PLXCOMP-260.json ├── PLXCOMP-261.json ├── PLXCOMP-262.json ├── PLXCOMP-263.json ├── PLXCOMP-264.json ├── PLXCOMP-265.json ├── PLXCOMP-266.json ├── PLXCOMP-267.json ├── PLXCOMP-268.json ├── PLXCOMP-269.json ├── PLXCOMP-27.json ├── PLXCOMP-270.json ├── PLXCOMP-271.json ├── PLXCOMP-272.json ├── PLXCOMP-273.json ├── PLXCOMP-274.json ├── PLXCOMP-275.json ├── PLXCOMP-276.json ├── PLXCOMP-277.json ├── PLXCOMP-278.json ├── PLXCOMP-279.json ├── PLXCOMP-28.json ├── PLXCOMP-280.json ├── PLXCOMP-281.json ├── PLXCOMP-282.json ├── PLXCOMP-283.json ├── PLXCOMP-284.json ├── PLXCOMP-29.json ├── PLXCOMP-3.json ├── PLXCOMP-30.json ├── PLXCOMP-31.json ├── PLXCOMP-32.json ├── PLXCOMP-33.json ├── PLXCOMP-34.json ├── PLXCOMP-35.json ├── PLXCOMP-36.json ├── PLXCOMP-37.json ├── PLXCOMP-38.json ├── PLXCOMP-39.json ├── PLXCOMP-4.json ├── PLXCOMP-40.json ├── PLXCOMP-42.json ├── PLXCOMP-43.json ├── PLXCOMP-44.json ├── PLXCOMP-45.json ├── PLXCOMP-46.json ├── PLXCOMP-47.json ├── PLXCOMP-48.json ├── PLXCOMP-49.json ├── PLXCOMP-5.json ├── PLXCOMP-50.json ├── PLXCOMP-51.json ├── PLXCOMP-52.json ├── PLXCOMP-53.json ├── PLXCOMP-54.json ├── PLXCOMP-55.json ├── PLXCOMP-56.json ├── PLXCOMP-57.json ├── PLXCOMP-58.json ├── PLXCOMP-59.json ├── PLXCOMP-6.json ├── PLXCOMP-60.json ├── PLXCOMP-61.json ├── PLXCOMP-62.json ├── PLXCOMP-63.json ├── PLXCOMP-64.json ├── PLXCOMP-65.json ├── PLXCOMP-66.json ├── PLXCOMP-67.json ├── PLXCOMP-68.json ├── PLXCOMP-69.json ├── PLXCOMP-7.json ├── PLXCOMP-70.json ├── PLXCOMP-71.json ├── PLXCOMP-72.json ├── PLXCOMP-73.json ├── PLXCOMP-74.json ├── PLXCOMP-75.json ├── PLXCOMP-76.json ├── PLXCOMP-77.json ├── PLXCOMP-78.json ├── PLXCOMP-79.json ├── PLXCOMP-8.json ├── PLXCOMP-80.json ├── PLXCOMP-81.json ├── PLXCOMP-82.json ├── PLXCOMP-83.json ├── PLXCOMP-84.json ├── PLXCOMP-85.json ├── PLXCOMP-86.json ├── PLXCOMP-87.json ├── PLXCOMP-88.json ├── PLXCOMP-89.json ├── PLXCOMP-9.json ├── PLXCOMP-90.json ├── PLXCOMP-91.json ├── PLXCOMP-92.json ├── PLXCOMP-93.json ├── PLXCOMP-94.json ├── PLXCOMP-95.json ├── PLXCOMP-96.json ├── PLXCOMP-97.json ├── PLXCOMP-98.json └── PLXCOMP-99.json ├── pom.xml └── src ├── main ├── java │ └── org │ │ └── codehaus │ │ └── plexus │ │ └── archiver │ │ ├── AbstractArchiveFinalizer.java │ │ ├── AbstractArchiver.java │ │ ├── AbstractUnArchiver.java │ │ ├── ArchiveEntry.java │ │ ├── ArchiveFile.java │ │ ├── ArchiveFileFilter.java │ │ ├── ArchiveFilterException.java │ │ ├── ArchiveFinalizer.java │ │ ├── ArchivedFileSet.java │ │ ├── Archiver.java │ │ ├── ArchiverException.java │ │ ├── BaseFileSet.java │ │ ├── DotDirectiveArchiveFinalizer.java │ │ ├── FileSet.java │ │ ├── FinalizerEnabled.java │ │ ├── ResourceIterator.java │ │ ├── UnArchiver.java │ │ ├── UnixStat.java │ │ ├── bzip2 │ │ ├── BZip2Archiver.java │ │ ├── BZip2Compressor.java │ │ ├── BZip2UnArchiver.java │ │ └── PlexusIoBzip2ResourceCollection.java │ │ ├── diags │ │ ├── DelgatingArchiver.java │ │ ├── DryRunArchiver.java │ │ ├── NoOpArchiver.java │ │ └── TrackingArchiver.java │ │ ├── dir │ │ └── DirectoryArchiver.java │ │ ├── ear │ │ └── EarArchiver.java │ │ ├── filters │ │ ├── JarSecurityFileFilter.java │ │ └── JarSecurityFileSelector.java │ │ ├── gzip │ │ ├── GZipArchiver.java │ │ ├── GZipCompressor.java │ │ ├── GZipUnArchiver.java │ │ └── PlexusIoGzipResourceCollection.java │ │ ├── jar │ │ ├── JarArchiver.java │ │ ├── JdkManifestFactory.java │ │ ├── Manifest.java │ │ ├── ManifestConstants.java │ │ └── ManifestException.java │ │ ├── manager │ │ ├── ArchiverManager.java │ │ ├── DefaultArchiverManager.java │ │ └── NoSuchArchiverException.java │ │ ├── resources │ │ ├── PlexusIoVirtualFileResource.java │ │ └── PlexusIoVirtualSymlinkResource.java │ │ ├── snappy │ │ ├── PlexusIoSnappyResourceCollection.java │ │ ├── SnappyArchiver.java │ │ ├── SnappyCompressor.java │ │ └── SnappyUnArchiver.java │ │ ├── tar │ │ ├── BZip2TarFile.java │ │ ├── GZipTarFile.java │ │ ├── PlexusIoTarBZip2FileResourceCollection.java │ │ ├── PlexusIoTarFileResourceCollection.java │ │ ├── PlexusIoTarGZipFileResourceCollection.java │ │ ├── PlexusIoTarSnappyFileResourceCollection.java │ │ ├── SnappyTarFile.java │ │ ├── TarArchiver.java │ │ ├── TarBZip2UnArchiver.java │ │ ├── TarFile.java │ │ ├── TarGZipUnArchiver.java │ │ ├── TarLongFileMode.java │ │ ├── TarResource.java │ │ ├── TarSnappyUnArchiver.java │ │ └── TarUnArchiver.java │ │ ├── util │ │ ├── AbstractFileSet.java │ │ ├── ArchiveEntryUtils.java │ │ ├── Compressor.java │ │ ├── DefaultArchivedFileSet.java │ │ ├── DefaultFileSet.java │ │ ├── FilePermission.java │ │ ├── FilePermissionUtils.java │ │ ├── FilterSupport.java │ │ ├── ResourceUtils.java │ │ └── Streams.java │ │ ├── war │ │ └── WarArchiver.java │ │ └── zip │ │ ├── AbstractZipArchiver.java │ │ ├── AbstractZipUnArchiver.java │ │ ├── AnonymousResource.java │ │ ├── PlexusIoZipFileResourceCollection.java │ │ ├── ZipArchiver.java │ │ ├── ZipResource.java │ │ └── ZipUnArchiver.java └── resources │ ├── META-INF │ └── plexus │ │ └── components.xml │ └── org │ └── codehaus │ └── plexus │ └── archiver │ └── jar │ └── defaultManifest.mf ├── site └── site.xml └── test ├── dotfiles ├── .plxarc └── licenses │ ├── LICENSE.txt │ └── NOTICE.txt ├── jars ├── test.jar ├── test.rar ├── test.tar.gz └── test.zip ├── java └── org │ └── codehaus │ └── plexus │ └── archiver │ ├── AbstractArchiverTest.java │ ├── BasePlexusArchiverTest.java │ ├── DotDirectiveArchiveFinalizerTest.java │ ├── DuplicateFilesTest.java │ ├── EmptyDirectoryTest.java │ ├── SymlinkTest.java │ ├── bzip2 │ └── BZip2ArchiverTest.java │ ├── gzip │ └── GZipArchiverTest.java │ ├── jar │ ├── IndexTest.java │ ├── JarArchiverTest.java │ ├── JdkManifestFactoryTest.java │ └── ManifestTest.java │ ├── manager │ └── ArchiverManagerTest.java │ ├── rar │ └── RarArchiverTest.java │ ├── snappy │ └── SnappyArchiverTest.java │ ├── tar │ ├── TarArchiverTest.java │ ├── TarBZip2UnArchiverTest.java │ ├── TarFileAttributesTest.java │ ├── TarFileTest.java │ ├── TarGZipUnArchiverTest.java │ ├── TarRoundTripTest.java │ ├── TarSnappyUnArchiverTest.java │ └── TarUnArchiverTest.java │ ├── util │ ├── ArchiveEntryUtilsTest.java │ ├── DefaultFileSetTest.java │ └── FilePermissionUtilsTest.java │ ├── war │ └── WarArchiverTest.java │ └── zip │ ├── ArchiveFileComparator.java │ ├── PlexusIoZipFileResourceCollectionTest.java │ ├── ZipArchiverTest.java │ └── ZipUnArchiverTest.java └── resources ├── archiveWithIllegalHtmlFileName.zip ├── folders ├── File.txt ├── WEB-INF │ └── web.xml ├── a │ └── FileInA.txt └── b │ └── FileInB.txt ├── group-writable ├── bar.txt └── foo.txt ├── jar-security └── dummy.txt ├── manifests ├── manifest1.mf ├── manifest2.mf ├── manifest3.mf ├── manifest4.mf ├── manifest5.mf ├── manifest6.mf ├── manifestMerge1.mf ├── manifestMerge2.mf ├── manifestWithClassPath.mf └── manifestWithDualClassPath.mf ├── miscUtf8 ├── aFileWithA#.html ├── aPiñata.txt ├── anümlaut.txt └── €uro.txt ├── mjar179 ├── Messages.properties ├── Messages_en.properties └── Messages_fr.properties ├── symlinks ├── dirOnTheOutside │ └── FileInDirOnTheOutside.txt ├── onTheOutside.txt ├── regen.sh ├── src │ ├── aRegularDir │ │ └── aRegularFile.txt │ ├── fileR.txt │ ├── fileW.txt │ ├── fileX.txt │ ├── symDir │ ├── symLinkToDirOnTheOutside │ ├── symLinkToFileOnTheOutside │ ├── symR │ ├── symW │ ├── symX │ └── targetDir │ │ └── targetFile.txt ├── symlinks.tar └── symlinks.zip ├── test.zip ├── utf8 ├── D12345679012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890æøå.txt └── D12345679012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890æøå.txt ├── world-writable └── foo.txt ├── zeroFileMode └── foobar.zip └── zip-timestamp ├── file-with-even-time.txt ├── file-with-odd-time.txt ├── foo ├── file-with-even-time.txt ├── file-with-odd-time.txt ├── macOsZipFile.jar └── plexus-archiver-2.4.4-SNAPSHOT.jar └── macOsZipFile.zip /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | *.java text diff=java 5 | *.html text diff=html 6 | *.css text 7 | *.js text 8 | *.sql text 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .project 3 | .classpath 4 | .settings/ 5 | bin 6 | *.ipr 7 | *.iml 8 | *.iws 9 | .idea 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Plexus-archiver 2 | =============== 3 | 4 | The current master is now at https://github.com/codehaus-plexus/plexus-archiver 5 | -------------------------------------------------------------------------------- /jira/PLXCOMP-102.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"53043","self":"http://jira.codehaus.org/rest/api/latest/issue/53043","key":"PLXCOMP-102","fields":{"progress":{"progress":0,"total":0},"summary":"Add support for source files list in an external file to prevent command line limitation under windows","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-102/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["evenisse(evenisse)"],"customfield_10160":null,"updated":"2008-02-23T01:19:38.851-0600","created":"2007-06-22T11:14:14.955-0500","description":"The @ argument depends on the jdk/jikes used","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"238809600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-102/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-109.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"65537","self":"http://jira.codehaus.org/rest/api/latest/issue/65537","key":"PLXCOMP-109","fields":{"progress":{"progress":0,"total":0},"summary":"Move org.codehaus.plexus.compiler.util.scan to plexus-utils","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-109/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mihobson","name":"mihobson","emailAddress":"markhobson@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mark Hobson","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["mihobson(mihobson)"],"customfield_10160":null,"updated":"2008-04-03T03:46:50.581-0500","created":"2008-04-03T03:46:50.581-0500","description":"These are handy classes that can be used outside of plexus-compiler. Currently used by apt-maven-plugin which has a misleading dependency on plexus-compiler-api.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"214099200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-109/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-152.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"110593","self":"http://jira.codehaus.org/rest/api/latest/issue/110593","key":"PLXCOMP-152","fields":{"progress":{"progress":0,"total":0},"summary":"Add an option to index files in META-INF","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-152/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=henryju","name":"henryju","emailAddress":"henryju@yahoo.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=henryju&avatarId=11215","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=henryju&avatarId=11215","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=henryju&avatarId=11215","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=henryju&avatarId=11215"},"displayName":"Julien HENRY","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["henryju(henryju)"],"customfield_10160":null,"updated":"2010-05-31T08:35:22.650-0500","created":"2010-05-31T08:35:22.650-0500","description":"Since JDK 1.6.0_18 there is an option to index files that are located in META-INF. Most of the time all JAR have a META-INF folder so when you are trying to load a resource that is in META-INF, it will force Java to look in all jars. For example it makes java webstart lazy-loading useless.\r\n\r\nThe property is named \"-J-Dsun.misc.JarIndex.metaInfFilenames=true\" (http://bugs.sun.com/view_bug.do?bug_id=2183678).\r\n\r\nI will try to provide a patch to add a similar behavior.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"146016000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-152/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12540","id":"12540","name":"plexus-archiver"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-162.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"116958","self":"http://jira.codehaus.org/rest/api/latest/issue/116958","key":"PLXCOMP-162","fields":{"progress":{"progress":0,"total":0},"summary":"Changed output of errors. Missing volume root","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-162/votes","votes":1,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mrkmrk","name":"mrkmrk","emailAddress":"morten.r.knudsen@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Morten Knudsen","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["mrkmrk(mrkmrk)"],"customfield_10160":null,"updated":"2010-10-26T07:50:13.561-0500","created":"2010-10-26T07:50:13.561-0500","description":"I'm using Maven inside IntelliJ 9. I have tried to use Maven 3. However the missing drive letter makes IntelliJ unable to locate the error.\r\nThe earlier version had this output:\r\n[INFO] Compilation failure\r\nC:\\intellijworkspace\\svn\\autocom\\7_admin\\converters\\src\\main\\java\\xx\\..\\File.java:[36,25] ';' expected\r\nC:\\intellijworkspace\\svn\\autocom\\7_admin\\converters\\src\\main\\java\\xx\\..\\File.java:[36,37] expected\r\n\r\nNow it looks like this:\r\n[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project admin-converters: Compilation failure: Compilation failure:\r\n[ERROR] \\intellijworkspace\\svn\\autocom\\7_admin\\converters\\src\\main\\java\\xx\\..\\File.java:[36,25] ';' expected\r\n[ERROR] \\intellijworkspace\\svn\\autocom\\7_admin\\converters\\src\\main\\java\\xx\\..\\File.java:[36,37] expected\r\n\r\nIs there any good reason for the change?","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"133228800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-162/watchers","watchCount":2,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Maven 3 integration in IntelliJ","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-180.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"126830","self":"http://jira.codehaus.org/rest/api/latest/issue/126830","key":"PLXCOMP-180","fields":{"progress":{"progress":0,"total":0},"summary":"Screen scraping of \"ls\" output on windows fails when symbolic GID contains space","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-180/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2011-06-26T15:35:04.319-0500","created":"2011-06-26T15:15:53.841-0500","description":"If there is a space in the \"users\" group like \"Domain Users\", the attribute parser fails quietly and ignores the group id.\r\n\r\nPlexusIoResourceAttributeUtilsTest#testParserCygwin does not assert this properly.\r\n\r\nverifyParsability method fails for symbolic attribute but succeeds for numeric","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"112147200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-180/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17286","id":"17286","description":"","name":"plexus-io-1.0","archived":false,"released":true,"releaseDate":"2010-04-25"},{"self":"http://jira.codehaus.org/rest/api/2/version/17287","id":"17287","description":"","name":"plexus-io-1.0.1","archived":false,"released":true,"releaseDate":"2010-09-22"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/14319","id":"14319","name":"plexus-io"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-204.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"137239","self":"http://jira.codehaus.org/rest/api/latest/issue/137239","key":"PLXCOMP-204","fields":{"progress":{"progress":0,"total":0},"summary":"Java 7 compilation errors are not captured correctly","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-204/votes","votes":1,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=andyb","name":"andyb","emailAddress":"bailey.andy@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andy Bailey","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["andyb(andyb)"],"customfield_10160":null,"updated":"2012-05-25T03:52:46.880-0500","created":"2012-05-25T03:52:46.880-0500","description":"I believe a plexus component that captures the compilation output does not detect the newer Java 7 output correctly. Was raised as a [maven-compiler-plugin|http://jira.codehaus.org/browse/MCOMPILER-158] (see this ticket for details on how the Java 7 compiler output changed). I've examined the maven plugin code and it seems that the errors are captured by plexus under the hood.\r\n\r\nI think the code that might need enhancing is in org.codehaus.plexus.compiler.javac.JavacCompiler - possibly in parseModernStream and/or parseModernError methods","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"83376000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-204/watchers","watchCount":2,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18340","id":"18340","name":"plexus-compiler-1.8.6","archived":false,"released":true,"releaseDate":"2012-03-02"}],"customfield_10170":null,"environment":"Windows 7, command line compilation using Maven 3.0.4 and the maven-compiler-plugin v2.4 which uses plexus-compiler-javac v1.8.6","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-209.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"139555","self":"http://jira.codehaus.org/rest/api/latest/issue/139555","key":"PLXCOMP-209","fields":{"progress":{"progress":0,"total":0},"summary":"type parameters compile error","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-209/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/3","id":"3","description":"The problem is a duplicate of an existing issue.","name":"Duplicate"},"fixVersions":[],"resolutiondate":"2012-08-09T11:34:38.048-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bohr.qiu%40gmail.com","name":"bohr.qiu@gmail.com","emailAddress":"bohr.qiu@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"bohr","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bohr.qiu@gmail.com(bohr.qiu@gmail.com)"],"customfield_10160":null,"updated":"2012-08-09T11:34:39.013-0500","created":"2012-08-09T08:36:56.710-0500","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[],"customfield_10163":"76809600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-209/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18270","id":"18270","name":"plexus-archiver-2.0.2","archived":false,"released":true,"releaseDate":"2012-01-14"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-211.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"140205","self":"http://jira.codehaus.org/rest/api/latest/issue/140205","key":"PLXCOMP-211","fields":{"progress":{"progress":0,"total":0},"summary":"Allow to dump class files on compile error for Eclipse compiler","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-211/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=striped%40gmail.com","name":"striped@gmail.com","emailAddress":"striped@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Val Urbanskyi","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["striped@gmail.com(striped@gmail.com)"],"customfield_10160":null,"updated":"2012-09-05T14:07:51.908-0500","created":"2012-09-05T14:07:51.908-0500","description":"ECJ by default may dumps class files even if they have compile errors. I think with \"proceedOnError\" (i.e. when failOnError=false) it may be handy to have the same behaviour in maven too. Yes, that sounds silly, but I know at least 1 project where it is required.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"74390400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-211/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18262","id":"18262","name":"plexus-compiler-1.8.3","archived":false,"released":true,"releaseDate":"2012-01-01"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-214.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"142002","self":"http://jira.codehaus.org/rest/api/latest/issue/142002","key":"PLXCOMP-214","fields":{"progress":{"progress":0,"total":0},"summary":"The package x.y.z collides with a type when using eclipse compiler","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-214/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=stepanv","name":"stepanv","emailAddress":"vavra.stepan@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Stepan Vavra","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["stepanv(stepanv)"],"customfield_10160":null,"updated":"2012-11-13T15:17:54.109-0600","created":"2012-11-13T15:17:54.109-0600","description":"When eclipse compiler has to compile a class\r\n{{my.package.whatever.MyClass}}\r\nand class\r\n{{my.package.Whatever}}\r\nexists as well, it fires error mentioned in the Summary.\r\nHowever, such setup is correct and compiler should have proceed without any complaints.\r\n\r\nThe problem is already described for instance in ant4eclipse project: http://www.ant4eclipse.org/node/134\r\nand probably in Eclipse project too: https://bugs.eclipse.org/bugs/show_bug.cgi?id=321115 (although the bug description is kind of confusing).\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"68428800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-214/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Windows + NTFS (case insensitive file names)","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-217.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"144969","self":"http://jira.codehaus.org/rest/api/latest/issue/144969","key":"PLXCOMP-217","fields":{"progress":{"progress":0,"total":0},"summary":"DefaultInputHandler in plexus-interactivity-api shouldn't show password typed","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-217/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pmv","name":"pmv","emailAddress":"vonnahme.paul@principal.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Paul Vonnahme","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["pmv(pmv)"],"customfield_10160":null,"updated":"2013-03-18T13:40:59.560-0500","created":"2013-03-18T13:40:59.560-0500","description":"Patch requires Java 6, so not sure you'll apply it. Also, there doesn't seem to be much use of this api; feel free to point me to an alternative.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"duedate":null,"issuelinks":[],"customfield_10163":"57628800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-217/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/62896","id":"62896","filename":"DefaultInputHandler.java.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pmv","name":"pmv","emailAddress":"vonnahme.paul@principal.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Paul Vonnahme","active":true},"created":"2013-03-18T13:40:59.583-0500","size":883,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/62896/DefaultInputHandler.java.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/14702","id":"14702","name":"plexus-interpolation"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-231.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"150170","self":"http://jira.codehaus.org/rest/api/latest/issue/150170","key":"PLXCOMP-231","fields":{"progress":{"progress":0,"total":0},"summary":"plxeus-compiler-eclipse requires \"optimize\" to set compliance level","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-231/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=baron_roberts","name":"baron_roberts","emailAddress":"baron@cthing.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Baron Roberts","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["baron_roberts(baron_roberts)"],"customfield_10160":null,"updated":"2013-11-17T12:03:55.890-0600","created":"2013-11-17T12:03:55.890-0600","description":"I spent a few hours trying to figure out why a switch on a string gave the strange error:\r\n\r\n\"Cannot switch on a value of type String. Only convertible int values, strings or enum variables are permitted\"\r\n\r\nIt turns out that the plexus-compiler-eclipse does not set the Java compliance level unless the optimize flag is set to true. What does optimization have to do with the language compliance level? At a minimum, there should be a clear statement in the documentation that the optimize flag must be set.\r\n\r\nDetails:\r\n* Java compliance level 1.7\r\n* Effects all versions of the eclipse JDT compiler >= 3.8.0\r\n* Only manifests itself when switching on strings. Other Java 1.7 constructs (e.g. diamond operator) do not exhibit the problem.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"36547200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-231/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/19598","id":"19598","name":"plexus-compiler-2.3","archived":false,"released":true,"releaseDate":"2013-09-11"}],"customfield_10170":null,"environment":"CentOS 6.3\r\nJava 1.7\r\nplexus-compiler-eclipse","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-259.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"157284","self":"http://jira.codehaus.org/rest/api/latest/issue/157284","key":"PLXCOMP-259","fields":{"progress":{"progress":0,"total":0},"summary":"Incorrect field chosen for synchronization in interpolation","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-259/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/20698","id":"20698","name":"plexus-interpolation-1.21","archived":false,"released":true,"releaseDate":"2014-10-17"}],"resolutiondate":"2014-10-17T14:35:28.827-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2014-10-17T14:35:28.854-0500","created":"2014-10-17T14:35:08.377-0500","description":"While not technically incorrect, the first choice of synchronization field was not very good","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"7689600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-259/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-278.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"158179","self":"http://jira.codehaus.org/rest/api/latest/issue/158179","key":"PLXCOMP-278","fields":{"progress":{"progress":0,"total":0},"summary":"Symlink attribute was not preserved through merged/overridden attributes","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-278/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/20751","id":"20751","name":"plexus-io-2.3.5","archived":false,"released":true,"releaseDate":"2014-11-12"}],"resolutiondate":"2014-11-29T13:56:01.531-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2014-11-29T13:56:01.565-0600","created":"2014-11-29T13:55:46.712-0600","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"3974400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-278/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/14319","id":"14319","name":"plexus-io"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-48.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"40135","self":"http://jira.codehaus.org/rest/api/latest/issue/40135","key":"PLXCOMP-48","fields":{"progress":{"progress":0,"total":0},"summary":"'merge' was specified in an execution (of Plexus Compiler Parent), but not found in the plugin (Plexus Maven Plugin)","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-48/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[],"resolutiondate":"2008-12-07T07:53:24.574-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=franz+see","name":"franz see","emailAddress":"franz.see@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Franz Allan Valencia See","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","franz see(franz see)"],"customfield_10160":null,"updated":"2008-12-07T07:53:24.558-0600","created":"2006-08-07T01:48:19.828-0500","description":"The Plexus Compiler Parent cannot be built because it is trying to execute the \"merge\" goal of plexus-maven-plugin. However, the closest goal that plexus-maven-compiler has is \"merge-descriptor\".","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[],"customfield_10163":"266371200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-48/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-49.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"16823","self":"http://jira.codehaus.org/rest/api/latest/issue/16823","key":"PLXCOMP-49","fields":{"progress":{"progress":0,"total":0},"summary":"Add incremental compilation","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-49/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["evenisse(evenisse)"],"customfield_10160":null,"updated":"2007-01-14T17:16:26.626-0600","created":"2004-07-29T03:58:31.000-0500","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"330220800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-49/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-50.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"28463","self":"http://jira.codehaus.org/rest/api/latest/issue/28463","key":"PLXCOMP-50","fields":{"progress":{"progress":0,"total":0},"summary":"create a monitor for the compiler to log debug info","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-50/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brettporter(brettporter)"],"customfield_10160":null,"updated":"2007-01-14T17:16:26.223-0600","created":"2005-10-22T18:31:24.328-0500","description":"we need a way to log in the compilers\n\nsee also http://jira.codehaus.org/browse/PLX-165#action_48724","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"291254400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-50/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12541","id":"12541","name":"plexus-compiler"}],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-63.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"48270","self":"http://jira.codehaus.org/rest/api/latest/issue/48270","key":"PLXCOMP-63","fields":{"progress":{"progress":0,"total":0},"summary":"add remove() method to Plexus Registry","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-63/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[],"resolutiondate":"2007-03-07T16:05:11.484-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brettporter(brettporter)"],"customfield_10160":null,"updated":"2007-03-07T16:05:11.463-0600","created":"2007-03-07T15:45:34.563-0600","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"247968000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-63/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /jira/PLXCOMP-98.json: -------------------------------------------------------------------------------- 1 | {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"63200","self":"http://jira.codehaus.org/rest/api/latest/issue/63200","key":"PLXCOMP-98","fields":{"progress":{"progress":0,"total":0},"summary":"Create a new jira component for plexus-io","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-98/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[],"resolutiondate":"2010-01-28T09:11:59.886-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pgier","name":"pgier","emailAddress":"pgier@redhat.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Paul Gier","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","pgier(pgier)"],"customfield_10160":null,"updated":"2010-01-28T09:12:00.075-0600","created":"2008-02-14T11:33:26.027-0600","description":"There is no jira component for plexus-io. One should be created so that issues can be grouped appropriately. ","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"duedate":null,"issuelinks":[],"customfield_10163":"218246400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-98/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/AbstractArchiveFinalizer.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | public abstract class AbstractArchiveFinalizer 4 | implements ArchiveFinalizer 5 | { 6 | 7 | protected AbstractArchiveFinalizer() 8 | { 9 | } 10 | 11 | public void finalizeArchiveCreation( Archiver archiver ) 12 | throws ArchiverException 13 | { 14 | } 15 | 16 | public void finalizeArchiveExtraction( UnArchiver unarchiver ) 17 | throws ArchiverException 18 | { 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/ArchiveFile.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.util.Enumeration; 6 | 7 | 8 | /** 9 | * Interface of a zip, or tar file. 10 | */ 11 | public interface ArchiveFile 12 | { 13 | 14 | /** 15 | * Returns an enumeration with the archive files entries. 16 | * Any element returned by the enumeration is an instance 17 | * of {@link org.apache.commons.compress.archivers.ArchiveEntry}. 18 | */ 19 | public Enumeration getEntries() 20 | throws IOException; 21 | 22 | /** 23 | * Returns an {@link InputStream} with the given entries contents. 24 | * org.apache.commons.compress.archivers.ArchiveEntry 25 | */ 26 | InputStream getInputStream(org.apache.commons.compress.archivers.ArchiveEntry entry ) 27 | throws IOException; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/ArchiveFileFilter.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import java.io.InputStream; 4 | 5 | /** 6 | * @deprecated Use {@link FileSelector} 7 | */ 8 | public interface ArchiveFileFilter 9 | { 10 | boolean include( InputStream dataStream, String entryName ); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/ArchiveFilterException.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | public class ArchiveFilterException 4 | extends Exception 5 | { 6 | 7 | public ArchiveFilterException( String message, Throwable cause ) 8 | { 9 | super( message, cause ); 10 | } 11 | 12 | public ArchiveFilterException( String message ) 13 | { 14 | super( message ); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/ArchiveFinalizer.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import java.util.List; 4 | 5 | public interface ArchiveFinalizer 6 | { 7 | 8 | void finalizeArchiveCreation( Archiver archiver ) 9 | throws ArchiverException; 10 | 11 | void finalizeArchiveExtraction( UnArchiver unarchiver ) 12 | throws ArchiverException; 13 | 14 | List getVirtualFiles(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/ArchivedFileSet.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import java.io.File; 4 | 5 | import javax.annotation.CheckForNull; 6 | 7 | 8 | /** 9 | * A file set, which consists of the files and directories in 10 | * an archive. 11 | * @since 1.0-alpha-9 12 | */ 13 | public interface ArchivedFileSet 14 | extends BaseFileSet 15 | { 16 | /** 17 | * Returns the archive file. 18 | */ 19 | @CheckForNull 20 | File getArchive(); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/ArchiverException.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | /** 4 | * Copyright 2004 The Apache Software Foundation 5 | *

6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | *

10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | *

12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | public class ArchiverException 20 | extends RuntimeException 21 | { 22 | public ArchiverException( String message ) 23 | { 24 | super( message ); 25 | } 26 | 27 | public ArchiverException( String message, Throwable cause ) 28 | { 29 | super( message, cause ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/BaseFileSet.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import javax.annotation.CheckForNull; 4 | 5 | import org.codehaus.plexus.components.io.fileselectors.FileSelector; 6 | import org.codehaus.plexus.components.io.functions.InputStreamTransformer; 7 | 8 | 9 | /** 10 | * A file set is a set of files, which may be added to an 11 | * archive. 12 | * @since 1.0-alpha-9 13 | */ 14 | public interface BaseFileSet 15 | { 16 | /** 17 | * Returns the prefix, which the file sets contents shall 18 | * have. 19 | */ 20 | @CheckForNull 21 | String getPrefix(); 22 | 23 | /** 24 | * Returns a string of patterns, which included files 25 | * should match. 26 | */ 27 | @CheckForNull 28 | String[] getIncludes(); 29 | 30 | /** 31 | * Returns a string of patterns, which excluded files 32 | * should match. 33 | */ 34 | @CheckForNull 35 | String[] getExcludes(); 36 | 37 | /** 38 | * Returns, whether the include/exclude patterns are 39 | * case sensitive. 40 | */ 41 | boolean isCaseSensitive(); 42 | 43 | /** 44 | * Returns, whether the default excludes are being 45 | * applied. 46 | */ 47 | boolean isUsingDefaultExcludes(); 48 | 49 | /** 50 | * Returns, whether empty directories are being included. 51 | */ 52 | boolean isIncludingEmptyDirectories(); 53 | 54 | /** 55 | * Returns a set of file selectors, which should be used 56 | * to select the included files. 57 | */ 58 | @CheckForNull 59 | FileSelector[] getFileSelectors(); 60 | 61 | /** 62 | * Returns the InputStreamTransformers that can be applied to this fileset 63 | * @return The transformers. 64 | */ 65 | 66 | InputStreamTransformer getStreamTransformer(); 67 | 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/DotDirectiveArchiveFinalizer.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import org.codehaus.plexus.util.FileUtils; 4 | import org.codehaus.plexus.util.StringUtils; 5 | 6 | import java.io.File; 7 | import java.io.IOException; 8 | import java.io.BufferedReader; 9 | import java.io.FileReader; 10 | import java.util.Collections; 11 | import java.util.List; 12 | 13 | 14 | /** 15 | * An @{link ArchiveFinalizer} that process dot files with archiver directives 16 | * contained within. This basically means you can communicate archive creation 17 | * instructions between processes using dot files. 18 | * 19 | * @author Jason van Zyl 20 | */ 21 | public class DotDirectiveArchiveFinalizer 22 | extends AbstractArchiveFinalizer 23 | { 24 | private static final String DEFAULT_DOT_FILE_PREFIX = ".plxarc"; 25 | 26 | private final File dotFileDirectory; 27 | 28 | private final String dotFilePrefix; 29 | 30 | public DotDirectiveArchiveFinalizer( File dotFileDirectory ) 31 | { 32 | this( dotFileDirectory, DEFAULT_DOT_FILE_PREFIX ); 33 | } 34 | 35 | public DotDirectiveArchiveFinalizer( File dotFileDirectory, String dotFilePrefix ) 36 | { 37 | this.dotFileDirectory = dotFileDirectory; 38 | 39 | this.dotFilePrefix = dotFilePrefix; 40 | } 41 | 42 | public void finalizeArchiveCreation( Archiver archiver ) 43 | throws ArchiverException 44 | { 45 | try 46 | { 47 | List dotFiles = FileUtils.getFiles( dotFileDirectory, dotFilePrefix + "*", null ); 48 | 49 | for (Object dotFile1 : dotFiles) { 50 | File dotFile = (File) dotFile1; 51 | 52 | BufferedReader in = new BufferedReader(new FileReader(dotFile)); 53 | 54 | String line; 55 | 56 | while ((line = in.readLine()) != null) { 57 | String[] s = StringUtils.split(line, ":"); 58 | 59 | if (s.length == 1) { 60 | File directory = new File(dotFileDirectory, s[0]); 61 | 62 | System.out.println("adding directory = " + directory); 63 | 64 | archiver.addDirectory(directory); 65 | } else { 66 | File directory = new File(dotFileDirectory, s[0]); 67 | 68 | System.out.println("adding directory = " + directory + " to: " + s[1]); 69 | 70 | if (s[1].endsWith("/")) { 71 | archiver.addDirectory(directory, s[1]); 72 | } else { 73 | archiver.addDirectory(directory, s[1] + "/"); 74 | } 75 | } 76 | } 77 | 78 | in.close(); 79 | } 80 | 81 | } 82 | catch ( IOException e ) 83 | { 84 | throw new ArchiverException( "Error processing dot files.", e ); 85 | } 86 | } 87 | 88 | public List getVirtualFiles() 89 | { 90 | return Collections.EMPTY_LIST; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/FileSet.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import java.io.File; 4 | 5 | 6 | /** 7 | * A file set, which consists of the files and directories in 8 | * a common base directory. 9 | * @since 1.0-alpha-9 10 | */ 11 | public interface FileSet 12 | extends BaseFileSet 13 | { 14 | /** 15 | * Returns the file sets base directory. 16 | */ 17 | File getDirectory(); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/FinalizerEnabled.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import java.util.List; 4 | 5 | public interface FinalizerEnabled 6 | { 7 | void addArchiveFinalizer( ArchiveFinalizer finalizer ); 8 | 9 | void setArchiveFinalizers( List archiveFinalizers ); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/ResourceIterator.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import java.util.Iterator; 4 | 5 | public interface ResourceIterator extends Iterator 6 | { 7 | boolean hasNext(); 8 | 9 | ArchiveEntry next(); 10 | 11 | } -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/UnArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import org.codehaus.plexus.components.io.fileselectors.FileSelector; 21 | 22 | import java.io.File; 23 | 24 | /** 25 | * @version $Revision$ $Date$ 26 | */ 27 | public interface UnArchiver 28 | { 29 | String ROLE = UnArchiver.class.getName(); 30 | 31 | /** 32 | * Extract the archive. 33 | * 34 | * @throws ArchiverException 35 | */ 36 | void extract() 37 | throws ArchiverException; 38 | 39 | /** 40 | * Take a patch into the archive and extract it to the specified directory. 41 | * 42 | * @param path 43 | * Path inside the archive to be extracted. 44 | * @param outputDirectory 45 | * Directory to extract to. 46 | * @throws ArchiverException 47 | */ 48 | void extract( String path, File outputDirectory ) 49 | throws ArchiverException; 50 | 51 | File getDestDirectory(); 52 | 53 | void setDestDirectory( File destDirectory ); 54 | 55 | // todo What is this? If you're extracting isn't it always to a directory. I think it would be cool to extract an 56 | // archive to another archive but I don't think we support this right now. 57 | File getDestFile(); 58 | 59 | void setDestFile( File destFile ); 60 | 61 | File getSourceFile(); 62 | 63 | void setSourceFile( File sourceFile ); 64 | 65 | /** 66 | * Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive? 67 | */ 68 | void setOverwrite( boolean b ); 69 | 70 | /** 71 | * Sets a set of {@link FileSelector} instances, which may be used to select the files to extract from the archive. 72 | * If file selectors are present, then a file is only extracted, if it is confirmed by all file selectors. 73 | */ 74 | void setFileSelectors( FileSelector[] selectors ); 75 | 76 | /** 77 | * Returns a set of {@link FileSelector} instances, which may be used to select the files to extract from the 78 | * archive. If file selectors are present, then a file is only extracted, if it is confirmed by all file selectors. 79 | */ 80 | FileSelector[] getFileSelectors(); 81 | 82 | /** 83 | * to use or not the jvm method for file permissions : user all not active for group permissions 84 | * 85 | * @since 1.1 86 | * @param useJvmChmod 87 | */ 88 | void setUseJvmChmod( boolean useJvmChmod ); 89 | 90 | /** 91 | * @since 1.1 92 | * @return 93 | */ 94 | boolean isUseJvmChmod(); 95 | 96 | /** 97 | * @since 1.1 98 | */ 99 | boolean isIgnorePermissions(); 100 | 101 | /** 102 | * @since 1.1 103 | */ 104 | void setIgnorePermissions( final boolean ignorePermissions ); 105 | } 106 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/UnixStat.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | /* 4 | * Copyright 2001,2004 The Apache Software Foundation 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | /** 21 | * Constants from stat.h on Unix systems. 22 | * 23 | * @version $Revision$ $Date$ 24 | * from org.apache.ant.tools.zip.UnixStat v1.9 25 | */ 26 | public interface UnixStat 27 | { 28 | 29 | /** 30 | * Bits used for permissions (and sticky bit) 31 | * 32 | * @since 1.1 33 | */ 34 | int PERM_MASK = 07777; 35 | 36 | /** 37 | * Indicates symbolic links. 38 | * 39 | * @since 1.1 40 | */ 41 | int LINK_FLAG = 0120000; 42 | 43 | /** 44 | * Indicates plain files. 45 | * 46 | * @since 1.1 47 | */ 48 | int FILE_FLAG = 0100000; 49 | 50 | /** 51 | * Indicates directories. 52 | * 53 | * @since 1.1 54 | */ 55 | int DIR_FLAG = 040000; 56 | 57 | // ---------------------------------------------------------- 58 | // somewhat arbitrary choices that are quite common for shared 59 | // installations 60 | // ----------------------------------------------------------- 61 | 62 | /** 63 | * Default permissions for symbolic links. 64 | * 65 | * @since 1.1 66 | */ 67 | int DEFAULT_LINK_PERM = 0777; 68 | 69 | /** 70 | * Default permissions for directories. 71 | * 72 | * @since 1.1 73 | */ 74 | int DEFAULT_DIR_PERM = 0755; 75 | 76 | /** 77 | * Default permissions for plain files. 78 | * 79 | * @since 1.1 80 | */ 81 | int DEFAULT_FILE_PERM = 0644; 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/bzip2/BZip2Archiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.bzip2; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import java.io.IOException; 21 | 22 | import org.codehaus.plexus.archiver.AbstractArchiver; 23 | import org.codehaus.plexus.archiver.ArchiveEntry; 24 | import org.codehaus.plexus.archiver.ArchiverException; 25 | import org.codehaus.plexus.archiver.ResourceIterator; 26 | 27 | /** 28 | * @version $Revision$ $Date$ 29 | */ 30 | public class BZip2Archiver 31 | extends AbstractArchiver 32 | { 33 | private BZip2Compressor compressor = new BZip2Compressor(); 34 | 35 | public void execute() 36 | throws ArchiverException, IOException 37 | { 38 | if ( !checkForced() ) 39 | { 40 | return; 41 | } 42 | 43 | ResourceIterator iter = getResources(); 44 | ArchiveEntry entry = iter.next(); 45 | if ( iter.hasNext() ) 46 | { 47 | throw new ArchiverException( "There is more than one file in input." ); 48 | } 49 | compressor.setSource( entry.getResource() ); 50 | compressor.setDestFile( getDestFile() ); 51 | compressor.compress(); 52 | } 53 | 54 | public boolean isSupportingForced() 55 | { 56 | return true; 57 | } 58 | 59 | protected void close() 60 | { 61 | compressor.close(); 62 | } 63 | 64 | protected String getArchiveType() 65 | { 66 | return "bzip2"; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/bzip2/BZip2Compressor.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.bzip2; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream; 21 | import org.codehaus.plexus.archiver.ArchiverException; 22 | import org.codehaus.plexus.archiver.util.Compressor; 23 | import org.codehaus.plexus.util.IOUtil; 24 | 25 | import java.io.IOException; 26 | 27 | import static org.codehaus.plexus.archiver.util.Streams.bufferedOutputStream; 28 | import static org.codehaus.plexus.archiver.util.Streams.fileOutputStream; 29 | 30 | /** 31 | * @version $Revision$ $Date$ 32 | */ 33 | public class BZip2Compressor 34 | extends Compressor 35 | { 36 | private BZip2CompressorOutputStream zOut; 37 | 38 | /** 39 | * perform the BZip2 compression operation. 40 | */ 41 | public void compress() 42 | throws ArchiverException 43 | { 44 | try 45 | { 46 | zOut = new BZip2CompressorOutputStream( bufferedOutputStream( fileOutputStream( getDestFile() ) ) ); 47 | compress( getSource(), zOut ); 48 | } 49 | catch ( IOException ioe ) 50 | { 51 | String msg = "Problem creating bzip2 " + ioe.getMessage(); 52 | throw new ArchiverException( msg, ioe ); 53 | } 54 | } 55 | 56 | public void close() 57 | { 58 | IOUtil.close( zOut ); 59 | zOut = null; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/bzip2/BZip2UnArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.bzip2; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import java.io.File; 21 | import java.io.IOException; 22 | import java.io.InputStream; 23 | 24 | import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream; 25 | import org.codehaus.plexus.archiver.AbstractUnArchiver; 26 | import org.codehaus.plexus.archiver.ArchiverException; 27 | 28 | import javax.annotation.Nonnull; 29 | 30 | import static org.codehaus.plexus.archiver.util.Streams.*; 31 | 32 | /** 33 | * @author Emmanuel Venisse 34 | * @version $Revision$ $Date$ 35 | */ 36 | public class BZip2UnArchiver 37 | extends AbstractUnArchiver 38 | { 39 | private final static String OPERATION_BZIP2 = "bzip2"; 40 | 41 | public BZip2UnArchiver() 42 | { 43 | } 44 | 45 | public BZip2UnArchiver( File sourceFile ) 46 | { 47 | super( sourceFile ); 48 | } 49 | 50 | protected void execute() 51 | throws ArchiverException 52 | { 53 | if ( getSourceFile().lastModified() > getDestFile().lastModified() ) 54 | { 55 | getLogger().info( 56 | "Expanding " + getSourceFile().getAbsolutePath() + " to " + getDestFile().getAbsolutePath() ); 57 | 58 | copyFully( getBZip2InputStream( bufferedInputStream( fileInputStream( getSourceFile(), OPERATION_BZIP2 ) ) ), 59 | bufferedOutputStream( fileOutputStream( getDestFile(), OPERATION_BZIP2 ) ), OPERATION_BZIP2 ); 60 | } 61 | } 62 | 63 | public static 64 | @Nonnull 65 | BZip2CompressorInputStream getBZip2InputStream( InputStream bis ) 66 | throws ArchiverException 67 | { 68 | try 69 | { 70 | return new BZip2CompressorInputStream( bis ); 71 | } 72 | catch ( IOException e ) 73 | { 74 | throw new ArchiverException( "Trouble creating BZIP2 compressor, invalid file ?", e ); 75 | } 76 | } 77 | 78 | protected void execute( String path, File outputDirectory ) 79 | { 80 | throw new UnsupportedOperationException( "Targeted extraction not supported in BZIP2 format." ); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/bzip2/PlexusIoBzip2ResourceCollection.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.bzip2; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.util.HashMap; 8 | 9 | import org.codehaus.plexus.components.io.attributes.Java7FileAttributes; 10 | import org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes; 11 | import org.codehaus.plexus.components.io.resources.PlexusIoCompressedFileResourceCollection; 12 | import org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection; 13 | import org.codehaus.plexus.util.IOUtil; 14 | 15 | import javax.annotation.Nonnull; 16 | import javax.annotation.WillNotClose; 17 | 18 | 19 | /** 20 | * Implementation of {@link PlexusIoResourceCollection} for 21 | * bzip2 compressed files. 22 | */ 23 | public class PlexusIoBzip2ResourceCollection 24 | extends PlexusIoCompressedFileResourceCollection 25 | { 26 | @Nonnull 27 | protected @WillNotClose InputStream getInputStream( File file ) 28 | throws IOException 29 | { 30 | InputStream fis = new FileInputStream( file ); 31 | try 32 | { 33 | final InputStream result = BZip2UnArchiver.getBZip2InputStream( fis ); 34 | fis = null; 35 | return result; 36 | } 37 | finally 38 | { 39 | IOUtil.close( fis ); 40 | } 41 | } 42 | 43 | 44 | @Override protected PlexusIoResourceAttributes getAttributes(File file) throws IOException { 45 | return new Java7FileAttributes(file, new HashMap(), new HashMap()); 46 | } 47 | 48 | protected String getDefaultExtension() 49 | { 50 | return ".bz2"; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/filters/JarSecurityFileFilter.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.filters; 2 | 3 | import java.io.InputStream; 4 | 5 | import org.codehaus.plexus.archiver.ArchiveFileFilter; 6 | import org.codehaus.plexus.archiver.ArchiveFilterException; 7 | import org.codehaus.plexus.util.SelectorUtils; 8 | 9 | 10 | /** 11 | * @deprecated Use {@link JarSecurityFileSelector} 12 | */ 13 | public class JarSecurityFileFilter 14 | implements ArchiveFileFilter 15 | { 16 | public static final String[] SECURITY_FILE_PATTERNS = JarSecurityFileSelector.SECURITY_FILE_PATTERNS; 17 | 18 | public boolean include( InputStream dataStream, String entryName ) 19 | { 20 | for (String pattern : SECURITY_FILE_PATTERNS) { 21 | if (SelectorUtils.match(pattern, entryName)) { 22 | return false; 23 | } 24 | } 25 | 26 | return true; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/filters/JarSecurityFileSelector.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.filters; 2 | 3 | /* 4 | * Copyright 2007 The Codehaus Foundation. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 7 | * in compliance with the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software distributed under the License 12 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 13 | * or implied. See the License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | import java.io.IOException; 17 | 18 | import org.codehaus.plexus.components.io.fileselectors.FileInfo; 19 | import org.codehaus.plexus.components.io.fileselectors.FileSelector; 20 | import org.codehaus.plexus.util.SelectorUtils; 21 | 22 | /** 23 | * @version $Id$ 24 | * @since 1.0-alpha-9 25 | */ 26 | public class JarSecurityFileSelector 27 | implements FileSelector 28 | { 29 | public static final String ROLE_HINT = "jar-security"; 30 | 31 | public static final String[] SECURITY_FILE_PATTERNS = { 32 | "META-INF/*.RSA", 33 | "META-INF/*.DSA", 34 | "META-INF/*.SF", 35 | "META-INF/*.rsa", 36 | "META-INF/*.dsa", 37 | "META-INF/*.sf" }; 38 | 39 | public boolean isSelected( FileInfo fileInfo ) 40 | throws IOException 41 | { 42 | String name = fileInfo.getName(); 43 | for (String pattern : SECURITY_FILE_PATTERNS) { 44 | if (SelectorUtils.match(pattern, name)) { 45 | return false; 46 | } 47 | } 48 | 49 | return true; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/gzip/GZipArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.gzip; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import org.codehaus.plexus.archiver.AbstractArchiver; 21 | import org.codehaus.plexus.archiver.ArchiveEntry; 22 | import org.codehaus.plexus.archiver.ArchiverException; 23 | import org.codehaus.plexus.archiver.ResourceIterator; 24 | 25 | import java.io.IOException; 26 | 27 | /** 28 | * @version $Revision$ $Date$ 29 | */ 30 | public class GZipArchiver 31 | extends AbstractArchiver 32 | { 33 | final GZipCompressor compressor = new GZipCompressor(); 34 | 35 | protected void execute() 36 | throws ArchiverException, IOException 37 | { 38 | if ( !checkForced() ) 39 | { 40 | return; 41 | } 42 | 43 | ResourceIterator iter = getResources(); 44 | ArchiveEntry entry = iter.next(); 45 | if ( iter.hasNext() ) 46 | { 47 | throw new ArchiverException( "There is more than one file in input." ); 48 | } 49 | compressor.setSource( entry.getResource() ); 50 | compressor.setDestFile( getDestFile() ); 51 | compressor.compress(); 52 | } 53 | 54 | public boolean isSupportingForced() 55 | { 56 | return true; 57 | } 58 | 59 | protected void close() 60 | { 61 | compressor.close(); 62 | } 63 | 64 | protected String getArchiveType() 65 | { 66 | return "gzip"; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/gzip/GZipCompressor.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.gzip; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import org.codehaus.plexus.archiver.ArchiverException; 21 | import org.codehaus.plexus.archiver.util.Streams; 22 | import org.codehaus.plexus.archiver.util.Compressor; 23 | import org.codehaus.plexus.util.IOUtil; 24 | 25 | import java.io.FileOutputStream; 26 | import java.io.IOException; 27 | import java.util.zip.GZIPOutputStream; 28 | 29 | /** 30 | * @version $Revision$ $Date$ 31 | */ 32 | public class GZipCompressor 33 | extends Compressor 34 | { 35 | private GZIPOutputStream zOut; 36 | 37 | /** 38 | * perform the GZip compression operation. 39 | */ 40 | public void compress() 41 | throws ArchiverException 42 | { 43 | try 44 | { 45 | zOut = new GZIPOutputStream( Streams.bufferedOutputStream( new FileOutputStream( getDestFile() ) )); 46 | compress( getSource(), zOut ); 47 | } 48 | catch ( IOException ioe ) 49 | { 50 | String msg = "Problem creating gzip " + ioe.getMessage(); 51 | throw new ArchiverException( msg, ioe ); 52 | } 53 | } 54 | 55 | public void close() 56 | { 57 | IOUtil.close( zOut ); 58 | zOut = null; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/gzip/GZipUnArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.gzip; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import org.codehaus.plexus.archiver.AbstractUnArchiver; 21 | import org.codehaus.plexus.archiver.ArchiverException; 22 | 23 | import java.io.FileInputStream; 24 | import java.io.File; 25 | import java.io.IOException; 26 | import java.util.zip.GZIPInputStream; 27 | 28 | import static org.codehaus.plexus.archiver.util.Streams.*; 29 | 30 | /** 31 | * @author Emmanuel Venisse 32 | * @version $Revision$ $Date$ 33 | */ 34 | public class GZipUnArchiver 35 | extends AbstractUnArchiver 36 | { 37 | private static final String OPERATION_GZIP = "gzip"; 38 | 39 | 40 | public GZipUnArchiver() 41 | { 42 | } 43 | 44 | public GZipUnArchiver( File sourceFile ) 45 | { 46 | super( sourceFile ); 47 | } 48 | 49 | protected void execute() 50 | throws ArchiverException 51 | { 52 | if ( getSourceFile().lastModified() > getDestFile().lastModified() ) 53 | { 54 | getLogger().info( 55 | "Expanding " + getSourceFile().getAbsolutePath() + " to " + getDestFile().getAbsolutePath() ); 56 | 57 | copyFully( getGzipInputStream( fileInputStream( getSourceFile(), OPERATION_GZIP ) ), 58 | fileOutputStream( getDestFile(), OPERATION_GZIP ), OPERATION_GZIP ); 59 | } 60 | } 61 | 62 | private GZIPInputStream getGzipInputStream( FileInputStream in ) 63 | throws ArchiverException 64 | { 65 | try 66 | { 67 | return new GZIPInputStream( in ); 68 | } 69 | catch ( IOException e ) 70 | { 71 | throw new ArchiverException( "Problem creating GZIP input stream", e ); 72 | } 73 | } 74 | 75 | protected void execute( String path, File outputDirectory ) 76 | { 77 | throw new UnsupportedOperationException( "Targeted extraction not supported in GZIP format." ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/gzip/PlexusIoGzipResourceCollection.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.gzip; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.util.HashMap; 8 | import java.util.zip.GZIPInputStream; 9 | 10 | import org.codehaus.plexus.components.io.attributes.Java7FileAttributes; 11 | import org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes; 12 | import org.codehaus.plexus.components.io.resources.PlexusIoCompressedFileResourceCollection; 13 | import org.codehaus.plexus.util.IOUtil; 14 | 15 | import javax.annotation.Nonnull; 16 | 17 | 18 | /** 19 | * Abstract base class for compressed files, aka singleton 20 | * resource collections. 21 | */ 22 | public class PlexusIoGzipResourceCollection 23 | extends PlexusIoCompressedFileResourceCollection 24 | { 25 | protected String getDefaultExtension() 26 | { 27 | return ".gz"; 28 | } 29 | 30 | @Nonnull 31 | protected InputStream getInputStream( File file ) 32 | throws IOException 33 | { 34 | InputStream fis = new FileInputStream( file ); 35 | try 36 | { 37 | InputStream result = new GZIPInputStream( fis ); 38 | fis = null; 39 | return result; 40 | } 41 | finally 42 | { 43 | IOUtil.close( fis ); 44 | } 45 | } 46 | 47 | @Override protected PlexusIoResourceAttributes getAttributes(File file) throws IOException { 48 | return new Java7FileAttributes(file, new HashMap(), new HashMap()); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/jar/ManifestConstants.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.jar; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | /** 21 | * Manifest constants 22 | * Not part of any public API 23 | */ 24 | class ManifestConstants 25 | { 26 | /** 27 | * The standard manifest version header 28 | */ 29 | public static final String ATTRIBUTE_MANIFEST_VERSION = "Manifest-Version"; 30 | 31 | /** 32 | * The standard Signature Version header 33 | */ 34 | public static final String ATTRIBUTE_SIGNATURE_VERSION = "Signature-Version"; 35 | 36 | /** 37 | * The Name Attribute is the first in a named section 38 | */ 39 | public static final String ATTRIBUTE_NAME = "Name"; 40 | 41 | /** 42 | * The From Header is disallowed in a Manifest 43 | */ 44 | public static final String ATTRIBUTE_FROM = "From"; 45 | 46 | /** 47 | * The Class-Path Header is special - it can be duplicated 48 | */ 49 | public static final String ATTRIBUTE_CLASSPATH = "Class-Path"; 50 | 51 | /** 52 | * Default Manifest version if one is not specified 53 | */ 54 | public static final String DEFAULT_MANIFEST_VERSION = "1.0"; 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/jar/ManifestException.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.jar; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | /** 21 | * Exception thrown indicating problems in a JAR Manifest 22 | */ 23 | public class ManifestException 24 | extends Exception 25 | { 26 | /** 27 | * Constructs an exception with the given descriptive message. 28 | * 29 | * @param msg Description of or information about the exception. 30 | */ 31 | public ManifestException( String msg ) 32 | { 33 | super( msg ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/manager/ArchiverManager.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.manager; 2 | 3 | /* 4 | * Copyright 2001,2004 The Apache Software Foundation 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | 21 | import java.io.File; 22 | 23 | import javax.annotation.Nonnull; 24 | 25 | import org.codehaus.plexus.archiver.Archiver; 26 | import org.codehaus.plexus.archiver.UnArchiver; 27 | import org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection; 28 | 29 | /** 30 | * @author dantran 31 | * @version $Revision: 32 | */ 33 | public interface ArchiverManager 34 | { 35 | String ROLE = ArchiverManager.class.getName(); 36 | 37 | @Nonnull Archiver getArchiver( @Nonnull String archiverName ) 38 | throws NoSuchArchiverException; 39 | 40 | @Nonnull Archiver getArchiver( @Nonnull File file ) 41 | throws NoSuchArchiverException; 42 | 43 | @Nonnull UnArchiver getUnArchiver( @Nonnull String unArchiverName ) 44 | throws NoSuchArchiverException; 45 | 46 | @Nonnull UnArchiver getUnArchiver( @Nonnull File file ) 47 | throws NoSuchArchiverException; 48 | 49 | @Nonnull PlexusIoResourceCollection getResourceCollection( @Nonnull File file ) 50 | throws NoSuchArchiverException; 51 | 52 | @Nonnull 53 | PlexusIoResourceCollection getResourceCollection( String unArchiverName ) 54 | throws NoSuchArchiverException; 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/manager/NoSuchArchiverException.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.manager; 2 | 3 | /* 4 | * Copyright 2001,2004 The Apache Software Foundation 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | /** 21 | * @author dantran 22 | * @version $Revision: 23 | */ 24 | 25 | public class NoSuchArchiverException 26 | extends Exception 27 | { 28 | private String archiverName; 29 | 30 | public NoSuchArchiverException( String archiverName ) 31 | { 32 | super( "No such archiver: '" + archiverName + "'." ); 33 | 34 | this.archiverName = archiverName; 35 | } 36 | 37 | public String getArchiver() 38 | { 39 | return archiverName; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/resources/PlexusIoVirtualFileResource.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.resources; 2 | 3 | /* 4 | * Copyright 2014 The Codehaus Foundation. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import java.io.File; 20 | import java.io.IOException; 21 | import java.io.InputStream; 22 | import java.net.URL; 23 | 24 | import org.codehaus.plexus.components.io.attributes.Java7AttributeUtils; 25 | import org.codehaus.plexus.components.io.attributes.Java7Reflector; 26 | import org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes; 27 | import org.codehaus.plexus.components.io.functions.ResourceAttributeSupplier; 28 | import org.codehaus.plexus.components.io.resources.AbstractPlexusIoResource; 29 | 30 | /** 31 | * A file resource that does not necessarily exist (anywhere). 32 | */ 33 | public class PlexusIoVirtualFileResource 34 | extends AbstractPlexusIoResource 35 | implements ResourceAttributeSupplier 36 | { 37 | private final File file; 38 | 39 | protected PlexusIoVirtualFileResource(File file, String name) 40 | { 41 | super( name, file.lastModified(), file.length(), file.isFile(), file.isDirectory(), file.exists() ); 42 | this.file = file; 43 | } 44 | 45 | protected static String getName( File file ) 46 | { 47 | return file.getPath().replace( '\\', '/' ); 48 | } 49 | 50 | /** 51 | * Returns the resources file. 52 | */ 53 | public File getFile() 54 | { 55 | return file; 56 | } 57 | 58 | public InputStream getContents() 59 | throws IOException 60 | { 61 | throw new UnsupportedOperationException("We're not really sure we can do this"); 62 | //return new FileInputStream( getFile() ); 63 | } 64 | 65 | public URL getURL() 66 | throws IOException 67 | { 68 | return getFile().toURI().toURL(); 69 | } 70 | 71 | public long getSize() 72 | { 73 | return getFile().length(); 74 | } 75 | 76 | public boolean isDirectory() 77 | { 78 | return getFile().isDirectory(); 79 | } 80 | 81 | public boolean isExisting() 82 | { 83 | return getFile().exists(); 84 | } 85 | 86 | public boolean isFile() 87 | { 88 | return getFile().isFile(); 89 | } 90 | 91 | public PlexusIoResourceAttributes getAttributes() 92 | { 93 | return null; 94 | } 95 | 96 | public long getLastModified() 97 | { 98 | if (file.exists()) { 99 | if (Java7Reflector.isAtLeastJava7()) { 100 | return Java7AttributeUtils.getLastModified(getFile()); 101 | } else { 102 | return getFile().lastModified(); 103 | } 104 | } else return System.currentTimeMillis(); 105 | } 106 | 107 | @Override public boolean isSymbolicLink() { 108 | return getAttributes().isSymbolicLink(); 109 | } 110 | } -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/resources/PlexusIoVirtualSymlinkResource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 The Codehaus Foundation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.codehaus.plexus.archiver.resources; 18 | 19 | import java.io.File; 20 | import java.io.IOException; 21 | 22 | import org.codehaus.plexus.components.io.attributes.SymlinkUtils; 23 | import org.codehaus.plexus.components.io.functions.SymlinkDestinationSupplier; 24 | 25 | /** 26 | * A symlink that does not necessarily exist (anywhere). 27 | */ 28 | 29 | public class PlexusIoVirtualSymlinkResource extends PlexusIoVirtualFileResource 30 | implements SymlinkDestinationSupplier { 31 | private final String symnlinkDestination; 32 | 33 | public PlexusIoVirtualSymlinkResource(File symlinkFile, String symnlinkDestination) 34 | { 35 | super( symlinkFile, getName(symlinkFile) ); 36 | this.symnlinkDestination = symnlinkDestination; 37 | } 38 | 39 | public String getSymlinkDestination() 40 | throws IOException 41 | { 42 | return symnlinkDestination == null ? SymlinkUtils.readSymbolicLink(getFile()).toString() : symnlinkDestination; 43 | } 44 | 45 | @Override public boolean isSymbolicLink() { 46 | return true; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/snappy/PlexusIoSnappyResourceCollection.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.snappy; 2 | 3 | import org.codehaus.plexus.components.io.attributes.Java7FileAttributes; 4 | import org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes; 5 | import org.codehaus.plexus.components.io.resources.PlexusIoCompressedFileResourceCollection; 6 | import org.codehaus.plexus.util.IOUtil; 7 | 8 | import javax.annotation.Nonnull; 9 | import javax.annotation.WillNotClose; 10 | import java.io.File; 11 | import java.io.FileInputStream; 12 | import java.io.IOException; 13 | import java.io.InputStream; 14 | import java.util.HashMap; 15 | 16 | 17 | /** 18 | * Implementation of {@link org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection} for 19 | * snappy compressed files. 20 | */ 21 | public class PlexusIoSnappyResourceCollection 22 | extends PlexusIoCompressedFileResourceCollection 23 | { 24 | @Nonnull 25 | protected @WillNotClose InputStream getInputStream( File file ) 26 | throws IOException 27 | { 28 | InputStream fis = new FileInputStream( file ); 29 | try 30 | { 31 | final InputStream result = SnappyUnArchiver.getSnappyInputStream( fis ); 32 | fis = null; 33 | return result; 34 | } 35 | finally 36 | { 37 | IOUtil.close( fis ); 38 | } 39 | } 40 | 41 | 42 | @Override protected PlexusIoResourceAttributes getAttributes(File file) throws IOException { 43 | return new Java7FileAttributes(file, new HashMap(), new HashMap()); 44 | } 45 | 46 | protected String getDefaultExtension() 47 | { 48 | return ".snappy"; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/snappy/SnappyArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.snappy; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import org.codehaus.plexus.archiver.AbstractArchiver; 21 | import org.codehaus.plexus.archiver.ArchiveEntry; 22 | import org.codehaus.plexus.archiver.ArchiverException; 23 | import org.codehaus.plexus.archiver.ResourceIterator; 24 | 25 | import java.io.IOException; 26 | 27 | /** 28 | * Snappy archiver. 29 | */ 30 | public class SnappyArchiver 31 | extends AbstractArchiver 32 | { 33 | private SnappyCompressor compressor = new SnappyCompressor(); 34 | 35 | public void execute() 36 | throws ArchiverException, IOException 37 | { 38 | if ( !checkForced() ) 39 | { 40 | return; 41 | } 42 | 43 | ResourceIterator iter = getResources(); 44 | ArchiveEntry entry = iter.next(); 45 | if ( iter.hasNext() ) 46 | { 47 | throw new ArchiverException( "There is more than one file in input." ); 48 | } 49 | compressor.setSource( entry.getResource() ); 50 | compressor.setDestFile( getDestFile() ); 51 | compressor.compress(); 52 | } 53 | 54 | public boolean isSupportingForced() 55 | { 56 | return true; 57 | } 58 | 59 | protected void close() 60 | { 61 | compressor.close(); 62 | } 63 | 64 | protected String getArchiveType() 65 | { 66 | return "snappy"; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/snappy/SnappyCompressor.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.snappy; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import org.codehaus.plexus.archiver.ArchiverException; 21 | import org.codehaus.plexus.archiver.util.Compressor; 22 | import org.codehaus.plexus.util.IOUtil; 23 | import org.xerial.snappy.SnappyOutputStream; 24 | 25 | import java.io.IOException; 26 | 27 | import static org.codehaus.plexus.archiver.util.Streams.bufferedOutputStream; 28 | import static org.codehaus.plexus.archiver.util.Streams.fileOutputStream; 29 | 30 | /** 31 | * Snappy compression 32 | */ 33 | public class SnappyCompressor 34 | extends Compressor 35 | { 36 | private SnappyOutputStream zOut; 37 | 38 | /** 39 | * perform the Snappy compression operation. 40 | */ 41 | public void compress() 42 | throws ArchiverException 43 | { 44 | try 45 | { 46 | zOut = new SnappyOutputStream( bufferedOutputStream( fileOutputStream( getDestFile() ) ) ); 47 | compress( getSource(), zOut ); 48 | } 49 | catch ( IOException ioe ) 50 | { 51 | String msg = "Problem creating snappy " + ioe.getMessage(); 52 | throw new ArchiverException( msg, ioe ); 53 | } 54 | } 55 | 56 | public void close() 57 | { 58 | IOUtil.close( zOut ); 59 | zOut = null; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/snappy/SnappyUnArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.snappy; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import org.codehaus.plexus.archiver.AbstractUnArchiver; 21 | import org.codehaus.plexus.archiver.ArchiverException; 22 | import org.xerial.snappy.SnappyInputStream; 23 | 24 | import javax.annotation.Nonnull; 25 | import java.io.File; 26 | import java.io.IOException; 27 | import java.io.InputStream; 28 | 29 | import static org.codehaus.plexus.archiver.util.Streams.bufferedInputStream; 30 | import static org.codehaus.plexus.archiver.util.Streams.bufferedOutputStream; 31 | import static org.codehaus.plexus.archiver.util.Streams.copyFully; 32 | import static org.codehaus.plexus.archiver.util.Streams.fileInputStream; 33 | import static org.codehaus.plexus.archiver.util.Streams.fileOutputStream; 34 | 35 | /** 36 | * Unarchiver for snappy-compressed files. 37 | */ 38 | public class SnappyUnArchiver 39 | extends AbstractUnArchiver 40 | { 41 | private final static String OPERATION_SNAPPY = "snappy"; 42 | 43 | public SnappyUnArchiver() 44 | { 45 | } 46 | 47 | public SnappyUnArchiver(File sourceFile) 48 | { 49 | super( sourceFile ); 50 | } 51 | 52 | protected void execute() 53 | throws ArchiverException 54 | { 55 | if ( getSourceFile().lastModified() > getDestFile().lastModified() ) 56 | { 57 | getLogger().info( 58 | "Expanding " + getSourceFile().getAbsolutePath() + " to " + getDestFile().getAbsolutePath() ); 59 | 60 | copyFully( getSnappyInputStream(bufferedInputStream(fileInputStream(getSourceFile(), OPERATION_SNAPPY))), 61 | bufferedOutputStream( fileOutputStream( getDestFile(), OPERATION_SNAPPY) ), OPERATION_SNAPPY); 62 | } 63 | } 64 | 65 | public static 66 | @Nonnull 67 | SnappyInputStream getSnappyInputStream( InputStream bis ) 68 | throws ArchiverException 69 | { 70 | try 71 | { 72 | return new SnappyInputStream( bis ); 73 | } 74 | catch ( IOException e ) 75 | { 76 | throw new ArchiverException( "Trouble creating Snappy compressor, invalid file ?", e ); 77 | } 78 | } 79 | 80 | protected void execute( String path, File outputDirectory ) 81 | { 82 | throw new UnsupportedOperationException( "Targeted extraction not supported in Snappy format." ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/BZip2TarFile.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | 7 | import org.codehaus.plexus.archiver.bzip2.BZip2UnArchiver; 8 | 9 | 10 | /** 11 | * Extension of {@link TarFile} for bzip2 compressed files. 12 | */ 13 | public class BZip2TarFile extends TarFile 14 | { 15 | /** 16 | * Creates a new instance with the given file. 17 | */ 18 | public BZip2TarFile( File file ) 19 | { 20 | super( file ); 21 | } 22 | 23 | protected InputStream getInputStream( File file ) 24 | throws IOException 25 | { 26 | return BZip2UnArchiver.getBZip2InputStream( super.getInputStream( file ) ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/GZipTarFile.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | import java.util.zip.GZIPInputStream; 7 | 8 | 9 | /** 10 | * Extension of {@link TarFile} for gzip compressed files. 11 | */ 12 | public class GZipTarFile extends TarFile 13 | { 14 | /** 15 | * Creates a new instance with the given file. 16 | */ 17 | public GZipTarFile( File file ) 18 | { 19 | super( file ); 20 | } 21 | 22 | protected InputStream getInputStream( File file ) 23 | throws IOException 24 | { 25 | final InputStream inputStream = super.getInputStream( file ); 26 | return new GZIPInputStream( inputStream ) 27 | { 28 | public void close() 29 | throws IOException 30 | { 31 | super.close(); 32 | inputStream.close(); 33 | } 34 | }; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/PlexusIoTarBZip2FileResourceCollection.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | import java.io.File; 4 | 5 | public class PlexusIoTarBZip2FileResourceCollection 6 | extends PlexusIoTarFileResourceCollection 7 | { 8 | 9 | protected TarFile newTarFile( File file ) 10 | { 11 | return new BZip2TarFile( file ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/PlexusIoTarFileResourceCollection.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | import java.io.Closeable; 4 | import java.io.File; 5 | import java.io.IOException; 6 | import java.util.Enumeration; 7 | import java.util.Iterator; 8 | 9 | import org.apache.commons.compress.archivers.tar.TarArchiveEntry; 10 | import org.codehaus.plexus.components.io.resources.AbstractPlexusIoArchiveResourceCollection; 11 | import org.codehaus.plexus.components.io.resources.PlexusIoResource; 12 | 13 | 14 | public class PlexusIoTarFileResourceCollection 15 | extends AbstractPlexusIoArchiveResourceCollection implements Closeable 16 | { 17 | /** 18 | * The zip file resource collections role hint. 19 | */ 20 | public static final String ROLE_HINT = "tar"; 21 | 22 | protected TarFile newTarFile( File file ) 23 | { 24 | return new TarFile( file ); 25 | } 26 | 27 | TarFile tarFile = null; 28 | 29 | public void close() 30 | throws IOException 31 | { 32 | if (tarFile != null) tarFile.close(); 33 | 34 | } 35 | 36 | protected Iterator getEntries() 37 | throws IOException 38 | { 39 | final File f = getFile(); 40 | if ( f == null ) 41 | { 42 | throw new IOException( "The tar archive file has not been set." ); 43 | } 44 | if (tarFile == null) 45 | tarFile = newTarFile( f ); 46 | final Enumeration en = tarFile.getEntries(); 47 | return new Iterator() 48 | { 49 | public boolean hasNext() 50 | { 51 | return en.hasMoreElements(); 52 | } 53 | 54 | public PlexusIoResource next() 55 | { 56 | final TarArchiveEntry entry = (TarArchiveEntry) en.nextElement(); 57 | return new TarResource( tarFile, entry ); 58 | } 59 | 60 | public void remove() 61 | { 62 | throw new UnsupportedOperationException( "Removing isn't implemented." ); 63 | } 64 | }; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/PlexusIoTarGZipFileResourceCollection.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | import java.io.File; 4 | 5 | public class PlexusIoTarGZipFileResourceCollection 6 | extends PlexusIoTarFileResourceCollection 7 | { 8 | protected TarFile newTarFile( File file ) 9 | { 10 | return new GZipTarFile( file ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/PlexusIoTarSnappyFileResourceCollection.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | import java.io.File; 4 | 5 | public class PlexusIoTarSnappyFileResourceCollection 6 | extends PlexusIoTarFileResourceCollection 7 | { 8 | 9 | protected TarFile newTarFile( File file ) 10 | { 11 | return new SnappyTarFile( file ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/SnappyTarFile.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | import org.codehaus.plexus.archiver.snappy.SnappyUnArchiver; 4 | 5 | import java.io.File; 6 | import java.io.IOException; 7 | import java.io.InputStream; 8 | 9 | 10 | /** 11 | * Extension of {@link org.codehaus.plexus.archiver.tar.TarFile} for snappy compressed files. 12 | */ 13 | public class SnappyTarFile extends TarFile 14 | { 15 | /** 16 | * Creates a new instance with the given file. 17 | */ 18 | public SnappyTarFile(File file) 19 | { 20 | super( file ); 21 | } 22 | 23 | protected InputStream getInputStream( File file ) 24 | throws IOException 25 | { 26 | return SnappyUnArchiver.getSnappyInputStream( super.getInputStream( file )); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/TarBZip2UnArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import java.io.File; 21 | 22 | /** 23 | * Extract files in tar with bzip2 compression 24 | * @author Dan Tran 25 | * @version $Revision: $ 26 | */ 27 | public class TarBZip2UnArchiver 28 | extends TarUnArchiver 29 | { 30 | public TarBZip2UnArchiver() 31 | { 32 | this.setupCompressionMethod(); 33 | } 34 | 35 | public TarBZip2UnArchiver( File sourceFile ) 36 | { 37 | super( sourceFile ); 38 | this.setupCompressionMethod(); 39 | } 40 | 41 | private void setupCompressionMethod() 42 | { 43 | this.setCompression(UntarCompressionMethod.BZIP2); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/TarGZipUnArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import java.io.File; 21 | 22 | /** 23 | * Extract files in tar with gzip compression 24 | * @author Dan Tran 25 | * @version $Revision: $ 26 | */ 27 | public class TarGZipUnArchiver 28 | extends TarUnArchiver 29 | { 30 | public TarGZipUnArchiver() 31 | { 32 | this.setupCompressionMethod(); 33 | } 34 | 35 | public TarGZipUnArchiver( File sourceFile ) 36 | { 37 | super( sourceFile ); 38 | this.setupCompressionMethod(); 39 | } 40 | 41 | private void setupCompressionMethod() 42 | { 43 | this.setCompression(UntarCompressionMethod.GZIP); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/TarLongFileMode.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | /* 4 | * Copyright 2000-2004 The Apache Software Foundation 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | /** 21 | * Set of options for long file handling in the task. 22 | */ 23 | public enum TarLongFileMode 24 | { 25 | warn, 26 | fail, 27 | truncate, 28 | gnu, 29 | omit, 30 | posix, 31 | posix_warn; 32 | 33 | 34 | /** 35 | * @return true if value is "truncate". 36 | */ 37 | public boolean isTruncateMode() 38 | { 39 | return truncate.equals(this); 40 | } 41 | 42 | /** 43 | * @return true if value is "warn". 44 | */ 45 | public boolean isWarnMode() 46 | { 47 | return warn.equals(this); 48 | } 49 | 50 | /** 51 | * @return true if value is "gnu". 52 | */ 53 | public boolean isGnuMode() 54 | { 55 | return gnu.equals(this); 56 | } 57 | 58 | /** 59 | * @return true if value is "fail". 60 | */ 61 | public boolean isFailMode() 62 | { 63 | return fail.equals(this); 64 | } 65 | 66 | /** 67 | * @return true if value is "omit". 68 | */ 69 | public boolean isOmitMode() 70 | { 71 | return omit.equals(this); 72 | } 73 | 74 | /** 75 | * @return true if value is "posix". 76 | */ 77 | public boolean isPosixMode() 78 | { 79 | return posix.equals(this); 80 | } 81 | 82 | /** 83 | * @return true if value is "posix_warn". 84 | */ 85 | public boolean isPosixWarnMode() 86 | { 87 | return posix_warn.equals( this ); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/TarResource.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.net.URL; 6 | 7 | import org.apache.commons.compress.archivers.tar.TarArchiveEntry; 8 | import org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes; 9 | import org.codehaus.plexus.components.io.attributes.SimpleResourceAttributes; 10 | import org.codehaus.plexus.components.io.functions.ResourceAttributeSupplier; 11 | import org.codehaus.plexus.components.io.resources.AbstractPlexusIoResource; 12 | import org.codehaus.plexus.components.io.resources.PlexusIoResource; 13 | 14 | public class TarResource 15 | extends AbstractPlexusIoResource 16 | implements ResourceAttributeSupplier 17 | { 18 | 19 | private final TarFile tarFile; 20 | private final TarArchiveEntry entry; 21 | private PlexusIoResourceAttributes attributes; 22 | 23 | public TarResource( TarFile tarFile, TarArchiveEntry entry ) 24 | { 25 | super(entry.getName(), getLastModifiedTime( entry ), entry.isDirectory() ? PlexusIoResource.UNKNOWN_RESOURCE_SIZE : entry.getSize(), 26 | !entry.isDirectory(), entry.isDirectory(), true); 27 | this.tarFile = tarFile; 28 | this.entry = entry; 29 | } 30 | 31 | private static long getLastModifiedTime( TarArchiveEntry entry ) 32 | { 33 | long l = entry.getModTime().getTime(); 34 | return l == -1 ? PlexusIoResource.UNKNOWN_MODIFICATION_DATE : l; 35 | } 36 | 37 | public synchronized PlexusIoResourceAttributes getAttributes() 38 | { 39 | if ( attributes == null ) 40 | { 41 | attributes = new SimpleResourceAttributes(entry.getUserId(), entry.getUserName(), entry.getGroupId(), entry.getGroupName(), entry.getMode()); 42 | } 43 | 44 | return attributes; 45 | } 46 | 47 | public synchronized void setAttributes( PlexusIoResourceAttributes attributes ) 48 | { 49 | this.attributes = attributes; 50 | } 51 | 52 | public URL getURL() 53 | throws IOException 54 | { 55 | return null; 56 | } 57 | 58 | public InputStream getContents() 59 | throws IOException 60 | { 61 | return tarFile.getInputStream( entry ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/tar/TarSnappyUnArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import java.io.File; 21 | 22 | /** 23 | * Extract files in tar with snappy compression 24 | * 25 | */ 26 | public class TarSnappyUnArchiver 27 | extends TarUnArchiver 28 | { 29 | public TarSnappyUnArchiver() 30 | { 31 | this.setupCompressionMethod(); 32 | } 33 | 34 | public TarSnappyUnArchiver(File sourceFile) 35 | { 36 | super( sourceFile ); 37 | this.setupCompressionMethod(); 38 | } 39 | 40 | private void setupCompressionMethod() 41 | { 42 | this.setCompression(UntarCompressionMethod.SNAPPY); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/util/Compressor.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.util; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import java.io.File; 21 | import java.io.FileInputStream; 22 | import java.io.IOException; 23 | import java.io.InputStream; 24 | import java.io.OutputStream; 25 | 26 | import org.codehaus.plexus.archiver.ArchiverException; 27 | import org.codehaus.plexus.components.io.resources.PlexusIoFileResource; 28 | import org.codehaus.plexus.components.io.resources.PlexusIoResource; 29 | import org.codehaus.plexus.logging.AbstractLogEnabled; 30 | import org.codehaus.plexus.util.IOUtil; 31 | 32 | import static org.codehaus.plexus.components.io.resources.ResourceFactory.createResource; 33 | 34 | /** 35 | * @version $Revision$ $Date$ 36 | */ 37 | public abstract class Compressor 38 | extends AbstractLogEnabled 39 | { 40 | private File destFile; 41 | 42 | private PlexusIoResource source; 43 | 44 | /** 45 | * the required destination file. 46 | * 47 | * @param compressFile 48 | */ 49 | public void setDestFile( File compressFile ) 50 | { 51 | this.destFile = compressFile; 52 | } 53 | 54 | public File getDestFile() 55 | { 56 | return destFile; 57 | } 58 | 59 | /** 60 | * The resource to compress; required. 61 | */ 62 | public void setSource( PlexusIoResource source ) 63 | { 64 | this.source = source; 65 | } 66 | 67 | /** 68 | * The resource to compress; required. 69 | */ 70 | public PlexusIoResource getSource() 71 | { 72 | return source; 73 | } 74 | 75 | /** 76 | * compress a stream to an output stream 77 | * 78 | * @param in 79 | * @param zOut 80 | * @throws IOException 81 | */ 82 | private void compressFile( InputStream in, OutputStream zOut ) 83 | throws IOException 84 | { 85 | byte[] buffer = new byte[8 * 1024]; 86 | int count = 0; 87 | do 88 | { 89 | zOut.write( buffer, 0, count ); 90 | count = in.read( buffer, 0, buffer.length ); 91 | } 92 | while ( count != -1 ); 93 | } 94 | 95 | /** 96 | * compress a resource to an output stream 97 | */ 98 | protected void compress( PlexusIoResource resource, OutputStream zOut ) 99 | throws IOException 100 | { 101 | InputStream in = Streams.bufferedInputStream( resource.getContents() ); 102 | try 103 | { 104 | compressFile( in, zOut ); 105 | } 106 | finally 107 | { 108 | IOUtil.close( in ); 109 | } 110 | } 111 | 112 | /** 113 | * subclasses must implement this method to do their compression 114 | * 115 | * this is public so the process of compression and closing can be dealt with separately. 116 | */ 117 | public abstract void compress() 118 | throws ArchiverException; 119 | 120 | /** 121 | * subclasses must implement this method to cleanup after compression 122 | * 123 | * this is public so the process of compression and closing can be dealt with separately. 124 | */ 125 | public abstract void close(); 126 | } 127 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/util/DefaultArchivedFileSet.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.util; 2 | 3 | import java.io.File; 4 | 5 | import javax.annotation.Nonnull; 6 | 7 | import org.codehaus.plexus.archiver.ArchivedFileSet; 8 | 9 | 10 | /** 11 | * Default implementation of {@link ArchivedFileSet}. 12 | * @since 1.0-alpha-9 13 | */ 14 | public class DefaultArchivedFileSet 15 | extends AbstractFileSet 16 | implements ArchivedFileSet 17 | { 18 | private File archive; 19 | 20 | public DefaultArchivedFileSet(@Nonnull File archive) { 21 | this.archive = archive; 22 | } 23 | 24 | 25 | public File getArchive() 26 | { 27 | return archive; 28 | } 29 | 30 | public static DefaultArchivedFileSet archivedFileSet( File archiveFile ){ 31 | if (archiveFile == null) 32 | { 33 | throw new IllegalArgumentException( "Archive File cannot be null" ); 34 | } 35 | return new DefaultArchivedFileSet(archiveFile); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/util/DefaultFileSet.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.util; 2 | 3 | import java.io.File; 4 | 5 | import javax.annotation.Nonnull; 6 | 7 | import org.codehaus.plexus.archiver.FileSet; 8 | 9 | 10 | /** 11 | * Default implementation of {@link FileSet}. 12 | * @since 1.0-alpha-9 13 | */ 14 | public class DefaultFileSet 15 | extends AbstractFileSet 16 | implements FileSet 17 | { 18 | private File directory; 19 | 20 | public DefaultFileSet(File directory) { 21 | this.directory = directory; 22 | } 23 | 24 | 25 | public DefaultFileSet() { 26 | } 27 | 28 | /** 29 | * Sets the file sets base directory. 30 | */ 31 | public void setDirectory( @Nonnull File directory ) 32 | { 33 | this.directory = directory; 34 | } 35 | 36 | @Nonnull public File getDirectory() 37 | { 38 | return directory; 39 | } 40 | 41 | public static DefaultFileSet fileSet( File directory ){ 42 | final DefaultFileSet defaultFileSet = new DefaultFileSet(directory); 43 | return defaultFileSet; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/util/FilePermission.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.util; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * @author Olivier Lamy 24 | * @since 1.1 25 | * 26 | */ 27 | public class FilePermission 28 | { 29 | 30 | private boolean executable; 31 | 32 | private boolean ownerOnlyExecutable; 33 | 34 | private boolean ownerOnlyReadable; 35 | 36 | private boolean readable; 37 | 38 | private boolean ownerOnlyWritable; 39 | 40 | private boolean writable; 41 | 42 | public FilePermission( boolean executable, boolean ownerOnlyExecutable, boolean ownerOnlyReadable, 43 | boolean readable, boolean ownerOnlyWritable, boolean writable ) 44 | { 45 | this.executable = executable; 46 | this.ownerOnlyExecutable = ownerOnlyExecutable; 47 | this.ownerOnlyReadable = ownerOnlyReadable; 48 | this.readable = readable; 49 | this.ownerOnlyWritable = ownerOnlyWritable; 50 | this.writable = writable; 51 | } 52 | 53 | public boolean isExecutable() 54 | { 55 | return executable; 56 | } 57 | 58 | public boolean isOwnerOnlyExecutable() 59 | { 60 | return ownerOnlyExecutable; 61 | } 62 | 63 | public boolean isOwnerOnlyReadable() 64 | { 65 | return ownerOnlyReadable; 66 | } 67 | 68 | public boolean isReadable() 69 | { 70 | return readable; 71 | } 72 | 73 | public boolean isOwnerOnlyWritable() 74 | { 75 | return ownerOnlyWritable; 76 | } 77 | 78 | public boolean isWritable() 79 | { 80 | return writable; 81 | } 82 | 83 | public String toString() 84 | { 85 | return "FilePermission [executable=" + executable + ", ownerOnlyExecutable=" + ownerOnlyExecutable 86 | + ", ownerOnlyReadable=" + ownerOnlyReadable + ", readable=" + readable + ", ownerOnlyWritable=" 87 | + ownerOnlyWritable + ", writable=" + writable + "]"; 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/util/FilterSupport.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.util; 2 | 3 | import java.io.InputStream; 4 | import java.util.List; 5 | 6 | import org.codehaus.plexus.archiver.ArchiveFileFilter; 7 | import org.codehaus.plexus.archiver.ArchiveFilterException; 8 | import org.codehaus.plexus.archiver.Archiver; 9 | import org.codehaus.plexus.components.io.fileselectors.FileSelector; 10 | import org.codehaus.plexus.logging.Logger; 11 | 12 | 13 | /** 14 | * @deprecated Use {@link FileSelector} and {@link Archiver#addFileSet}. 15 | */ 16 | public class FilterSupport 17 | { 18 | 19 | private final List filters; 20 | 21 | private final Logger logger; 22 | 23 | public FilterSupport( List filters, Logger logger ) 24 | { 25 | this.filters = filters; 26 | this.logger = logger; 27 | } 28 | 29 | public boolean include( InputStream dataStream, String entryName ) 30 | { 31 | boolean included = true; 32 | 33 | if ( filters != null && !filters.isEmpty() ) 34 | { 35 | for (ArchiveFileFilter filter : filters) { 36 | included = filter.include(dataStream, entryName); 37 | 38 | if (!included) { 39 | if (logger.isDebugEnabled()) { 40 | logger.debug("Entry: \'" + entryName + "\' excluded by filter: " + filter.getClass().getName()); 41 | } 42 | 43 | break; 44 | } 45 | } 46 | } 47 | 48 | return included; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/zip/AnonymousResource.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.zip; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | import java.net.URL; 7 | 8 | import org.codehaus.plexus.components.io.resources.AbstractPlexusIoResource; 9 | 10 | public class AnonymousResource extends AbstractPlexusIoResource { 11 | 12 | private final File file; 13 | 14 | public AnonymousResource( File file ) 15 | { 16 | this( file, getName( file )); 17 | } 18 | 19 | public AnonymousResource(File file, String name) 20 | { 21 | super( name, file.lastModified(), file.length(), file.isFile(), file.isDirectory(), file.exists() ); 22 | this.file = file; 23 | } 24 | 25 | public InputStream getContents() 26 | throws IOException 27 | { 28 | throw new UnsupportedOperationException("not supp"); 29 | // Does this really have an input stream ? 30 | //return new FileInputStream( file ); 31 | } 32 | 33 | public URL getURL() 34 | throws IOException 35 | { 36 | return file.toURI().toURL(); 37 | } 38 | 39 | 40 | private static String getName( File file ) 41 | { 42 | return file.getPath().replace( '\\', '/' ); 43 | } 44 | 45 | 46 | } 47 | 48 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/zip/PlexusIoZipFileResourceCollection.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.zip; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.Enumeration; 6 | import java.util.Iterator; 7 | 8 | import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; 9 | import org.codehaus.plexus.components.io.resources.AbstractPlexusIoArchiveResourceCollection; 10 | import org.codehaus.plexus.components.io.resources.PlexusIoResource; 11 | 12 | public class PlexusIoZipFileResourceCollection 13 | extends AbstractPlexusIoArchiveResourceCollection 14 | { 15 | 16 | /** 17 | * The zip file resource collections role hint. 18 | */ 19 | public static final String ROLE_HINT = "zip"; 20 | 21 | protected Iterator getEntries() 22 | throws IOException 23 | { 24 | final File f = getFile(); 25 | if ( f == null ) 26 | { 27 | throw new IOException( "The tar archive file has not been set." ); 28 | } 29 | final org.apache.commons.compress.archivers.zip.ZipFile zipFile = new org.apache.commons.compress.archivers.zip.ZipFile( f ); 30 | final Enumeration en = zipFile.getEntries(); 31 | return new Iterator() 32 | { 33 | public boolean hasNext() 34 | { 35 | return en.hasMoreElements(); 36 | } 37 | 38 | public PlexusIoResource next() 39 | { 40 | final ZipArchiveEntry entry = (ZipArchiveEntry) en.nextElement(); 41 | 42 | return new ZipResource( zipFile, entry, getStreamTransformer() ); 43 | } 44 | 45 | public void remove() 46 | { 47 | throw new UnsupportedOperationException( "Removing isn't implemented." ); 48 | } 49 | }; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/zip/ZipArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.zip; 2 | 3 | /** 4 | * 5 | * Copyright 2004 The Apache Software Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | /** 21 | * @version $Id$ 22 | */ 23 | public class ZipArchiver 24 | extends AbstractZipArchiver 25 | { 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/zip/ZipResource.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.zip; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.net.URL; 6 | 7 | import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; 8 | import org.apache.commons.compress.archivers.zip.ZipFile; 9 | import org.codehaus.plexus.archiver.UnixStat; 10 | import org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes; 11 | import org.codehaus.plexus.components.io.attributes.SimpleResourceAttributes; 12 | import org.codehaus.plexus.components.io.functions.InputStreamTransformer; 13 | import org.codehaus.plexus.components.io.functions.ResourceAttributeSupplier; 14 | import org.codehaus.plexus.components.io.resources.AbstractPlexusIoResource; 15 | import org.codehaus.plexus.components.io.resources.ClosingInputStream; 16 | import org.codehaus.plexus.components.io.resources.PlexusIoResource; 17 | 18 | public class ZipResource extends AbstractPlexusIoResource 19 | implements ResourceAttributeSupplier 20 | { 21 | 22 | private final org.apache.commons.compress.archivers.zip.ZipFile zipFile; 23 | private final ZipArchiveEntry entry; 24 | 25 | private final InputStreamTransformer streamTransformer; 26 | 27 | private PlexusIoResourceAttributes attributes; 28 | 29 | public ZipResource( ZipFile zipFile, ZipArchiveEntry entry, InputStreamTransformer streamTransformer ) 30 | { 31 | super(entry.getName(),getLastModofied( entry), entry.isDirectory() ? PlexusIoResource.UNKNOWN_RESOURCE_SIZE : entry.getSize() , 32 | !entry.isDirectory(), entry.isDirectory(), true); 33 | this.zipFile = zipFile; 34 | this.entry = entry; 35 | this.streamTransformer = streamTransformer; 36 | } 37 | 38 | private static long getLastModofied( ZipArchiveEntry entry ) 39 | { 40 | long l = entry.getLastModifiedDate().getTime(); 41 | return l == -1 ? PlexusIoResource.UNKNOWN_MODIFICATION_DATE : l; 42 | } 43 | 44 | public synchronized PlexusIoResourceAttributes getAttributes() 45 | { 46 | int mode = entry.getUnixMode(); 47 | if ( ( mode & UnixStat.FILE_FLAG ) == UnixStat.FILE_FLAG ) 48 | { 49 | mode = mode & ~UnixStat.FILE_FLAG; 50 | } 51 | else 52 | { 53 | mode = mode & ~UnixStat.DIR_FLAG; 54 | } 55 | 56 | if ( attributes == null ) 57 | { 58 | attributes = new SimpleResourceAttributes(null, null,null,null, mode); 59 | } 60 | 61 | return attributes; 62 | } 63 | 64 | public synchronized void setAttributes( PlexusIoResourceAttributes attributes ) 65 | { 66 | this.attributes = attributes; 67 | } 68 | 69 | public URL getURL() 70 | throws IOException 71 | { 72 | return null; 73 | } 74 | 75 | public InputStream getContents() 76 | throws IOException 77 | { 78 | final InputStream inputStream = zipFile.getInputStream( entry ); 79 | return new ClosingInputStream( streamTransformer.transform( this, inputStream ), inputStream); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/org/codehaus/plexus/archiver/zip/ZipUnArchiver.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.zip; 2 | 3 | import java.io.File; 4 | 5 | /** 6 | * 7 | * Copyright 2004 The Apache Software Foundation 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | /** 23 | * @author Emmanuel Venisse 24 | * @version $Revision$ $Date$ 25 | */ 26 | public class ZipUnArchiver 27 | extends AbstractZipUnArchiver 28 | { 29 | public ZipUnArchiver() 30 | { 31 | } 32 | 33 | public ZipUnArchiver( File sourceFile ) 34 | { 35 | super( sourceFile ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/resources/org/codehaus/plexus/archiver/jar/defaultManifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Archiver-Version: Plexus Archiver 3 | 4 | -------------------------------------------------------------------------------- /src/site/site.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 |

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/test/dotfiles/.plxarc: -------------------------------------------------------------------------------- 1 | licenses 2 | licenses:META-INF/maven 3 | -------------------------------------------------------------------------------- /src/test/dotfiles/licenses/NOTICE.txt: -------------------------------------------------------------------------------- 1 | This product includes software developed by 2 | The Apache Software Foundation (http://www.apache.org/). 3 | -------------------------------------------------------------------------------- /src/test/jars/test.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/jars/test.jar -------------------------------------------------------------------------------- /src/test/jars/test.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/jars/test.rar -------------------------------------------------------------------------------- /src/test/jars/test.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/jars/test.tar.gz -------------------------------------------------------------------------------- /src/test/jars/test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/jars/test.zip -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/AbstractArchiverTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import java.io.IOException; 4 | 5 | import junit.framework.TestCase; 6 | 7 | public class AbstractArchiverTest extends TestCase 8 | { 9 | private AbstractArchiver archiver; 10 | 11 | protected void setUp() throws Exception 12 | { 13 | super.setUp(); 14 | this.archiver = new AbstractArchiver() 15 | { 16 | protected String getArchiveType() 17 | { 18 | throw new UnsupportedOperationException(); 19 | } 20 | 21 | protected void execute() throws ArchiverException, IOException 22 | { 23 | throw new UnsupportedOperationException(); 24 | } 25 | 26 | protected void close() throws IOException 27 | { 28 | throw new UnsupportedOperationException(); 29 | } 30 | }; 31 | } 32 | 33 | public void testModesAndOverridesAreUnsetByDefault() 34 | { 35 | assertEquals(-1, archiver.getDefaultFileMode()); 36 | assertEquals(-1, archiver.getOverrideFileMode()); 37 | 38 | assertEquals(Archiver.DEFAULT_DIR_MODE, archiver.getDefaultDirectoryMode()); 39 | assertEquals(-1, archiver.getOverrideDirectoryMode()); 40 | } 41 | 42 | public void testWhenUnsetModeUsesDefault() 43 | { 44 | assertEquals(Archiver.DEFAULT_FILE_MODE, archiver.getFileMode()); 45 | assertEquals(Archiver.DEFAULT_DIR_MODE, archiver.getDirectoryMode()); 46 | } 47 | 48 | public void testSetModeIsUsedWithFlagsForType() 49 | { 50 | archiver.setFileMode(0400); 51 | assertEquals(0100400, archiver.getFileMode()); 52 | 53 | archiver.setDirectoryMode(0600); 54 | assertEquals(040600, archiver.getDirectoryMode()); 55 | } 56 | 57 | public void testSetDefaultIncludesFlagsForType() 58 | { 59 | archiver.setDefaultFileMode(0400); 60 | assertEquals(0100400, archiver.getDefaultFileMode()); 61 | 62 | archiver.setDefaultDirectoryMode(0600); 63 | assertEquals(040600, archiver.getDefaultDirectoryMode()); 64 | } 65 | 66 | public void testDefaultIsUsedWhenModeIsUnset() 67 | { 68 | archiver.setDefaultFileMode(0400); 69 | assertEquals(0100400, archiver.getFileMode()); 70 | 71 | archiver.setDefaultDirectoryMode(0600); 72 | assertEquals(040600, archiver.getDirectoryMode()); 73 | } 74 | 75 | public void testOverridesCanBeReset() 76 | { 77 | archiver.setFileMode(0400); 78 | archiver.setFileMode(-1); 79 | assertEquals(-1, archiver.getOverrideFileMode()); 80 | 81 | archiver.setDirectoryMode(0600); 82 | archiver.setDirectoryMode(-1); 83 | assertEquals(-1, archiver.getOverrideDirectoryMode()); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/BasePlexusArchiverTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | /* 4 | * The MIT License 5 | * 6 | * Copyright (c) 2004, The Codehaus 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 9 | * this software and associated documentation files (the "Software"), to deal in 10 | * the Software without restriction, including without limitation the rights to 11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 12 | * of the Software, and to permit persons to whom the Software is furnished to do 13 | * so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | import java.io.File; 28 | 29 | import org.codehaus.plexus.PlexusTestCase; 30 | import org.codehaus.plexus.util.FileUtils; 31 | /** 32 | * Base abstract class that all the test-cases for different archivers 33 | * extend so that they can use its helpful methids. 34 | * 35 | * @version $Id$ 36 | */ 37 | public abstract class BasePlexusArchiverTest extends PlexusTestCase 38 | { 39 | /** 40 | * Ensure that when a new file is created at the specified location that the timestamp of 41 | * that file will be greater than the one specified as a reference. 42 | * 43 | * Warning: Runs in a busy loop creating a file until the output file is newer than the reference timestamp. 44 | * This should be better than sleeping for a race condition time out value. 45 | * 46 | * @param outputFile the file to be created 47 | * @param timestampReference the created file will have a newer timestamp than this reference timestamp. 48 | * @throws Exception failures 49 | */ 50 | protected void waitUntilNewTimestamp( File outputFile, long timestampReference ) throws Exception 51 | { 52 | File tmpFile = File.createTempFile( "ZipArchiverTest.waitUntilNewTimestamp", null ); 53 | // slurp the file into a temp file and then copy the temp back over the top until it is newer. 54 | FileUtils.copyFile( outputFile, tmpFile ); 55 | 56 | FileUtils.copyFile( tmpFile, outputFile ); 57 | while ( timestampReference >= outputFile.lastModified() ) 58 | { 59 | FileUtils.copyFile( tmpFile, outputFile ); 60 | Thread.yield(); 61 | } 62 | 63 | tmpFile.delete(); 64 | } 65 | 66 | /** 67 | * Base method for all the Archivers to create an archiver. 68 | * 69 | * @param format 70 | * @return 71 | * @throws Exception 72 | */ 73 | protected Archiver createArchiver(String format) throws Exception { 74 | 75 | final File pomFile = new File("pom.xml"); 76 | final File rarFile = new File( "target/output/pom.xml."+format ); 77 | 78 | Archiver archiver = (Archiver) lookup( Archiver.ROLE, format ); 79 | archiver.setDestFile( rarFile ); 80 | archiver.addFile( pomFile, "pom.xml" ); 81 | 82 | return archiver; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/DotDirectiveArchiveFinalizerTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import org.codehaus.plexus.PlexusTestCase; 4 | import org.codehaus.plexus.archiver.jar.JarArchiver; 5 | 6 | import java.io.File; 7 | import java.util.jar.JarFile; 8 | 9 | /** @author Jason van Zyl */ 10 | public class DotDirectiveArchiveFinalizerTest 11 | extends PlexusTestCase 12 | { 13 | public void testDotDirectiveArchiveFinalizer() 14 | throws Exception 15 | { 16 | DotDirectiveArchiveFinalizer ddaf = 17 | new DotDirectiveArchiveFinalizer( new File( getBasedir(), "src/test/dotfiles" ) ); 18 | 19 | JarArchiver archiver = new JarArchiver(); 20 | 21 | File jarFile = new File( getBasedir(), "target/dotfiles.jar" ); 22 | 23 | archiver.setDestFile( jarFile ); 24 | 25 | archiver.addArchiveFinalizer( ddaf ); 26 | 27 | archiver.createArchive(); 28 | 29 | JarFile jar = new JarFile( jarFile ); 30 | 31 | assertNotNull( jar.getEntry( "LICENSE.txt" ) ); 32 | 33 | assertNotNull( jar.getEntry( "NOTICE.txt" ) ); 34 | 35 | assertNotNull( jar.getEntry( "META-INF/maven/LICENSE.txt" ) ); 36 | 37 | assertNotNull( jar.getEntry( "META-INF/maven/NOTICE.txt" ) ); 38 | } 39 | 40 | public void testDefaultDotDirectiveBehaviour() 41 | throws Exception 42 | { 43 | File dotFileDirectory = new File( getBasedir(), "src/test/dotfiles" ); 44 | 45 | JarArchiver archiver = new JarArchiver(); 46 | 47 | archiver.setDotFileDirectory( dotFileDirectory ); 48 | 49 | File jarFile = new File( getBasedir(), "target/default-dotfiles.jar" ); 50 | 51 | archiver.setDestFile( jarFile ); 52 | 53 | archiver.createArchive(); 54 | 55 | JarFile jar = new JarFile( jarFile ); 56 | 57 | assertNotNull( jar.getEntry( "LICENSE.txt" ) ); 58 | 59 | assertNotNull( jar.getEntry( "NOTICE.txt" ) ); 60 | 61 | assertNotNull( jar.getEntry( "META-INF/maven/LICENSE.txt" ) ); 62 | 63 | assertNotNull( jar.getEntry( "META-INF/maven/NOTICE.txt" ) ); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/EmptyDirectoryTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | /* 4 | * The MIT License 5 | * 6 | * Copyright (c) 2004, The Codehaus 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 9 | * this software and associated documentation files (the "Software"), to deal in 10 | * the Software without restriction, including without limitation the rights to 11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 12 | * of the Software, and to permit persons to whom the Software is furnished to do 13 | * so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | import org.codehaus.plexus.PlexusTestCase; 28 | import org.codehaus.plexus.archiver.tar.TarArchiver; 29 | import org.codehaus.plexus.archiver.tar.TarLongFileMode; 30 | 31 | import java.io.File; 32 | 33 | /** 34 | * @author Daniel Krisher 35 | * @version $Id$ 36 | */ 37 | public class EmptyDirectoryTest 38 | extends PlexusTestCase 39 | { 40 | public void testZipArchiver() 41 | throws Exception 42 | { 43 | testEmptyDirectory( "zip", (Archiver) lookup( Archiver.ROLE, "zip")); 44 | } 45 | 46 | public void testJarArchiver() 47 | throws Exception 48 | { 49 | // No JAR UnArchiver implementation :( 50 | // testEmptyDirectory( "jar" ); 51 | } 52 | 53 | public void testTarArchiver() 54 | throws Exception 55 | { 56 | final TarArchiver tar = (TarArchiver) lookup(Archiver.ROLE, "tar"); 57 | tar.setLongfile(TarLongFileMode.posix ); 58 | testEmptyDirectory("tar", tar); 59 | } 60 | 61 | // ---------------------------------------------------------------------- 62 | // 63 | // ---------------------------------------------------------------------- 64 | 65 | private void testEmptyDirectory(String role, Archiver archiver) 66 | throws Exception 67 | { 68 | 69 | // Should default to true... 70 | assertTrue(archiver.getIncludeEmptyDirs()); 71 | 72 | // create an empty directory to store in the zip archive 73 | File emptyDir = getTestFile( "target/output/emptyTest/TmpEmptyDir" ); 74 | 75 | // delete it if it exists to ensure it is actually empty 76 | if ( emptyDir.exists() ) 77 | { 78 | emptyDir.delete(); 79 | } 80 | emptyDir.mkdirs(); 81 | archiver.addDirectory(emptyDir.getParentFile()); 82 | 83 | File archive = getTestFile( "target/output/emptyDirArchive.zip" ); 84 | if ( archive.exists() ) 85 | { 86 | archive.delete(); 87 | } 88 | 89 | archiver.setDestFile(archive); 90 | archiver.createArchive(); 91 | 92 | // delete the empty dir, we will extract it from the archive 93 | emptyDir.delete(); 94 | 95 | // Check the content of the archive by extracting it 96 | 97 | UnArchiver unArchiver = (UnArchiver) lookup( UnArchiver.ROLE, role ); 98 | unArchiver.setSourceFile( archive ); 99 | 100 | unArchiver.setDestDirectory( getTestFile( "target/output/emptyTest" ) ); 101 | unArchiver.extract(); 102 | 103 | assertTrue( emptyDir.exists() ); 104 | assertTrue( emptyDir.isDirectory() ); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/SymlinkTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver; 2 | 3 | import org.codehaus.plexus.PlexusTestCase; 4 | import org.codehaus.plexus.archiver.tar.TarArchiver; 5 | import org.codehaus.plexus.archiver.tar.TarLongFileMode; 6 | import org.codehaus.plexus.archiver.tar.TarUnArchiver; 7 | import org.codehaus.plexus.archiver.zip.ZipArchiver; 8 | import org.codehaus.plexus.archiver.zip.ZipUnArchiver; 9 | import org.codehaus.plexus.util.Os; 10 | 11 | import java.io.File; 12 | import java.io.IOException; 13 | import java.nio.file.Files; 14 | 15 | /** 16 | * @author Kristian Rosenvold 17 | */ 18 | public class SymlinkTest 19 | extends PlexusTestCase 20 | { 21 | 22 | public void testSymlinkDir() 23 | throws IOException 24 | { 25 | if ( Os.isFamily( Os.FAMILY_WINDOWS )) return; 26 | File dummyContent = getTestFile( "src/test/resources/symlinks/src/symDir" ); 27 | assertTrue( dummyContent.isDirectory()); 28 | assertTrue( Files.isSymbolicLink( dummyContent.toPath())); 29 | 30 | } 31 | 32 | public void testSymlinkDirWithSlash() 33 | throws IOException 34 | { 35 | if ( Os.isFamily( Os.FAMILY_WINDOWS )) return; 36 | File dummyContent = getTestFile( "src/test/resources/symlinks/src/symDir/" ); 37 | assertTrue( dummyContent.isDirectory()); 38 | assertTrue( Files.isSymbolicLink( dummyContent.toPath())); 39 | } 40 | 41 | public void testSymlinkFile(){ 42 | if ( Os.isFamily( Os.FAMILY_WINDOWS )) return; 43 | File dummyContent = getTestFile( "src/test/resources/symlinks/src/symR" ); 44 | assertFalse( dummyContent.isDirectory() ); 45 | assertTrue( Files.isSymbolicLink( dummyContent.toPath())); 46 | 47 | } 48 | 49 | public void testSymlinkTar() 50 | throws Exception 51 | { 52 | TarArchiver archiver = (TarArchiver) lookup( Archiver.ROLE, "tar" ); 53 | archiver.setLongfile( TarLongFileMode.posix ); 54 | 55 | File dummyContent = getTestFile( "src/test/resources/symlinks/src" ); 56 | archiver.addDirectory( dummyContent ); 57 | final File archiveFile = new File( "target/output/symlinks.tar" ); 58 | archiver.setDestFile( archiveFile ); 59 | archiver.createArchive(); 60 | File output = getTestFile( "target/output/untaredSymlinks" ); 61 | output.mkdirs(); 62 | TarUnArchiver unarchiver = (TarUnArchiver) lookup( UnArchiver.ROLE, "tar" ); 63 | unarchiver.setSourceFile( archiveFile ); 64 | unarchiver.setDestFile( output ); 65 | unarchiver.extract(); 66 | } 67 | 68 | public void testSymlinkZip() 69 | throws Exception 70 | { 71 | ZipArchiver archiver = (ZipArchiver) lookup( Archiver.ROLE, "zip" ); 72 | 73 | File dummyContent = getTestFile( "src/test/resources/symlinks/src" ); 74 | archiver.addDirectory( dummyContent ); 75 | final File archiveFile = new File( "target/output/symlinks.zip" ); 76 | archiveFile.delete(); 77 | archiver.setDestFile( archiveFile ); 78 | archiver.createArchive(); 79 | 80 | File output = getTestFile( "target/output/unzippedSymlinks" ); 81 | output.mkdirs(); 82 | ZipUnArchiver unarchiver = (ZipUnArchiver) lookup( UnArchiver.ROLE, "zip" ); 83 | unarchiver.setSourceFile( archiveFile ); 84 | unarchiver.setDestFile( output ); 85 | unarchiver.extract(); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/jar/JarArchiverTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.jar; 2 | 3 | import org.codehaus.plexus.archiver.ArchiverException; 4 | 5 | import java.io.File; 6 | import java.io.IOException; 7 | 8 | import junit.framework.TestCase; 9 | 10 | public class JarArchiverTest 11 | extends TestCase 12 | { 13 | 14 | public void testCreateManifestOnlyJar() 15 | throws IOException, ManifestException, ArchiverException 16 | { 17 | File jarFile = File.createTempFile( "JarArchiverTest.", ".jar" ); 18 | jarFile.deleteOnExit(); 19 | 20 | JarArchiver archiver = new JarArchiver(); 21 | archiver.setDestFile( jarFile ); 22 | 23 | Manifest manifest = new Manifest(); 24 | Manifest.Attribute attribute = new Manifest.Attribute( "Main-Class", getClass().getName() ); 25 | 26 | manifest.addConfiguredAttribute( attribute ); 27 | 28 | archiver.addConfiguredManifest( manifest ); 29 | 30 | archiver.createArchive(); 31 | } 32 | 33 | public void testNonCompressed() 34 | throws IOException, ManifestException, ArchiverException 35 | { 36 | File jarFile = new File("target/output/jarArchiveNonCompressed.jar" ); 37 | 38 | JarArchiver archiver = new JarArchiver(); 39 | archiver.setDestFile( jarFile ); 40 | archiver.setCompress( false ); 41 | archiver.addDirectory( new File( "src/test/resources/mjar179" ) ); 42 | archiver.createArchive(); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/tar/TarBZip2UnArchiverTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | /* 4 | * The MIT License 5 | * 6 | * Copyright (c) 2004, The Codehaus 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 9 | * this software and associated documentation files (the "Software"), to deal in 10 | * the Software without restriction, including without limitation the rights to 11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 12 | * of the Software, and to permit persons to whom the Software is furnished to do 13 | * so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | import java.io.File; 28 | 29 | import org.codehaus.plexus.PlexusTestCase; 30 | import org.codehaus.plexus.archiver.Archiver; 31 | import org.codehaus.plexus.archiver.UnArchiver; 32 | import org.codehaus.plexus.archiver.bzip2.BZip2Archiver; 33 | 34 | /** 35 | * @author Dan Tran 36 | * @version $Id$ 37 | */ 38 | public class TarBZip2UnArchiverTest 39 | extends PlexusTestCase 40 | { 41 | public void testExtract() 42 | throws Exception 43 | { 44 | TarArchiver tarArchiver = (TarArchiver) lookup( Archiver.ROLE, "tar" ); 45 | tarArchiver.setLongfile(TarLongFileMode.posix ); 46 | 47 | String fileName1 = "TarBZip2UnArchiverTest1.txt"; 48 | String fileName2 = "TarBZip2UnArchiverTest2.txt"; 49 | File file1InTar = getTestFile( "target/output/" + fileName1 ); 50 | File file2InTar = getTestFile( "target/output/" + fileName2 ); 51 | file1InTar.delete(); 52 | file2InTar.delete(); 53 | 54 | File testBZip2File = getTestFile( "target/output/archive.tar.bz2" ); 55 | 56 | tarArchiver.addFile( getTestFile( "src/test/resources/manifests/manifest1.mf" ), fileName1 ); 57 | tarArchiver.addFile( getTestFile( "src/test/resources/manifests/manifest2.mf" ), fileName2, 0664 ); 58 | tarArchiver.setDestFile( getTestFile( "target/output/archive.tar" ) ); 59 | tarArchiver.createArchive(); 60 | 61 | BZip2Archiver bzip2Archiver = (BZip2Archiver) lookup( Archiver.ROLE, "bzip2" ); 62 | 63 | bzip2Archiver.setDestFile( testBZip2File ); 64 | bzip2Archiver.addFile( getTestFile( "target/output/archive.tar" ), "dontcare" ); 65 | bzip2Archiver.createArchive(); 66 | 67 | TarBZip2UnArchiver tarBZip2UnArchiver = (TarBZip2UnArchiver) lookup( UnArchiver.ROLE, "tbz2" ); 68 | 69 | tarBZip2UnArchiver.setDestDirectory( getTestFile( "target/output" ) ); 70 | tarBZip2UnArchiver.setSourceFile( testBZip2File ); 71 | tarBZip2UnArchiver.extract(); 72 | 73 | assertTrue( file1InTar.exists() ); 74 | assertTrue( file2InTar.exists() ); 75 | 76 | //makesure we place the source file back 77 | assertEquals( testBZip2File, tarBZip2UnArchiver.getSourceFile() ); 78 | 79 | } 80 | 81 | public void testLookup() 82 | throws Exception 83 | { 84 | lookup( UnArchiver.ROLE, "tar.bz2" ); 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/tar/TarGZipUnArchiverTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | /* 4 | * The MIT License 5 | * 6 | * Copyright (c) 2004, The Codehaus 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 9 | * this software and associated documentation files (the "Software"), to deal in 10 | * the Software without restriction, including without limitation the rights to 11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 12 | * of the Software, and to permit persons to whom the Software is furnished to do 13 | * so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | import java.io.File; 28 | 29 | import org.codehaus.plexus.PlexusTestCase; 30 | import org.codehaus.plexus.archiver.Archiver; 31 | import org.codehaus.plexus.archiver.UnArchiver; 32 | import org.codehaus.plexus.archiver.gzip.GZipArchiver; 33 | 34 | /** 35 | * @author Dan Tran 36 | * @version $Id$ 37 | */ 38 | public class TarGZipUnArchiverTest 39 | extends PlexusTestCase 40 | { 41 | public void testExtract() 42 | throws Exception 43 | { 44 | TarArchiver tarArchiver = (TarArchiver) lookup( Archiver.ROLE, "tar" ); 45 | tarArchiver.setLongfile(TarLongFileMode.posix ); 46 | 47 | String fileName1 = "TarGZipUnArchiverTest1.txt"; 48 | String fileName2 = "TarGZipUnArchiverTest2.txt"; 49 | File file1InTar = getTestFile( "target/output/" + fileName1 ); 50 | File file2InTar = getTestFile( "target/output/" + fileName2 ); 51 | file1InTar.delete(); 52 | file2InTar.delete(); 53 | 54 | tarArchiver.addFile( getTestFile( "src/test/resources/manifests/manifest1.mf" ), fileName1 ); 55 | tarArchiver.addFile( getTestFile( "src/test/resources/manifests/manifest2.mf" ), fileName2, 0664 ); 56 | tarArchiver.setDestFile( getTestFile( "target/output/archive.tar" ) ); 57 | tarArchiver.createArchive(); 58 | 59 | GZipArchiver gzipArchiver = (GZipArchiver) lookup( Archiver.ROLE, "gzip" ); 60 | 61 | File testGZipFile = getTestFile( "target/output/archive.tar.gz" ); 62 | gzipArchiver.setDestFile( testGZipFile ); 63 | gzipArchiver.addFile( getTestFile( "target/output/archive.tar" ), "dontcare" ); 64 | gzipArchiver.createArchive(); 65 | 66 | TarGZipUnArchiver tarGZipUnArchiver = (TarGZipUnArchiver) lookup( UnArchiver.ROLE, "tgz" ); 67 | tarGZipUnArchiver.setDestDirectory( getTestFile( "target/output" ) ); 68 | tarGZipUnArchiver.setSourceFile( testGZipFile ); 69 | tarGZipUnArchiver.extract(); 70 | 71 | assertTrue( file1InTar.exists() ); 72 | assertTrue( file2InTar.exists() ); 73 | 74 | //make sure we place the source file back 75 | assertEquals( testGZipFile, tarGZipUnArchiver.getSourceFile() ); 76 | 77 | 78 | } 79 | 80 | public void testLookup() 81 | throws Exception 82 | { 83 | lookup( UnArchiver.ROLE, "tar.gz" ); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/tar/TarRoundTripTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | /* 4 | * Copyright 2003-2004 The Apache Software Foundation 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | import junit.framework.TestCase; 21 | import org.apache.commons.compress.archivers.tar.TarArchiveEntry; 22 | import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; 23 | import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream; 24 | 25 | import java.io.ByteArrayInputStream; 26 | import java.io.ByteArrayOutputStream; 27 | import java.io.IOException; 28 | 29 | /** 30 | * @version $Id$ 31 | * from org.apache.ant.tools.tar.TarRoundTripTest v1.6 32 | */ 33 | public class TarRoundTripTest 34 | extends TestCase 35 | { 36 | private static final String LONG_NAME 37 | = "this/path/name/contains/more/than/one/hundred/characters/in/order/" 38 | + "to/test/the/GNU/long/file/name/capability/round/tripped"; 39 | 40 | /** 41 | * test round-tripping long (GNU) entries 42 | */ 43 | public void testLongRoundTripping() 44 | throws IOException 45 | { 46 | TarArchiveEntry original = new TarArchiveEntry( LONG_NAME ); 47 | assertEquals( "over 100 chars", true, LONG_NAME.length() > 100 ); 48 | assertEquals( "original name", LONG_NAME, original.getName() ); 49 | 50 | ByteArrayOutputStream buff = new ByteArrayOutputStream(); 51 | TarArchiveOutputStream tos = new TarArchiveOutputStream( buff ); 52 | tos.setLongFileMode( TarArchiveOutputStream.LONGFILE_GNU ); 53 | tos.putArchiveEntry(original); 54 | tos.closeArchiveEntry(); 55 | tos.close(); 56 | 57 | TarArchiveInputStream tis = new TarArchiveInputStream( new ByteArrayInputStream( buff.toByteArray() ) ); 58 | TarArchiveEntry tripped = tis.getNextTarEntry(); 59 | assertEquals( "round-tripped name", LONG_NAME, tripped.getName() ); 60 | assertNull( "no more entries", tis.getNextEntry() ); 61 | tis.close(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/tar/TarSnappyUnArchiverTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | /* 4 | * The MIT License 5 | * 6 | * Copyright (c) 2004, The Codehaus 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 9 | * this software and associated documentation files (the "Software"), to deal in 10 | * the Software without restriction, including without limitation the rights to 11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 12 | * of the Software, and to permit persons to whom the Software is furnished to do 13 | * so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | import org.codehaus.plexus.PlexusTestCase; 28 | import org.codehaus.plexus.archiver.Archiver; 29 | import org.codehaus.plexus.archiver.UnArchiver; 30 | import org.codehaus.plexus.archiver.snappy.SnappyArchiver; 31 | 32 | import java.io.File; 33 | 34 | /** 35 | * Snappy tar archives 36 | */ 37 | public class TarSnappyUnArchiverTest 38 | extends PlexusTestCase 39 | { 40 | public void testExtract() 41 | throws Exception 42 | { 43 | TarArchiver tarArchiver = (TarArchiver) lookup( Archiver.ROLE, "tar" ); 44 | tarArchiver.setLongfile(TarLongFileMode.posix ); 45 | 46 | String fileName1 = "TarSnappyUnArchiverTest1.txt"; 47 | String fileName2 = "TarSnappyUnArchiverTest2.txt"; 48 | File file1InTar = getTestFile( "target/output/" + fileName1 ); 49 | File file2InTar = getTestFile( "target/output/" + fileName2 ); 50 | file1InTar.delete(); 51 | file2InTar.delete(); 52 | 53 | tarArchiver.addFile( getTestFile( "src/test/resources/manifests/manifest1.mf" ), fileName1 ); 54 | tarArchiver.addFile( getTestFile( "src/test/resources/manifests/manifest2.mf" ), fileName2, 0664 ); 55 | tarArchiver.setDestFile( getTestFile( "target/output/archive.tar" ) ); 56 | tarArchiver.createArchive(); 57 | 58 | SnappyArchiver snappyArchiver = (SnappyArchiver) lookup( Archiver.ROLE, "snappy" ); 59 | 60 | File testSnappyFile = getTestFile( "target/output/archive.tar.snappy" ); 61 | snappyArchiver.setDestFile( testSnappyFile ); 62 | snappyArchiver.addFile( getTestFile( "target/output/archive.tar" ), "dontcare" ); 63 | snappyArchiver.createArchive(); 64 | 65 | TarSnappyUnArchiver tarSnappyUnArchiver = (TarSnappyUnArchiver) lookup( UnArchiver.ROLE, "tar.snappy" ); 66 | tarSnappyUnArchiver.setDestDirectory(getTestFile("target/output")); 67 | tarSnappyUnArchiver.setSourceFile(testSnappyFile); 68 | tarSnappyUnArchiver.extract(); 69 | 70 | assertTrue( file1InTar.exists() ); 71 | assertTrue( file2InTar.exists() ); 72 | 73 | //make sure we place the source file back 74 | assertEquals(testSnappyFile, tarSnappyUnArchiver.getSourceFile()); 75 | } 76 | 77 | public void testLookup() 78 | throws Exception 79 | { 80 | lookup( UnArchiver.ROLE, "tar.snappy" ); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/tar/TarUnArchiverTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.tar; 2 | 3 | import org.codehaus.plexus.PlexusTestCase; 4 | import org.codehaus.plexus.archiver.UnArchiver; 5 | import org.codehaus.plexus.components.io.fileselectors.FileSelector; 6 | import org.codehaus.plexus.components.io.fileselectors.IncludeExcludeFileSelector; 7 | import org.codehaus.plexus.util.FileUtils; 8 | 9 | import java.io.File; 10 | 11 | /** 12 | * @author Viktor Sadovnikov 13 | * @version $Revision$ $Date$ 14 | */ 15 | public class TarUnArchiverTest extends PlexusTestCase 16 | { 17 | 18 | private void runUnarchiver( FileSelector[] selectors, boolean[] results ) 19 | throws Exception 20 | { 21 | String s = "target/tar-unarchiver-tests"; 22 | 23 | File testJar = new File( getBasedir(), "src/test/jars/test.tar.gz" ); 24 | 25 | File outputDirectory = new File( getBasedir(), s ); 26 | 27 | TarUnArchiver tarUn = (TarUnArchiver) lookup( UnArchiver.ROLE, "tar.gz" ); 28 | tarUn.setSourceFile(testJar); 29 | tarUn.setDestDirectory(outputDirectory); 30 | tarUn.setFileSelectors(selectors); 31 | 32 | FileUtils.deleteDirectory( outputDirectory ); 33 | 34 | tarUn.extract( testJar.getAbsolutePath(), outputDirectory ); 35 | 36 | assertFileExistance( s, "/resources/artifactId/test.properties", results[0]); 37 | assertFileExistance( s, "/resources/artifactId/directory/test.properties", results[1]); 38 | assertFileExistance( s, "/META-INF/MANIFEST.MF", results[2]); 39 | 40 | } 41 | 42 | private void assertFileExistance( String s, String file, boolean exists ) { 43 | File f0 = new File( getBasedir(), s + file ); 44 | assertEquals( String.format("Did %s expect to find %s file", exists ? "" : "NOT", f0.getAbsoluteFile()), exists, f0.exists() ); 45 | } 46 | 47 | public void testExtractingADirectory() throws Exception 48 | { 49 | runUnarchiver( null, new boolean[]{ true, true, true } ); 50 | } 51 | 52 | public void testSelectors() 53 | throws Exception 54 | { 55 | IncludeExcludeFileSelector fileSelector = new IncludeExcludeFileSelector(); 56 | runUnarchiver( new FileSelector[]{ fileSelector }, new boolean[]{ true, true, true } ); 57 | 58 | fileSelector.setExcludes( new String[]{ "**/test.properties" } ); 59 | runUnarchiver( new FileSelector[]{ fileSelector }, new boolean[]{ false, false, true } ); 60 | 61 | fileSelector.setIncludes( new String[]{ "**/test.properties" } ); 62 | fileSelector.setExcludes( null ); 63 | runUnarchiver( new FileSelector[]{ fileSelector }, new boolean[]{ true, true, false } ); 64 | 65 | fileSelector.setExcludes( new String[]{ "resources/artifactId/directory/test.properties" } ); 66 | runUnarchiver( new FileSelector[]{ fileSelector }, new boolean[]{ true, false, false } ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/util/ArchiveEntryUtilsTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.util; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.HashMap; 6 | 7 | import org.codehaus.plexus.components.io.attributes.Java7FileAttributes; 8 | import org.codehaus.plexus.components.io.attributes.Java7Reflector; 9 | import org.codehaus.plexus.logging.console.ConsoleLogger; 10 | 11 | import junit.framework.TestCase; 12 | import org.codehaus.plexus.util.Os; 13 | 14 | public class ArchiveEntryUtilsTest extends TestCase { 15 | 16 | public void testChmodForFileWithDollarPLXCOMP164() throws Exception 17 | { 18 | 19 | if ( Os.isFamily( Os.FAMILY_WINDOWS )) return; 20 | File temp = File.createTempFile("A$A", "BB$"); 21 | ArchiveEntryUtils.chmod( temp, 0770, new ConsoleLogger( org.codehaus.plexus.logging.Logger.LEVEL_DEBUG, "foo" ), false); 22 | assert0770(temp); 23 | } 24 | 25 | public void testChmodWithJava7() throws Exception 26 | { 27 | if (!Java7Reflector.isAtLeastJava7()) return; // Require at least java7 28 | if ( Os.isFamily( Os.FAMILY_WINDOWS )) return; 29 | 30 | 31 | File temp = File.createTempFile("D$D", "BB$"); 32 | ArchiveEntryUtils.chmod( temp, 0770, new ConsoleLogger( org.codehaus.plexus.logging.Logger.LEVEL_DEBUG, "foo" )); 33 | assert0770(temp); 34 | } 35 | 36 | private void assert0770(File temp) throws IOException { 37 | Java7FileAttributes j7 = new Java7FileAttributes(temp, new HashMap(), new HashMap()); 38 | assertTrue(j7.isGroupExecutable()); 39 | assertTrue(j7.isGroupReadable()); 40 | assertTrue(j7.isGroupWritable()); 41 | 42 | assertFalse(j7.isWorldExecutable()); 43 | assertFalse(j7.isWorldReadable()); 44 | assertFalse(j7.isWorldWritable()); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/util/DefaultFileSetTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.util; 2 | 3 | import junit.framework.TestCase; 4 | 5 | import java.io.File; 6 | 7 | import static org.codehaus.plexus.archiver.util.DefaultFileSet.fileSet; 8 | 9 | /** 10 | * @author Kristian Rosenvold 11 | */ 12 | public class DefaultFileSetTest 13 | extends TestCase 14 | { 15 | public void testCreate() 16 | { 17 | final String[] includes = { "zz", "yy" }; 18 | final String[] exc = { "xx1", "xx2" }; 19 | final DefaultFileSet dfs = fileSet( new File( "foo" ) ).prefixed( "pfx" ).include( includes ).exclude( exc ); 20 | assertEquals( "foo", dfs.getDirectory().getName() ); 21 | assertEquals( "pfx", dfs.getPrefix() ); 22 | assertEquals( "zz", dfs.getIncludes()[0] ); 23 | assertEquals( "xx1", dfs.getExcludes()[0] ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/util/FilePermissionUtilsTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.util; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import junit.framework.TestCase; 23 | 24 | import org.codehaus.plexus.logging.Logger; 25 | import org.codehaus.plexus.logging.console.ConsoleLogger; 26 | 27 | /** 28 | * @author Olivier Lamy 29 | * 30 | */ 31 | public class FilePermissionUtilsTest 32 | extends TestCase 33 | { 34 | Logger getLogger() 35 | { 36 | return new ConsoleLogger( Logger.LEVEL_DEBUG, "foo" ); 37 | 38 | } 39 | 40 | public void testOnlyWritableOnlyUser() throws Exception 41 | { 42 | FilePermission fp = FilePermissionUtils.getFilePermissionFromMode( "200", getLogger() ); 43 | assertTrue( fp.isWritable() ); 44 | assertTrue( fp.isOwnerOnlyWritable() ); 45 | assertFalse( fp.isExecutable() ); 46 | assertTrue( fp.isOwnerOnlyExecutable() ); 47 | assertFalse( fp.isReadable() ); 48 | } 49 | 50 | public void testExecAndRead() 51 | { 52 | FilePermission fp = FilePermissionUtils.getFilePermissionFromMode( "500", getLogger() ); 53 | assertFalse( fp.isWritable() ); 54 | assertTrue( fp.isOwnerOnlyWritable() ); 55 | assertTrue( fp.isExecutable() ); 56 | assertTrue( fp.isOwnerOnlyExecutable() ); 57 | assertTrue( fp.isReadable() ); 58 | } 59 | 60 | public void testAllUser() 61 | { 62 | FilePermission fp = FilePermissionUtils.getFilePermissionFromMode( "700", getLogger() ); 63 | assertTrue( fp.isWritable() ); 64 | assertTrue( fp.isOwnerOnlyWritable() ); 65 | assertTrue( fp.isExecutable() ); 66 | assertTrue( fp.isOwnerOnlyExecutable() ); 67 | assertTrue( fp.isReadable() ); 68 | } 69 | 70 | public void testAllAllUser() 71 | { 72 | FilePermission fp = FilePermissionUtils.getFilePermissionFromMode( "707", getLogger() ); 73 | assertTrue( fp.isWritable() ); 74 | assertFalse( fp.isOwnerOnlyWritable() ); 75 | assertTrue( fp.isExecutable() ); 76 | assertFalse( fp.isOwnerOnlyExecutable() ); 77 | assertTrue( fp.isReadable() ); 78 | assertFalse( fp.isOwnerOnlyReadable() ); 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/war/WarArchiverTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.war; 2 | 3 | import java.io.File; 4 | 5 | import org.codehaus.plexus.PlexusTestCase; 6 | import org.codehaus.plexus.archiver.ArchiveEntry; 7 | import org.codehaus.plexus.archiver.Archiver; 8 | import org.codehaus.plexus.archiver.ResourceIterator; 9 | import org.codehaus.plexus.util.FileUtils; 10 | 11 | /** 12 | * @author Kristian Rosenvold 13 | */ 14 | public class WarArchiverTest 15 | extends PlexusTestCase 16 | { 17 | 18 | private final int expected = 8; 19 | 20 | public void testReAddingPlatformSpecificEncoding() 21 | throws Exception 22 | { 23 | WarArchiver archiver = (WarArchiver) lookup( Archiver.ROLE, "war" ); 24 | archiver.setDestFile( new File( getTargetRarFolder(), "test.war" ) ); 25 | 26 | File dummyContent = getTestFile( "src/test/resources/folders" ); 27 | archiver.addDirectory( dummyContent ); 28 | 29 | assertEquals( expected, count( archiver.getResources() ) ); // I wonder what the first entry is 30 | 31 | File file = getTestFile( "src/test/resources/folders/WEB-INF/web.xml" ); 32 | archiver.setWebxml( file); 33 | 34 | assertEquals( expected, count( archiver.getResources() ) ); // I wonder what the first entry is 35 | 36 | archiver.createArchive(); 37 | assertTrue( new File( getTargetRarFolder(), "test.war" ).exists() ); 38 | } 39 | 40 | public void testInfiniteRecursion() 41 | throws Exception 42 | { 43 | WarArchiver archiver = (WarArchiver) lookup( Archiver.ROLE, "war" ); 44 | archiver.setDestFile( new File( getTargetRarFolder(), "test.war" ) ); 45 | 46 | // Easy to produce infinite recursion if you just add existing files again and again 47 | 48 | File dummyContent = getTestFile( "src/test/resources/folders", "File.txt" ); 49 | final int INFINITY = 10; 50 | for (int i = 0; i < INFINITY; i++){ 51 | archiver.addFile( dummyContent, "testZ" ); 52 | } 53 | assertEquals( 1, count( archiver.getResources() ) ); // I wonder what the first entry is 54 | } 55 | 56 | public File getTargetRarFolder() 57 | { 58 | return new File( getBasedir(), "/target/wartest/" ); 59 | } 60 | 61 | protected void setUp() 62 | throws Exception 63 | { 64 | super.setUp(); 65 | // clean output directory and re create it 66 | if ( getTargetRarFolder().exists() ) 67 | { 68 | FileUtils.deleteDirectory( getTargetRarFolder() ); 69 | } 70 | } 71 | 72 | private int count(ResourceIterator resourceIterator){ 73 | int i = 0; 74 | while (resourceIterator.hasNext()){ 75 | i++; 76 | ArchiveEntry next = resourceIterator.next(); 77 | System.out.print( next.getMode() ); 78 | System.out.println( next.getName() ); 79 | } 80 | return i; 81 | } 82 | 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/test/java/org/codehaus/plexus/archiver/zip/PlexusIoZipFileResourceCollectionTest.java: -------------------------------------------------------------------------------- 1 | package org.codehaus.plexus.archiver.zip; 2 | 3 | import org.codehaus.plexus.PlexusTestCase; 4 | import org.codehaus.plexus.components.io.resources.PlexusIoResource; 5 | 6 | import java.io.File; 7 | import java.io.InputStream; 8 | import java.util.HashSet; 9 | import java.util.Iterator; 10 | import java.util.Set; 11 | 12 | public class PlexusIoZipFileResourceCollectionTest 13 | extends PlexusTestCase 14 | { 15 | 16 | public void testFilesWithIllegalHtmlChars() 17 | throws Exception 18 | { 19 | File testZip = new File( getBasedir(), "src/test/resources/archiveWithIllegalHtmlFileName.zip" ); 20 | Set seen = new HashSet( ); 21 | seen.add( "AFileThatNeedsHtmlEsc%3F>" ); 22 | seen.add( "Afile<Yo>.txt" ); 23 | seen.add( "File With Space.txt" ); 24 | seen.add( "FileWith%.txt" ); 25 | PlexusIoZipFileResourceCollection prc = new PlexusIoZipFileResourceCollection(); 26 | prc.setFile( testZip ); 27 | final Iterator entries = prc.getEntries(); 28 | while (entries.hasNext()){ 29 | final PlexusIoResource next = entries.next(); 30 | assertTrue( next.getName() + "was not present", seen.remove( next.getName() ) ); 31 | final InputStream contents = next.getContents(); 32 | contents.close(); 33 | } 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /src/test/resources/archiveWithIllegalHtmlFileName.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/archiveWithIllegalHtmlFileName.zip -------------------------------------------------------------------------------- /src/test/resources/folders/File.txt: -------------------------------------------------------------------------------- 1 | A file in root -------------------------------------------------------------------------------- /src/test/resources/folders/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/resources/folders/a/FileInA.txt: -------------------------------------------------------------------------------- 1 | A file in A -------------------------------------------------------------------------------- /src/test/resources/folders/b/FileInB.txt: -------------------------------------------------------------------------------- 1 | A file in B -------------------------------------------------------------------------------- /src/test/resources/group-writable/bar.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/group-writable/bar.txt -------------------------------------------------------------------------------- /src/test/resources/group-writable/foo.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/group-writable/foo.txt -------------------------------------------------------------------------------- /src/test/resources/jar-security/dummy.txt: -------------------------------------------------------------------------------- 1 | This file is used as fake content for the security file filtering tests. 2 | -------------------------------------------------------------------------------- /src/test/resources/manifests/manifest1.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /src/test/resources/manifests/manifest2.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Header-without-colon maybe mistyped 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/test/resources/manifests/manifest3.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | Can't start with a continuation line 4 | 5 | -------------------------------------------------------------------------------- /src/test/resources/manifests/manifest4.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Name: test5 3 | 4 | -------------------------------------------------------------------------------- /src/test/resources/manifests/manifest5.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | Test: test6 4 | Class-Path: fubar 5 | 6 | -------------------------------------------------------------------------------- /src/test/resources/manifests/manifest6.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: fubar 3 | From: Jack 4 | 5 | -------------------------------------------------------------------------------- /src/test/resources/manifests/manifestMerge1.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | From: Jack 3 | Bar: 001 4 | 5 | Name: Fudz 6 | Bar: 002 7 | 8 | Name: Redz 9 | Baz: 002 10 | -------------------------------------------------------------------------------- /src/test/resources/manifests/manifestMerge2.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | From: Jack 3 | Bar: 001 4 | 5 | Name: Fudz 6 | Bar: 003 7 | -------------------------------------------------------------------------------- /src/test/resources/manifests/manifestWithClassPath.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: ../config/ 3 | classes12.jar 4 | bc4jct.jar 5 | bc4jdomorcl.jar 6 | bc4jmt.jar 7 | commons-beanutils-bean-collections.jar 8 | commons-beanutils-core.jar 9 | commons-beanutils.jar 10 | commons-codec-1.3.jar 11 | commons-collections-3.1.jar 12 | commons-configuration-1.2.jar 13 | commons-digester.jar 14 | commons-lang-2.0.jar 15 | commons-logging.jar 16 | htbclnt.jar 17 | areallylongjarfilethatisnotentirelyrealbutstillaverylongname.jar 18 | j2ee/home/oc4jclient.jar 19 | From: Jack 20 | -------------------------------------------------------------------------------- /src/test/resources/manifests/manifestWithDualClassPath.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: ../config/ 3 | classes12.jar 4 | From: Jack 5 | Ape: Fud 6 | Class-Path: baz 7 | -------------------------------------------------------------------------------- /src/test/resources/miscUtf8/aFileWithA#.html: -------------------------------------------------------------------------------- 1 | A file with a hash 2 | 3 | -------------------------------------------------------------------------------- /src/test/resources/miscUtf8/aPiñata.txt: -------------------------------------------------------------------------------- 1 | This is a second party trick 2 | -------------------------------------------------------------------------------- /src/test/resources/miscUtf8/anümlaut.txt: -------------------------------------------------------------------------------- 1 | This is a file wiht an uülmaut, again 2 | -------------------------------------------------------------------------------- /src/test/resources/miscUtf8/€uro.txt: -------------------------------------------------------------------------------- 1 | You need more €uros for that 2 | -------------------------------------------------------------------------------- /src/test/resources/mjar179/Messages.properties: -------------------------------------------------------------------------------- 1 | messageKey=Hello world ! -------------------------------------------------------------------------------- /src/test/resources/mjar179/Messages_en.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/mjar179/Messages_en.properties -------------------------------------------------------------------------------- /src/test/resources/mjar179/Messages_fr.properties: -------------------------------------------------------------------------------- 1 | messageKey=Bonjour le monde ! -------------------------------------------------------------------------------- /src/test/resources/symlinks/dirOnTheOutside/FileInDirOnTheOutside.txt: -------------------------------------------------------------------------------- 1 | I am on the outside... 2 | -------------------------------------------------------------------------------- /src/test/resources/symlinks/onTheOutside.txt: -------------------------------------------------------------------------------- 1 | I am on the outside of the src 2 | -------------------------------------------------------------------------------- /src/test/resources/symlinks/regen.sh: -------------------------------------------------------------------------------- 1 | rm symlinks.zip 2 | rm symlinks.tar 3 | cd src 4 | zip --symlinks ../symlinks.zip file* targetDir sym* 5 | tar -cvf ../symlinks.tar file* targetDir sym* 6 | 7 | -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/aRegularDir/aRegularFile.txt: -------------------------------------------------------------------------------- 1 | I am just an ordinary file 2 | -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/fileR.txt: -------------------------------------------------------------------------------- 1 | This file is a source. r r r filemode 2 | -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/fileW.txt: -------------------------------------------------------------------------------- 1 | all w 2 | -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/fileX.txt: -------------------------------------------------------------------------------- 1 | xxx 2 | -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/symDir: -------------------------------------------------------------------------------- 1 | targetDir/ -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/symLinkToDirOnTheOutside: -------------------------------------------------------------------------------- 1 | ../dirOnTheOutside/ -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/symLinkToFileOnTheOutside: -------------------------------------------------------------------------------- 1 | ../onTheOutside.txt -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/symR: -------------------------------------------------------------------------------- 1 | fileR.txt -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/symW: -------------------------------------------------------------------------------- 1 | fileW.txt -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/symX: -------------------------------------------------------------------------------- 1 | fileX.txt -------------------------------------------------------------------------------- /src/test/resources/symlinks/src/targetDir/targetFile.txt: -------------------------------------------------------------------------------- 1 | This is a target file 2 | -------------------------------------------------------------------------------- /src/test/resources/symlinks/symlinks.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/symlinks/symlinks.tar -------------------------------------------------------------------------------- /src/test/resources/symlinks/symlinks.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/symlinks/symlinks.zip -------------------------------------------------------------------------------- /src/test/resources/test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/test.zip -------------------------------------------------------------------------------- /src/test/resources/utf8/D12345679012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890æøå.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/utf8/D12345679012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890æøå.txt -------------------------------------------------------------------------------- /src/test/resources/utf8/D12345679012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890æøå.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/utf8/D12345679012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890æøå.txt -------------------------------------------------------------------------------- /src/test/resources/world-writable/foo.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/world-writable/foo.txt -------------------------------------------------------------------------------- /src/test/resources/zeroFileMode/foobar.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/zeroFileMode/foobar.zip -------------------------------------------------------------------------------- /src/test/resources/zip-timestamp/file-with-even-time.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/zip-timestamp/file-with-even-time.txt -------------------------------------------------------------------------------- /src/test/resources/zip-timestamp/file-with-odd-time.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/zip-timestamp/file-with-odd-time.txt -------------------------------------------------------------------------------- /src/test/resources/zip-timestamp/foo/file-with-even-time.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/zip-timestamp/foo/file-with-even-time.txt -------------------------------------------------------------------------------- /src/test/resources/zip-timestamp/foo/file-with-odd-time.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/zip-timestamp/foo/file-with-odd-time.txt -------------------------------------------------------------------------------- /src/test/resources/zip-timestamp/foo/macOsZipFile.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/zip-timestamp/foo/macOsZipFile.jar -------------------------------------------------------------------------------- /src/test/resources/zip-timestamp/foo/plexus-archiver-2.4.4-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/zip-timestamp/foo/plexus-archiver-2.4.4-SNAPSHOT.jar -------------------------------------------------------------------------------- /src/test/resources/zip-timestamp/macOsZipFile.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonatype/plexus-archiver/b174ef5d935c94fe58da2b48913fde1f2b972a97/src/test/resources/zip-timestamp/macOsZipFile.zip --------------------------------------------------------------------------------