Return-Path: Delivered-To: apmail-maven-issues-archive@locus.apache.org Received: (qmail 21780 invoked from network); 24 Apr 2007 21:07:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2007 21:07:48 -0000 Received: (qmail 4003 invoked by uid 500); 24 Apr 2007 21:07:54 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 3966 invoked by uid 500); 24 Apr 2007 21:07:54 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 3955 invoked by uid 99); 24 Apr 2007 21:07:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 14:07:54 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [63.246.2.115] (HELO codehaus01.managed.contegix.com) (63.246.2.115) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 14:07:47 -0700 Received: from codehaus01.managed.contegix.com (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id A358514A803D for ; Tue, 24 Apr 2007 16:07:26 -0500 (CDT) Message-ID: <6466224.1177448846666.JavaMail.haus-jira@codehaus01.managed.contegix.com> Date: Tue, 24 Apr 2007 16:07:26 -0500 (CDT) From: "Dennis Lundberg (JIRA)" To: issues@maven.apache.org Subject: [jira] Closed: (MIDEA-75) mvn idea:idea fails with StringIndexOutOfBoundsException (toRelative method) when adding resource to base project In-Reply-To: <50554553.1161863403614.JavaMail.haus-jira@codehaus01.managed.contegix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://jira.codehaus.org/browse/MIDEA-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dennis Lundberg closed MIDEA-75. -------------------------------- Assignee: Dennis Lundberg Resolution: Fixed Fix Version/s: 2.1 Fixed in r532081. > mvn idea:idea fails with StringIndexOutOfBoundsException (toRelative method) when adding resource to base project > ----------------------------------------------------------------------------------------------------------------- > > Key: MIDEA-75 > URL: http://jira.codehaus.org/browse/MIDEA-75 > Project: Maven 2.x Idea Plugin > Issue Type: Bug > Affects Versions: 2.0 > Reporter: Silvestrov Ilya > Assignee: Dennis Lundberg > Fix For: 2.1 > > Attachments: ideaPluginBug.zip > > > I want a base project to handle special resource which is located in not default location. > Example: I want all my projects to pack file history.txt located in project basedir into jar. > So, this resource is mentioned in parent project: > > > > ${basedir} > > history.txt > > > > > When I package child project it works well. But when I try to run idea:idea (or idea:module) it fails with following stacktrace: > java.lang.StringIndexOutOfBoundsException: String index out of range: -1 > at java.lang.String.substring(String.java:1444) > at java.lang.String.substring(String.java:1411) > at org.apache.maven.plugin.idea.AbstractIdeaMojo.toRelative(AbstractIdeaMojo.java:217) > at org.apache.maven.plugin.idea.IdeaModuleMojo.getModuleFileUrl(IdeaModuleMojo.java:777) > at org.apache.maven.plugin.idea.IdeaModuleMojo.getModuleFileUrl(IdeaModuleMojo.java:782) > at org.apache.maven.plugin.idea.IdeaModuleMojo.addSourceFolder(IdeaModuleMojo.java:797) > at org.apache.maven.plugin.idea.IdeaModuleMojo.rewriteModule(IdeaModuleMojo.java:278) > at org.apache.maven.plugin.idea.IdeaMojo.rewriteModule(IdeaMojo.java:205) > at org.apache.maven.plugin.idea.IdeaMojo.execute(IdeaMojo.java:185) > at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > parent and child project examples are attached. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira