Maven 2.x IDEA Plugin

Module filepath is generated incorrectly for sibling parent

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.1
  • Fix Version/s: 2.2
  • Component/s: None
  • Labels:
    None
  • Environment:
    $ mvn -v
    Maven version: 2.0.7
    Java version: 1.5.0_11
    OS name: "windows xp" version: "5.1" arch: "x86"
    cygwin
  • Number of attachments :
    2

Description

I have a multi-module mvn project.

When I do an mvn idea:clean idea:idea, the following ProjectModuleManager snippet in the top level .ipr is generated:

<component name="ProjectModuleManager">
<modules>
<!-- module filepath="$$PROJECT_DIR$$/${pom.artifactId}.iml"/ -->
<module filepath="$PROJECT_DIR$/gateway.iml"/>
<module filepath="$PROJECT_DIR$/C:/dev/voca/gateway/domain/gateway-domain.iml"/>
<module filepath="$PROJECT_DIR$/C:/dev/voca/gateway/instruction-store/gateway-instruction-store.iml"/>
<module filepath="$PROJECT_DIR$/C:/dev/voca/gateway/parser/gateway-parser.iml"/>
<module filepath="$PROJECT_DIR$/C:/dev/voca/gateway/psrgeneration/gateway-psr-generation.iml"/>
<module filepath="$PROJECT_DIR$/C:/dev/voca/gateway/output/gateway-output.iml"/>
<module filepath="$PROJECT_DIR$/C:/dev/voca/gateway/destination-resolver/gateway-destination-resolver.iml"/>
<module filepath="$PROJECT_DIR$/C:/dev/voca/gateway/choreography/gateway-choreography.iml"/>
<module filepath="$PROJECT_DIR$/C:/dev/voca/gateway/presentation/gateway-presentation.iml"/>
<module filepath="$PROJECT_DIR$/C:/dev/voca/gateway/assembly/gateway-assembly.iml"/>
</modules>
</component>

The $PROJECT_DIR in this case is C:/dev/voca/gateway/.

But this path is being appended in a hard-coded fashion after the $PROJECT_DIR entry.

The symptom in Intellij is the following error message:

Cannot load module: File C:\dev\voca\gateway\C:\dev\voca\gateway\domain\gateway-domain.iml does not exist
Would you like to remove the module from the project?

The workaround is to delete the extra appended file path from each module entry in the above mentioned snippet.

Issue Links

Activity

Hide
Joern Huxhorn added a comment -

the problem still exists if the master-module is at the same level as the child module, e.g. C:\foo\master and C:\foo\child.

The attached patch fixes this problem.

Show
Joern Huxhorn added a comment - the problem still exists if the master-module is at the same level as the child module, e.g. C:\foo\master and C:\foo\child. The attached patch fixes this problem.
Hide
Joern Huxhorn added a comment -

I'd also suggest to change
protected String toRelative( File basedir, String absolutePath )
to
static String toRelative( File basedir, String absolutePath )

and write some tests. I didn't want to change too much, though.

Show
Joern Huxhorn added a comment - I'd also suggest to change protected String toRelative( File basedir, String absolutePath ) to static String toRelative( File basedir, String absolutePath ) and write some tests. I didn't want to change too much, though.
Hide
Dennis Lundberg added a comment -

Which issue was this cloned from? Please create a link to it.

Show
Dennis Lundberg added a comment - Which issue was this cloned from? Please create a link to it.
Hide
Dennis Lundberg added a comment -

Found it.

Show
Dennis Lundberg added a comment - Found it.
Hide
Dennis Lundberg added a comment -

The issue MIDEA-98 has been fixed and verified. It is only available in the the 2.2-SNAPSHOT version. It is not fixed in version 2.1 of this plugin.

Show
Dennis Lundberg added a comment - The issue MIDEA-98 has been fixed and verified. It is only available in the the 2.2-SNAPSHOT version. It is not fixed in version 2.1 of this plugin.
Hide
Joern Huxhorn added a comment -

My patch is against r559855 of 2.2-SNAPSHOT (trunk).

I tried the 2.2-SNAPSHOT and the same problem still exists if the master-pom is at the same level as the child-poms.

C:\Foo\parent\pom.xml
The master-pom containing a <modules> section
<modules>
<module>../child</module>
</modules>

C:\Foo\child\pom.xml
The sub-module referenced from the master-module

In cases like that, i.e. if the path of the submodule must contain ".." the behavior is still like in the original bug-report. That's why I cloned it instead of creating a new one which was probably wrong on my side. I thought this would be wise since the previous fix only fixed a special-case of the problem.

Show
Joern Huxhorn added a comment - My patch is against r559855 of 2.2-SNAPSHOT (trunk). I tried the 2.2-SNAPSHOT and the same problem still exists if the master-pom is at the same level as the child-poms. C:\Foo\parent\pom.xml The master-pom containing a <modules> section <modules> <module>../child</module> </modules> C:\Foo\child\pom.xml The sub-module referenced from the master-module In cases like that, i.e. if the path of the submodule must contain ".." the behavior is still like in the original bug-report. That's why I cloned it instead of creating a new one which was probably wrong on my side. I thought this would be wise since the previous fix only fixed a special-case of the problem.
Hide
Joern Huxhorn added a comment -

To clarify my point a little more: calling toRelative("C:\Foo\bar1", "C:\Foo\bar2") must return "../bar2" but currently returns "C:/Foo/bar2".

Show
Joern Huxhorn added a comment - To clarify my point a little more: calling toRelative("C:\Foo\bar1", "C:\Foo\bar2") must return "../bar2" but currently returns "C:/Foo/bar2".
Hide
Lars Duvaas added a comment -

It appears that the bug only occurs in maven 2.0.7.. When I run the goal in maven 2.0.6 it works fine.

Show
Lars Duvaas added a comment - It appears that the bug only occurs in maven 2.0.7.. When I run the goal in maven 2.0.6 it works fine.
Hide
Kristian Nordal added a comment -

I'm experiencing the same. It works with 2.0.6, not with 2.0.7. It does works in os x though (with 2.0.7), but not in Windows (cmd and cygwin).

Show
Kristian Nordal added a comment - I'm experiencing the same. It works with 2.0.6, not with 2.0.7. It does works in os x though (with 2.0.7), but not in Windows (cmd and cygwin).
Hide
Geoffrey De Smet added a comment -

same here: win xp + idea 6 + maven 2.0.7 + maven-idea-plugin 2.1 (and 2.0 too I believe) = wrong iml paths in the ipr of a multimodule project.

Show
Geoffrey De Smet added a comment - same here: win xp + idea 6 + maven 2.0.7 + maven-idea-plugin 2.1 (and 2.0 too I believe) = wrong iml paths in the ipr of a multimodule project.
Hide
Geoffrey De Smet added a comment -

Confirming it doesn't work for idea 2.0 or 2.1. It's maven 2.0.7 and win xp combination that is breaking.

Workaround
==========

Make sure you still have maven 2.0.6 still installed.
Do this in your cygwin shell:

export M2_HOME=/cygdrive/c/develop/build/maven-2.0.6
mvn idea:idea

or if you're using cmd:
set M2_HOME=C:\develop\build\maven-2.0.6
mvn idea:idea

Afterwards throw away that shell instance, as it won't be using maven 2.0.7.

Show
Geoffrey De Smet added a comment - Confirming it doesn't work for idea 2.0 or 2.1. It's maven 2.0.7 and win xp combination that is breaking. Workaround ========== Make sure you still have maven 2.0.6 still installed. Do this in your cygwin shell: export M2_HOME=/cygdrive/c/develop/build/maven-2.0.6 mvn idea:idea or if you're using cmd: set M2_HOME=C:\develop\build\maven-2.0.6 mvn idea:idea Afterwards throw away that shell instance, as it won't be using maven 2.0.7.
Hide
Roman Platonov added a comment -

Hello!
My fix is more simple, but it's works...

class AbstractIdeaMojo:

protected String toRelative( File basedir, String absolutePath )
{
String relative = null;
String convertedBasedirAbsolutePath = convertDriveLetter( basedir.getAbsolutePath() );
String convertedAbsolutePath = convertDriveLetter( absolutePath );

String fileSeparator = System.getProperty("file.separator");
String upPrefix = "";
while (convertedBasedirAbsolutePath.indexOf(fileSeparator) > 0) {
if (convertedAbsolutePath.startsWith(convertedBasedirAbsolutePath)
&& convertedAbsolutePath.length() > convertedBasedirAbsolutePath.length()) { relative = upPrefix + convertedAbsolutePath.substring(convertedBasedirAbsolutePath.length() + 1); break; } else { convertedBasedirAbsolutePath = convertedBasedirAbsolutePath.substring(0, convertedBasedirAbsolutePath.lastIndexOf(fileSeparator)); upPrefix += "../"; }
}
if (relative == null) { relative = convertedAbsolutePath; }

relative = StringUtils.replace( relative, "
", "/" );

if ( getLog().isDebugEnabled() )

{ getLog().debug( "toRelative(" + basedir + ", " + absolutePath + ") => " + relative ); }

return relative;
}

Show
Roman Platonov added a comment - Hello! My fix is more simple, but it's works... class AbstractIdeaMojo: protected String toRelative( File basedir, String absolutePath ) { String relative = null; String convertedBasedirAbsolutePath = convertDriveLetter( basedir.getAbsolutePath() ); String convertedAbsolutePath = convertDriveLetter( absolutePath ); String fileSeparator = System.getProperty("file.separator"); String upPrefix = ""; while (convertedBasedirAbsolutePath.indexOf(fileSeparator) > 0) { if (convertedAbsolutePath.startsWith(convertedBasedirAbsolutePath) && convertedAbsolutePath.length() > convertedBasedirAbsolutePath.length()) { relative = upPrefix + convertedAbsolutePath.substring(convertedBasedirAbsolutePath.length() + 1); break; } else { convertedBasedirAbsolutePath = convertedBasedirAbsolutePath.substring(0, convertedBasedirAbsolutePath.lastIndexOf(fileSeparator)); upPrefix += "../"; } } if (relative == null) { relative = convertedAbsolutePath; } relative = StringUtils.replace( relative, "
", "/" ); if ( getLog().isDebugEnabled() ) { getLog().debug( "toRelative(" + basedir + ", " + absolutePath + ") => " + relative ); } return relative; }
Hide
Daniel Frey added a comment - - edited

Hi there

I just tested it with the 2.2-SNAPSHOT and got a wrong result! My project structure is:

ch.ki.ras/
ch.ki.ras.monitor/
ch.ki.ras.om/

where the first directory contains the master POM. What I get in the project file ch.ki.ras/ch.ki.ras.ipr is

<module filepath="$PROJECT_DIR$/ch.ki.ras.iml"/>
<module filepath="$PROJECT_DIR$/monitor/ch.ki.ras.monitor.iml"/>
<module filepath="$PROJECT_DIR$/om/ch.ki.ras.om.iml"/>

So not only the path is not relative to the main POM, but also the path information is trucated. Instead it should be

<module filepath="$PROJECT_DIR$/../ch.ki.ras/ch.ki.ras.iml"/>
<!-- or <module filepath="$PROJECT_DIR$/ch.ki.ras.iml"/>-->
<module filepath="$PROJECT_DIR$/../ch.ki.ras.monitor/ch.ki.ras.monitor.iml"/>
<module filepath="$PROJECT_DIR$/../ch.ki.ras.om/ch.ki.ras.om.iml"/>

Would be wunderful to get a new SNAPSHOT soon!

Thanks
Daniel Frey

Show
Daniel Frey added a comment - - edited Hi there I just tested it with the 2.2-SNAPSHOT and got a wrong result! My project structure is: ch.ki.ras/ ch.ki.ras.monitor/ ch.ki.ras.om/ where the first directory contains the master POM. What I get in the project file ch.ki.ras/ch.ki.ras.ipr is <module filepath="$PROJECT_DIR$/ch.ki.ras.iml"/> <module filepath="$PROJECT_DIR$/monitor/ch.ki.ras.monitor.iml"/> <module filepath="$PROJECT_DIR$/om/ch.ki.ras.om.iml"/> So not only the path is not relative to the main POM, but also the path information is trucated. Instead it should be <module filepath="$PROJECT_DIR$/../ch.ki.ras/ch.ki.ras.iml"/> <!-- or <module filepath="$PROJECT_DIR$/ch.ki.ras.iml"/>--> <module filepath="$PROJECT_DIR$/../ch.ki.ras.monitor/ch.ki.ras.monitor.iml"/> <module filepath="$PROJECT_DIR$/../ch.ki.ras.om/ch.ki.ras.om.iml"/> Would be wunderful to get a new SNAPSHOT soon! Thanks Daniel Frey
Hide
gotama added a comment -

I am running XP, Maven 2.0.8, Maven IDEA plugin 2.1 and Cygwin. When I issue 'mvn idea:idea' on the XP command line my IDEA project file is fine. When I issue the same command in Cygwin, the paths are incorrect.

Using the 2.2-SNAPSHOT it works fine, except for the above noted conditions where the parent and module dirs are at the same level. This is a different bug.

This issue is working on over 8 months without a release, yet there is a fix for one of the show stopping bugs which prevents you from using the plugin. 2.2 should be released as is now and a new fresh jira issue should be created to address the bug about the paths being incorrect for when the parents and modules are at the same level. This plugin is broken without releasing 2.2.

Show
gotama added a comment - I am running XP, Maven 2.0.8, Maven IDEA plugin 2.1 and Cygwin. When I issue 'mvn idea:idea' on the XP command line my IDEA project file is fine. When I issue the same command in Cygwin, the paths are incorrect. Using the 2.2-SNAPSHOT it works fine, except for the above noted conditions where the parent and module dirs are at the same level. This is a different bug. This issue is working on over 8 months without a release, yet there is a fix for one of the show stopping bugs which prevents you from using the plugin. 2.2 should be released as is now and a new fresh jira issue should be created to address the bug about the paths being incorrect for when the parents and modules are at the same level. This plugin is broken without releasing 2.2.
Hide
gotama added a comment -

Actually, I just tested Roman's code above - adding it to the latest 2.2-SNAPSHOT and the paths are correct for an idea project with the parent and modules at the same level. The modules paths are correctly relative using "../".

Someone should throw that code in there, close this out and release 2.2. WFM.

Show
gotama added a comment - Actually, I just tested Roman's code above - adding it to the latest 2.2-SNAPSHOT and the paths are correct for an idea project with the parent and modules at the same level. The modules paths are correctly relative using "../". Someone should throw that code in there, close this out and release 2.2. WFM.
Hide
Geoffrey De Smet added a comment -

Someone should throw that code in there, close this out and release 2.2.

I couldn't agree more

Show
Geoffrey De Smet added a comment -
Someone should throw that code in there, close this out and release 2.2.
I couldn't agree more
Hide
gotama added a comment -

I would add it - but I'm new to this project so I don't know how to get permissions to check in code and what the official release process is. How do you become a committer?

Also, someone should check out the ClassWorlds dependency for the tests. The tests fail because they are missing the ClassWorlds dependency.

<dependency>
<groupId>classworlds</groupId>
<artifactId>classworlds</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>

Show
gotama added a comment - I would add it - but I'm new to this project so I don't know how to get permissions to check in code and what the official release process is. How do you become a committer? Also, someone should check out the ClassWorlds dependency for the tests. The tests fail because they are missing the ClassWorlds dependency. <dependency> <groupId>classworlds</groupId> <artifactId>classworlds</artifactId> <version>1.1</version> <scope>test</scope> </dependency>
Hide
Dennis Lundberg added a comment -

Thanks for trying the patch. As I don't have a cygwin environment I have not been able to verify the patch. I'll have a look at the patch.

Show
Dennis Lundberg added a comment - Thanks for trying the patch. As I don't have a cygwin environment I have not been able to verify the patch. I'll have a look at the patch.
Hide
gotama added a comment -

http://cygwin.com/setup.exe

... just click through 'next' on everything and get the basic install. quick easy setup... beats the windows prompt for those on the corporate XP system!

Show
gotama added a comment - http://cygwin.com/setup.exe ... just click through 'next' on everything and get the basic install. quick easy setup... beats the windows prompt for those on the corporate XP system!
Hide
Dennis Lundberg added a comment -

I have committed the patch, with modifications. I also added a small test case.

A new SNAPSHOT has been deployed, please verify that it solves this issue.

Show
Dennis Lundberg added a comment - I have committed the patch, with modifications. I also added a small test case. A new SNAPSHOT has been deployed, please verify that it solves this issue.
Hide
Joern Huxhorn added a comment -

I had to build using

mvn clean install -Dmaven.test.skip=true

because otherwise the build would fail with the following messages:

Running org.apache.maven.plugin.idea.IdeaModuleTest
[WARNING] An error occurred during dependency resolution of the following artifact:

org.apache.maven.plugin.test:plugin-test-1919

Caused by: required artifacts missing:
javax.sql:jdbc-stdext:jar:2.0

for the artifact:
org.apache.maven.plugin.test:plugin-test-19:jar:19

from the specified remote repositories:
test-repo (file://P:\misc\maven-idea-plugin\src\test\remote-repo)

[WARNING] An error occurred during dependency resolution of the following artifact:

org.apache.maven.plugin.test:plugin-test-2222

Caused by: required artifacts missing:
javax.sql:jdbc-stdext:jar:2.0

for the artifact:
org.apache.maven.plugin.test:plugin-test-22:jar:22

from the specified remote repositories:
test-repo (file://P:\misc\maven-idea-plugin\src\test\remote-repo)

[WARNING] Unable to get resource from repository test-repo (file://P:\misc\maven-idea-plugin\src\test\remote-repo)
[INFO] artifact junit:junit: checking for updates from test-repo
Tests run: 15, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.484 sec <<< FAILURE!
Running org.apache.maven.plugin.idea.LibraryTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.apache.maven.plugin.idea.IdeaMojoTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec

Results :

Failed tests:
testEjbProjectWithModulesConfigurations(org.apache.maven.plugin.idea.IdeaModuleTest)

Tests run: 37, Failures: 1, Errors: 0, Skipped: 0

But beside that, the current version works as expected for me.

Show
Joern Huxhorn added a comment - I had to build using mvn clean install -Dmaven.test.skip=true because otherwise the build would fail with the following messages: Running org.apache.maven.plugin.idea.IdeaModuleTest [WARNING] An error occurred during dependency resolution of the following artifact: org.apache.maven.plugin.test:plugin-test-1919 Caused by: required artifacts missing: javax.sql:jdbc-stdext:jar:2.0 for the artifact: org.apache.maven.plugin.test:plugin-test-19:jar:19 from the specified remote repositories: test-repo (file://P:\misc\maven-idea-plugin\src\test\remote-repo) [WARNING] An error occurred during dependency resolution of the following artifact: org.apache.maven.plugin.test:plugin-test-2222 Caused by: required artifacts missing: javax.sql:jdbc-stdext:jar:2.0 for the artifact: org.apache.maven.plugin.test:plugin-test-22:jar:22 from the specified remote repositories: test-repo (file://P:\misc\maven-idea-plugin\src\test\remote-repo) [WARNING] Unable to get resource from repository test-repo (file://P:\misc\maven-idea-plugin\src\test\remote-repo) [INFO] artifact junit:junit: checking for updates from test-repo Tests run: 15, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.484 sec <<< FAILURE! Running org.apache.maven.plugin.idea.LibraryTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Running org.apache.maven.plugin.idea.IdeaMojoTestCase Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec Results : Failed tests: testEjbProjectWithModulesConfigurations(org.apache.maven.plugin.idea.IdeaModuleTest) Tests run: 37, Failures: 1, Errors: 0, Skipped: 0 But beside that, the current version works as expected for me.
Hide
Daniel Frey added a comment -

Just tested it with maven-idea-plugin-2.2-20080308.204124-6. For me, this issue (http://jira.codehaus.org/browse/MIDEA-102#action_122161) stays open. Nothing has changed. I get exactly the same result as with 2.1.

Show
Daniel Frey added a comment - Just tested it with maven-idea-plugin-2.2-20080308.204124-6. For me, this issue (http://jira.codehaus.org/browse/MIDEA-102#action_122161) stays open. Nothing has changed. I get exactly the same result as with 2.1.
Hide
Dennis Lundberg added a comment -

Daniel, please open another issue for that. It is a different issue than this one.

Also attach a small test project that can be used to reproduce the issue.

Show
Dennis Lundberg added a comment - Daniel, please open another issue for that. It is a different issue than this one. Also attach a small test project that can be used to reproduce the issue.
Hide
gotama added a comment -

Dennis, the patch you applied is highly unnecessarily complex. Take a look at the patch that Roman lists above. This is the one that should be applied. Its 3 times smaller and easy to follow. If Roman's patch does not work, please explain why your patch works better.

However, Daniel, I have tested both Roman's patch and Dennis' patch, and they both work. I did not pull the snapshot though, I complied the patches myself. You may want to delete the .m2\repository\org\apache\maven\plugins\maven-idea-plugin directory to ensure you are in fact using the 2.2-SNAPSHOT. If it still does not work, please elaborate using the test pom's below.

Example:

<module filepath="$PROJECT_DIR$/parent.iml"/>
<module filepath="$PROJECT_DIR$/../child/child.iml"/>

Is the result of running mvn idea:idea on:

c:\foo\parent\pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test</groupId>
<artifactId>parent</artifactId>
<name>stubhub.com</name>
<packaging>pom</packaging>
<version>3.0.6</version>
<description>Parent POM</description>
<inceptionYear>2008</inceptionYear>
<modules>
<module>../child</module>
</modules>

</project>

c:\foo\child\pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.test</groupId>
<artifactId>parent</artifactId>
<version>3.0.6</version>
</parent>
<artifactId>child</artifactId>
<name>test</name>
<packaging>pom</packaging>
<version>3.0.6</version>
<description>child of test</description>
<inceptionYear>2008</inceptionYear>

</project>

So, again, lets throw Roman's patch in 2.2 and release this puppy. Nothing else is open for 2.2.

Thanks.

Show
gotama added a comment - Dennis, the patch you applied is highly unnecessarily complex. Take a look at the patch that Roman lists above. This is the one that should be applied. Its 3 times smaller and easy to follow. If Roman's patch does not work, please explain why your patch works better. However, Daniel, I have tested both Roman's patch and Dennis' patch, and they both work. I did not pull the snapshot though, I complied the patches myself. You may want to delete the .m2\repository\org\apache\maven\plugins\maven-idea-plugin directory to ensure you are in fact using the 2.2-SNAPSHOT. If it still does not work, please elaborate using the test pom's below. Example: <module filepath="$PROJECT_DIR$/parent.iml"/> <module filepath="$PROJECT_DIR$/../child/child.iml"/> Is the result of running mvn idea:idea on: c:\foo\parent\pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.test</groupId> <artifactId>parent</artifactId> <name>stubhub.com</name> <packaging>pom</packaging> <version>3.0.6</version> <description>Parent POM</description> <inceptionYear>2008</inceptionYear> <modules> <module>../child</module> </modules> </project> c:\foo\child\pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.test</groupId> <artifactId>parent</artifactId> <version>3.0.6</version> </parent> <artifactId>child</artifactId> <name>test</name> <packaging>pom</packaging> <version>3.0.6</version> <description>child of test</description> <inceptionYear>2008</inceptionYear> </project> So, again, lets throw Roman's patch in 2.2 and release this puppy. Nothing else is open for 2.2. Thanks.
Hide
gotama added a comment -

Also, this issue should not be closed until its agreed its fixed. Please reopen.

Show
gotama added a comment - Also, this issue should not be closed until its agreed its fixed. Please reopen.
Hide
Dennis Lundberg added a comment -

gotama,

There is no patch from Roman - it's just a piece of code embedded in a comment. That won't show up on my radar when I'm looking for patches to apply. Contributors should alway supply a patch-file and attach it to the issue.

The patch I applied wasn't mine , but came from Joern who was the person who filed this issue.

That being said, I'll probably throw the whole toRelative() method out and use a method from doxia tools instead. That code includes lots unit tests and has been extracted from already tried and tested components. We still need to get a release of it out the door. In the meantime I'll push out another SNAPSHOT using that code. Stay tuned.

Show
Dennis Lundberg added a comment - gotama, There is no patch from Roman - it's just a piece of code embedded in a comment. That won't show up on my radar when I'm looking for patches to apply. Contributors should alway supply a patch-file and attach it to the issue. The patch I applied wasn't mine , but came from Joern who was the person who filed this issue. That being said, I'll probably throw the whole toRelative() method out and use a method from doxia tools instead. That code includes lots unit tests and has been extracted from already tried and tested components. We still need to get a release of it out the door. In the meantime I'll push out another SNAPSHOT using that code. Stay tuned.
Hide
gotama added a comment -

What is the status of this issue?

I'm willing to forgo the whole implementation style argument for simply getting "A" fixed version of 2.2 out the door.

The current SNAPSHOT works, so I vote for releasing it, then later on revisiting the 3 different ways the paths can be corrected. The important thing is that it is fixed.

In the mean time, there are people out there trying to use Maven for the first time, and they will not be impressed when 'mvn idea:idea' does not work. This is one of the cool selling points of Maven to a team of developers and its been busted for a year.

Release 2.2...

Thanks.

Show
gotama added a comment - What is the status of this issue? I'm willing to forgo the whole implementation style argument for simply getting "A" fixed version of 2.2 out the door. The current SNAPSHOT works, so I vote for releasing it, then later on revisiting the 3 different ways the paths can be corrected. The important thing is that it is fixed. In the mean time, there are people out there trying to use Maven for the first time, and they will not be impressed when 'mvn idea:idea' does not work. This is one of the cool selling points of Maven to a team of developers and its been busted for a year. Release 2.2... Thanks.
Hide
Dennis Lundberg added a comment -

The tests currently fail in Linux/Unix environments. I need to try and fix that before I can make the release.

Show
Dennis Lundberg added a comment - The tests currently fail in Linux/Unix environments. I need to try and fix that before I can make the release.
Hide
gotama added a comment -

Dennis,

Have you made any headway on this? I'm sure a lot of people would appreciate this fix and a working 2.2 IDEA Maven2 plugin.

How can we help?

When you say the tests fail, are those checked in 2.2 junit tests? We should be able to do something like create a test project and a junit test, check them in, and then test it in all environments (XP/Cygwin, XP, Linux, OSX) until it passes. Is this already checked in? If it is, then contributors could try to fix it and we'd all agree on exactly what has to pass. Can we try to outline this?

Thanks,
Blaine

Show
gotama added a comment - Dennis, Have you made any headway on this? I'm sure a lot of people would appreciate this fix and a working 2.2 IDEA Maven2 plugin. How can we help? When you say the tests fail, are those checked in 2.2 junit tests? We should be able to do something like create a test project and a junit test, check them in, and then test it in all environments (XP/Cygwin, XP, Linux, OSX) until it passes. Is this already checked in? If it is, then contributors could try to fix it and we'd all agree on exactly what has to pass. Can we try to outline this? Thanks, Blaine
Hide
Daniel Frey added a comment -

For me this issue is open for the described file structure (see comments above). However, a slightly altered patch works fine. Please find it attached.

Show
Daniel Frey added a comment - For me this issue is open for the described file structure (see comments above). However, a slightly altered patch works fine. Please find it attached.
Hide
Dennis Lundberg added a comment -

I've managed to make the test pass on both Windows and Ubuntu now.

It would be great if people could test the new maven-idea-plugin 2.2-20080719.165010-7 SNAPSHOT that I have deployed.

Also I would appreciate if someone with Cygwin installed could run 'mvn test' on the SVN trunk, to make sure the tests pass there as well.

Show
Dennis Lundberg added a comment - I've managed to make the test pass on both Windows and Ubuntu now. It would be great if people could test the new maven-idea-plugin 2.2-20080719.165010-7 SNAPSHOT that I have deployed. Also I would appreciate if someone with Cygwin installed could run 'mvn test' on the SVN trunk, to make sure the tests pass there as well.
Hide
Dennis Lundberg added a comment -

OK, I'm closing this as fixed now. I got one response in private that it works.

Show
Dennis Lundberg added a comment - OK, I'm closing this as fixed now. I got one response in private that it works.

People

Vote (12)
Watch (11)

Dates

  • Created:
    Updated:
    Resolved: