You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2022/10/01 11:23:00 UTC

[jira] [Commented] (MDEP-777) String index out of range when using FlattenFileMapper

    [ https://issues.apache.org/jira/browse/MDEP-777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17611872#comment-17611872 ] 

Elliotte Rusty Harold commented on MDEP-777:
--------------------------------------------

Side note to self: classic example of log messages that provide a lot of useless info but not the thing a dev actually needs to fix the problem; in this case, the line number and stack trace where the exception is thrown.

> String index out of range when using FlattenFileMapper
> ------------------------------------------------------
>
>                 Key: MDEP-777
>                 URL: https://issues.apache.org/jira/browse/MDEP-777
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: unpack
>    Affects Versions: 3.2.0
>            Reporter: Lieven Cardoen
>            Priority: Blocker
>
> When using FlattenFileMapper I'm getting a *String index out of range 0*
> If I comment out the FileMappers then everything runs fine.
> {code:xml}
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-dependency-plugin</artifactId>
>   <version>3.2.0</version>
>   <executions>
>     <!-- Retrieve databases -->
>     <execution>
>       <id>copy-databases-to-dbf-folder</id>
>       <phase>install</phase>
>       <goals>
>         <goal>unpack</goal>
>       </goals>
>       <configuration>
>         <artifactItems>
>           <artifactItem>
>             <groupId>be.mips.appl.database</groupId>
>             <artifactId>${db.variant}-db-oe${oe.major.version}-${os.classifier}</artifactId>
>             <version>${be.mips.appl.database.version}</version>
>             <type>zip</type>
>             <overWrite>true</overWrite>
>             <!-- Next fileMapper should get rid of the folders schema_holder and slq_scripts when extracting the artifact -->
>             <fileMappers>
>               <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FlattenFileMapper"/>
>             </fileMappers>
>           </artifactItem>
>           <artifactItem>
>             <groupId>be.mips.appl.database</groupId>
>             <artifactId>name-db-oe${oe.major.version}-${os.classifier}</artifactId>
>             <version>${be.mips.appl.database.version}</version>
>             <type>zip</type>
>             <overWrite>true</overWrite>
>           </artifactItem>
>         </artifactItems>
>         <includes>**/*</includes>
>         <outputDirectory>${custom.build.directory}/dbf</outputDirectory>
>         <overWriteReleases>true</overWriteReleases>
>         <overWriteSnapshots>true</overWriteSnapshots>
>       </configuration>
>     </execution>
>   </executions>
> </plugin>
> {code}
> {code}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.2.0:unpack (copy-databases-to-dbf-folder) on project build-appl: Execution copy-databases-to-dbf-folder of goal org.apache.maven.plugins:maven-dependency-plugin:3.2.0:unpack failed: String index out of range: 0 -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
> {code}
>  The ZIP contains two folders with files in both of the folders. So no empty folders. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)