You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Sylvain Deschênes (JIRA)" <ad...@incubator.apache.org> on 2006/08/04 16:21:15 UTC

[jira] Commented: (ADFFACES-103) JDev plugin

    [ http://issues.apache.org/jira/browse/ADFFACES-103?page=comments#action_12425784 ] 
            
Sylvain Deschênes commented on ADFFACES-103:
--------------------------------------------

Hi, 
 
We have two environment for our developer. Some people are using Windows, some other use Linux. We need this plugin to work with ADFFace with all of them. But it seems  that JDeveloper isn't using the same format of jpr file on Linux or Windows. 

The plugin work fine with our developer using Linux, and the patch work fine on Windows...

So it seems there should be something like: 

if (System.getProperty("os.name").startsWith("Windows")) {
 urlDOM.setAttribute("path", "file:/" + path + "!/");
 urlDOM.setAttribute("protocol", "jar"); 
}else{
 urlDOM.setAttribute("path", path);
 urlDOM.setAttribute("jar-entry", "");
}

for the plugin to work on both OS.

Sylvain


> JDev plugin
> -----------
>
>                 Key: ADFFACES-103
>                 URL: http://issues.apache.org/jira/browse/ADFFACES-103
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>          Components: Plugins
>            Reporter: Matthias Weßendorf
>
> 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
>       {
> -        return targetPath;
> +        return targetPath.replace(File.separatorChar, '/');
>       }
>     }
>   }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira