Skip to content

Commit fbcf900

Browse files
committed
TIKA-4581: Fix MANIFEST.MF extraction for az-blob, gcs, jdbc plugins
The assembly.xml was trying to include MANIFEST.MF from classes/ directory but it only exists in the JAR file. Changed to use dependencySet with unpack to properly extract MANIFEST.MF and extensions.idx from the project artifact JAR into the plugin ZIP. This fixes 'Cannot find the manifest path' errors for these 3 plugins.
1 parent 0523b3e commit fbcf900

File tree

3 files changed

+174
-117
lines changed

3 files changed

+174
-117
lines changed
Lines changed: 58 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,64 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Licensed to the Apache Software Foundation (ASF) under one
4-
or more contributor license agreements. See the NOTICE file
5-
distributed with this work for additional information
6-
regarding copyright ownership. The ASF licenses this file
7-
to you under the Apache License, Version 2.0 (the
8-
"License"); you may not use this file except in compliance
9-
with the License. You may obtain a copy of the License at
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
109
11-
http://www.apache.org/licenses/LICENSE-2.0
10+
http://www.apache.org/licenses/LICENSE-2.0
1211
13-
Unless required by applicable law or agreed to in writing,
14-
software distributed under the License is distributed on an
15-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16-
KIND, either express or implied. See the License for the
17-
specific language governing permissions and limitations
18-
under the License.
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.
1917
-->
20-
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
21-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22-
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd">
23-
<id>plugin</id>
24-
<formats>
25-
<format>zip</format>
26-
</formats>
27-
<includeBaseDirectory>true</includeBaseDirectory>
28-
<baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
29-
<fileSets>
30-
<fileSet>
31-
<directory>${project.build.directory}</directory>
32-
<outputDirectory>/</outputDirectory>
33-
<includes>
34-
<include>${project.artifactId}-${project.version}.jar</include>
35-
</includes>
36-
</fileSet>
37-
<fileSet>
38-
<directory>${project.build.directory}/lib</directory>
39-
<outputDirectory>/lib</outputDirectory>
40-
<includes>
41-
<include>*.jar</include>
42-
</includes>
43-
</fileSet>
44-
</fileSets>
18+
<assembly xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
20+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0
21+
http://maven.apache.org/xsd/assembly-2.0.0.xsd">
22+
<id>dependencies-zip</id>
23+
<formats>
24+
<format>zip</format>
25+
</formats>
26+
<includeBaseDirectory>false</includeBaseDirectory>
27+
<dependencySets>
28+
<dependencySet>
29+
<outputDirectory>/</outputDirectory>
30+
<useProjectArtifact>true</useProjectArtifact>
31+
<unpack>true</unpack>
32+
<scope>runtime</scope>
33+
<includes>
34+
<include>${project.groupId}:${project.artifactId}</include>
35+
</includes>
36+
<unpackOptions>
37+
<includes>
38+
<include>META-INF/MANIFEST.MF</include>
39+
<include>META-INF/extensions.idx</include>
40+
</includes>
41+
</unpackOptions>
42+
</dependencySet>
43+
</dependencySets>
44+
<fileSets>
45+
<fileSet>
46+
<directory>${project.build.directory}/lib</directory>
47+
<outputDirectory>/lib</outputDirectory>
48+
</fileSet>
49+
<fileSet>
50+
<directory>${project.build.directory}</directory>
51+
<outputDirectory>/lib</outputDirectory>
52+
<includes>
53+
<include>${project.artifactId}-${project.version}.jar</include>
54+
</includes>
55+
</fileSet>
56+
<fileSet>
57+
<directory>${project.basedir}/src/main/resources</directory>
58+
<outputDirectory>/</outputDirectory>
59+
<includes>
60+
<include>plugin.properties</include>
61+
</includes>
62+
</fileSet>
63+
</fileSets>
4564
</assembly>
Lines changed: 58 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,64 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Licensed to the Apache Software Foundation (ASF) under one
4-
or more contributor license agreements. See the NOTICE file
5-
distributed with this work for additional information
6-
regarding copyright ownership. The ASF licenses this file
7-
to you under the Apache License, Version 2.0 (the
8-
"License"); you may not use this file except in compliance
9-
with the License. You may obtain a copy of the License at
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
109
11-
http://www.apache.org/licenses/LICENSE-2.0
10+
http://www.apache.org/licenses/LICENSE-2.0
1211
13-
Unless required by applicable law or agreed to in writing,
14-
software distributed under the License is distributed on an
15-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16-
KIND, either express or implied. See the License for the
17-
specific language governing permissions and limitations
18-
under the License.
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.
1917
-->
20-
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
21-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22-
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd">
23-
<id>plugin</id>
24-
<formats>
25-
<format>zip</format>
26-
</formats>
27-
<includeBaseDirectory>true</includeBaseDirectory>
28-
<baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
29-
<fileSets>
30-
<fileSet>
31-
<directory>${project.build.directory}</directory>
32-
<outputDirectory>/</outputDirectory>
33-
<includes>
34-
<include>${project.artifactId}-${project.version}.jar</include>
35-
</includes>
36-
</fileSet>
37-
<fileSet>
38-
<directory>${project.build.directory}/lib</directory>
39-
<outputDirectory>/lib</outputDirectory>
40-
<includes>
41-
<include>*.jar</include>
42-
</includes>
43-
</fileSet>
44-
</fileSets>
18+
<assembly xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
20+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0
21+
http://maven.apache.org/xsd/assembly-2.0.0.xsd">
22+
<id>dependencies-zip</id>
23+
<formats>
24+
<format>zip</format>
25+
</formats>
26+
<includeBaseDirectory>false</includeBaseDirectory>
27+
<dependencySets>
28+
<dependencySet>
29+
<outputDirectory>/</outputDirectory>
30+
<useProjectArtifact>true</useProjectArtifact>
31+
<unpack>true</unpack>
32+
<scope>runtime</scope>
33+
<includes>
34+
<include>${project.groupId}:${project.artifactId}</include>
35+
</includes>
36+
<unpackOptions>
37+
<includes>
38+
<include>META-INF/MANIFEST.MF</include>
39+
<include>META-INF/extensions.idx</include>
40+
</includes>
41+
</unpackOptions>
42+
</dependencySet>
43+
</dependencySets>
44+
<fileSets>
45+
<fileSet>
46+
<directory>${project.build.directory}/lib</directory>
47+
<outputDirectory>/lib</outputDirectory>
48+
</fileSet>
49+
<fileSet>
50+
<directory>${project.build.directory}</directory>
51+
<outputDirectory>/lib</outputDirectory>
52+
<includes>
53+
<include>${project.artifactId}-${project.version}.jar</include>
54+
</includes>
55+
</fileSet>
56+
<fileSet>
57+
<directory>${project.basedir}/src/main/resources</directory>
58+
<outputDirectory>/</outputDirectory>
59+
<includes>
60+
<include>plugin.properties</include>
61+
</includes>
62+
</fileSet>
63+
</fileSets>
4564
</assembly>
Lines changed: 58 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,64 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Licensed to the Apache Software Foundation (ASF) under one
4-
or more contributor license agreements. See the NOTICE file
5-
distributed with this work for additional information
6-
regarding copyright ownership. The ASF licenses this file
7-
to you under the Apache License, Version 2.0 (the
8-
"License"); you may not use this file except in compliance
9-
with the License. You may obtain a copy of the License at
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
109
11-
http://www.apache.org/licenses/LICENSE-2.0
10+
http://www.apache.org/licenses/LICENSE-2.0
1211
13-
Unless required by applicable law or agreed to in writing,
14-
software distributed under the License is distributed on an
15-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16-
KIND, either express or implied. See the License for the
17-
specific language governing permissions and limitations
18-
under the License.
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.
1917
-->
20-
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
21-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22-
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd">
23-
<id>plugin</id>
24-
<formats>
25-
<format>zip</format>
26-
</formats>
27-
<includeBaseDirectory>true</includeBaseDirectory>
28-
<baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
29-
<fileSets>
30-
<fileSet>
31-
<directory>${project.build.directory}</directory>
32-
<outputDirectory>/</outputDirectory>
33-
<includes>
34-
<include>${project.artifactId}-${project.version}.jar</include>
35-
</includes>
36-
</fileSet>
37-
<fileSet>
38-
<directory>${project.build.directory}/lib</directory>
39-
<outputDirectory>/lib</outputDirectory>
40-
<includes>
41-
<include>*.jar</include>
42-
</includes>
43-
</fileSet>
44-
</fileSets>
18+
<assembly xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
20+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0
21+
http://maven.apache.org/xsd/assembly-2.0.0.xsd">
22+
<id>dependencies-zip</id>
23+
<formats>
24+
<format>zip</format>
25+
</formats>
26+
<includeBaseDirectory>false</includeBaseDirectory>
27+
<dependencySets>
28+
<dependencySet>
29+
<outputDirectory>/</outputDirectory>
30+
<useProjectArtifact>true</useProjectArtifact>
31+
<unpack>true</unpack>
32+
<scope>runtime</scope>
33+
<includes>
34+
<include>${project.groupId}:${project.artifactId}</include>
35+
</includes>
36+
<unpackOptions>
37+
<includes>
38+
<include>META-INF/MANIFEST.MF</include>
39+
<include>META-INF/extensions.idx</include>
40+
</includes>
41+
</unpackOptions>
42+
</dependencySet>
43+
</dependencySets>
44+
<fileSets>
45+
<fileSet>
46+
<directory>${project.build.directory}/lib</directory>
47+
<outputDirectory>/lib</outputDirectory>
48+
</fileSet>
49+
<fileSet>
50+
<directory>${project.build.directory}</directory>
51+
<outputDirectory>/lib</outputDirectory>
52+
<includes>
53+
<include>${project.artifactId}-${project.version}.jar</include>
54+
</includes>
55+
</fileSet>
56+
<fileSet>
57+
<directory>${project.basedir}/src/main/resources</directory>
58+
<outputDirectory>/</outputDirectory>
59+
<includes>
60+
<include>plugin.properties</include>
61+
</includes>
62+
</fileSet>
63+
</fileSets>
4564
</assembly>

0 commit comments

Comments
 (0)