Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Hello,
Been trying to use the maven-jdev-plugin plugin. It seems to work except
(for jdeveloper 10.1.3.36.73) munging the fully-qualified directories on all
the jarpaths, they were all being preceeded with the project home directory
(the bad was happening after jdeveloper munged and then saved the project
file, and was not entirely with the project file produced by the maven
plugin) :
Eg. Bad:
<url protocol="jar" path="file:/D:/development/svnwork/common/C:\Documents
and
Settings\maxfieb\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar!/"/>
Eg. Good:
<url protocol="jar" path="file:/C:/Documents and
Settings/maxfieb/.m2/repository/cas/casclient/2.0.11/casclient-2.0.11.jar!/"/>
Note that for some reason jdeveloper (by whatever weak definition it has of
an "absolute" directory) was thinking the path was not absolute so it was
prepending the project root. Also in the case that the repository was on a
different drive than the project home, it did not convert the \ slashes to /
slasges (as the other clauses already did) which was my initial problem.
This was not enough to fix for my version of jdeveloper though, the jar
business needed to change also.
Cheers
Brett
D:\DEVELO~1\svnwork\adffaces\plugins\maven-jdev-plugin>svn diff
Index:
src/main/java/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/JDeveloperMojo.java
===================================================================
—
src/main/java/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/JDeveloperMojo.java
(revision 426771)
+++
src/main/java/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/JDeveloperMojo.java
(working copy)
@@ -555,7 +555,7 @@
//
// <hash>
// <list n="classPath">
- // <url path="[path-to-artifact]" jar-entry="" />
+ // <url path="file:/[path-to-artifact]!/" protocol="jar" />
// </list>
// <value n="deployedByDefault" v="true"/>
// <value n="description" v="[artifact.id]"/>
@@ -589,8 +589,8 @@
listDOM.setAttribute("n", "classPath");
Xpp3Dom urlDOM = new Xpp3Dom("url");
- urlDOM.setAttribute("path", path);
- urlDOM.setAttribute("jar-entry", "");
+ urlDOM.setAttribute("path", "file:/" + path + "!/");
+ urlDOM.setAttribute("protocol", "jar");
listDOM.addChild(urlDOM);
hashDOM.addChild(listDOM);
@@ -976,7 +976,7 @@
}
else
}
}