Hi,

Looks like there is an issue with my plugin on Windows boxes (you are using
Windows, don't you?)
It seems that Maven cannot see tools.jar from %JAVA_HOME%/lib directory. 
I've tried adding tools.jar to the classpath but the effect is the same.
The only way I've made it working was to copy the %JAVA_HOME%/lib/tools.jar to
%MAVEN_HOME%/lib/.

It must be the Windows-specific issue, because on the Mac OS X (my development
box), everything works perfectly well.

Anyone has a better solution? Any Windows experts there?

Hope this helps.
Regards,
Jakub

On Fri, 26 May 2006 11:26:42 +0800 (CST), ΰ" "łŁ wrote
> Hi Jakub,
> 
> I have tried your plugin. I think your idea is wonderful. But I can 
> not mvn compile your test project. The following is the error. 
>  Please help me. Thanks.
> 
> E:\test-project>mvn -e compile
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] --------------------------------------------------------------
> ----------
> ---
> [INFO] Building Maven Quick Start Archetype
> [INFO]    task-segment: [compile]
> [INFO] --------------------------------------------------------------
> ----------
> ---
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] No sources to compile
> [INFO] [ants:native2ascii {execution: default}]
> 
> native2ascii:
>    [delete] Deleting 2 files from E:\standino\tools\maven-ant-
> plugin\test-proje t\target\classes [native2ascii] Converting 2 files 
> from E:\standino\tools\maven-ant-plugin\test-
>  roject\src\main\resources to E:\standino\tools\maven-ant-
> plugin\test-project\ta get\classes [INFO] ---------------------------
> --------------------------------------------- [ERROR] BUILD ERROR 
> [INFO] --------------------------------------------------------------
> ---------- [INFO] Failed to execute: Executing Ant script: 
> /native2ascii.build.xml [native ascii]: Failed to execute.
> 
> sun/tools/native2ascii/Main
> [INFO] --------------------------------------------------------------
> ---------- [INFO] Trace 
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to 
> execute: Exec ting Ant script: /native2ascii.build.xml 
> [native2ascii]: Failed to execute.        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Def
> ultLifecycleExecutor.java:559)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithL
> fecycle(DefaultLifecycleExecutor.java:475)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defa
> ltLifecycleExecutor.java:454)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHa
> dleFailures(DefaultLifecycleExecutor.java:306)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegme
> ts(DefaultLifecycleExecutor.java:273)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultL
> fecycleExecutor.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(DelegatingMethodAcce
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         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)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to 
> execute: E ecuting Ant script: /native2ascii.build.xml 
> [native2ascii]: Failed to execute.        at
org.apache.maven.script.ant.AntMojoWrapper.execute(AntMojoWrapper.ja
> a:37)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlug
> nManager.java:412)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Def
> ultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: 
> org.codehaus.plexus.component.factory.ant.AntComponentExecutionExcep
> ion: Executing Ant script: /native2ascii.build.xml [native2ascii]: 
> Failed to ex cute.        at
org.codehaus.plexus.component.factory.ant.AntScriptInvoker.invoke(An
> ScriptInvoker.java:227)
>         at 
> org.apache.maven.script.ant.AntMojoWrapper.execute(AntMojoWrapper.ja
> a:33)
>         ... 18 more
> Caused by: java.lang.NoClassDefFoundError: 
> sun/tools/native2ascii/Main        at 
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1225) 
>        at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1185)        
> at org.codehaus.plexus.component.factory.ant.AntScriptInvoker.invoke(An
> ScriptInvoker.java:222)
>         ... 19 more
> Caused by: java.lang.NoClassDefFoundError: 
> sun/tools/native2ascii/Main        at
org.apache.tools.ant.taskdefs.optional.Native2Ascii.convert(Native2A
> cii.java:248)
>         at 
> org.apache.tools.ant.taskdefs.optional.Native2Ascii.execute(Native2A
> cii.java:196)
>         at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) 
>        at org.apache.tools.ant.Task.perform(Task.java:364)        at 
> org.apache.tools.ant.Target.execute(Target.java:341)        at 
> org.apache.tools.ant.Target.performTasks(Target.java:369)        at 
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) 
>        ... 21 more [INFO] -------------------------------------------
> ----------------------------- [INFO] Total time: 3 seconds
> [INFO] Finished at: Fri May 26 11:04:18 GMT+08:00 2006 [INFO] Final 
> Memory: 3M/6M [INFO] ------------------------------------------------
> ------------------------
> 
> Jakub Pawlowicz <[EMAIL PROTECTED]> wrote: Hi,
> 
> One way to process your properties files with native2ascii is to add 
> Ant's native2ascii goal to the Maven's compilation phase. Here you 
> could find how to do it (unfortunately only the version cached by 
> Google works): 
>
http://216.239.59.104/search?q=cache:kJFwr1QUsy4J:www.jroller.com/page/wakaleo%3Fentry%3Dmaven_2_tip_using_tools+maven+native2ascii&hl=pl&gl=pl&ct=clnk&cd=7&client=firefox-a
> 
> I've described this solution, and proposed a "not reduntant" one on 
> my blog:
http://www.jakubpawlowicz.com/blog/2006/03/19/maven_native2ascii_plugin/
> 
> Please feel free to send any comments about it.
> 
> Hope this helps you a bit.
> Regards,
> Jakub
> 
> On Thu, 25 May 2006 17:24:43 +0800, chang wei wrote
> > Thanks, shen kai.
> > 
> > I have tried maven-resources-plugin, but nothing happened.
> > 
> > I create a web project with mvn. And the project's structure looks 
> > like the following:
> > 
> > my-app
> > |-- pom.xml
> > `-- src
> >     |-- main
> >       |   |-- webapp
> >     |   |   `-- WEB-INFO
> >     |   `-- resources
> >     |       `-- META-INF
> >     |           |-- application.properties
> >     |           `-- application_zh_CN.properties
> > 
> > If I run mvn war:war$B!$(Bthe application_zh_CN.properties will be 
> > packaged into my-app.war. However, Chinese words are in the 
> > application_zh_CN.properties file, and  can not be displayed 
> > correctly before be natvie2ascii.
> > 
> > I want when I run mvn war:war, the maven natives the
> > application_zh_CN.properties file first, then package it into war.
> > 
> > Is there any way to do that?  Please advise, Thanks.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> łŁÁŞĎľ
>  __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to