|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
maven hpi plugin version 1.45Hi guys,
I was using hpi-plugin version 1.37, and it was working well. And no, for no special reason, I guess only for "evolution" and be cool, I tried to use the latest versions 1.45. I had the following error using the command "clean package hpi:run" in eclipse : [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Zerobase Hudson Starteam Plugin [INFO] task-segment: [clean, package, hpi:run] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 5 resources [INFO] [hpi:apt-compile {execution: default-apt-compile}] [INFO] Compiling 11 source files to C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\classes Note: Generating hudson\plugins\starteam\StarTeamSCM.stapler Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. [INFO] [hpi:insert-test {execution: default-insert-test}] [INFO] [resources:testResources {execution: default-testResources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\src\test\resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Compiling 5 source files to C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\test-classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[10,33] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[10,38] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[10,46] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[10,52] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[10,59] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[10,75] ';' expected C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[11,49] ';' expected C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[12,41] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[12,46] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[12,54] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[12,60] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[12,67] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[12,89] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[12,98] ';' expected C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[13,45] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[13,50] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[13,58] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[13,64] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[13,71] illegal escape character C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[13,107] ';' expected C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected Test.java:[14,81] ';' expected [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 9 seconds [INFO] Finished at: Thu Oct 15 09:50:13 EDT 2009 [INFO] Final Memory: 27M/49M [INFO] ------------------------------------------------------------------------ I've checked the InjectedTest.java file, and the URL seems to be "funny" because of the single backslashes. Take a look: import java.util.*; /** * Entry point to auto-generated tests (generated by maven-hpi-plugin). * If this fails to compile, you are probably using Hudson < 1.326. If so, disable * this code generation by configuring maven-hpi-plugin to <disabledTestInjection>false</disabledTestInjection>. */ public class InjectedTest extends junit.framework.TestCase { public static junit.framework.Test suite() throws Exception { Map parameters = new HashMap(); parameters.put("basedir","C:\work\Toolbox\Tools\Hudson\StarTeamPlugin") parameters.put("artifactId","ztarteamplugin") parameters.put("outputDirectory","C:\work\Toolbox\Tools\Hudson\StarTeamP lugin\target\classes") parameters.put("testOutputDirectory","C:\work\Toolbox\Tools\Hudson\StarT eamPlugin\target\test-classes") return new org.jvnet.hudson.test.PluginAutomaticTestBuilder.build(parameters) } } It this a known bug? Jean-Francois Croteau |
|
|
Re: maven hpi plugin version 1.45Hi
You need to escape your windows paths with back slashes in java that is c:\\myfolder\\a and not c:\myfolder\a On 15/10/2009, Croteau, Jean-Francois <j.croteau@...> wrote: > Hi guys, > > I was using hpi-plugin version 1.37, and it was working well. And no, > for no special reason, I guess only for "evolution" and be cool, I tried > to use the latest versions 1.45. I had the following error using the > command "clean package hpi:run" in eclipse : > > > > [INFO] Scanning for projects... > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Building Zerobase Hudson Starteam Plugin > > [INFO] task-segment: [clean, package, hpi:run] > > [INFO] > ------------------------------------------------------------------------ > > [INFO] [clean:clean {execution: default-clean}] > > [INFO] Deleting directory > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target > > [INFO] [resources:resources {execution: default-resources}] > > [WARNING] Using platform encoding (Cp1252 actually) to copy filtered > resources, i.e. build is platform dependent! > > [INFO] Copying 5 resources > > [INFO] [hpi:apt-compile {execution: default-apt-compile}] > > [INFO] Compiling 11 source files to > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\classes > > Note: Generating hudson\plugins\starteam\StarTeamSCM.stapler > > Note: Some input files use or override a deprecated API. > > Note: Recompile with -Xlint:deprecation for details. > > [INFO] [hpi:insert-test {execution: default-insert-test}] > > [INFO] [resources:testResources {execution: default-testResources}] > > [WARNING] Using platform encoding (Cp1252 actually) to copy filtered > resources, i.e. build is platform dependent! > > [INFO] skip non existing resourceDirectory > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\src\test\resources > > [INFO] [compiler:testCompile {execution: default-testCompile}] > > [INFO] Compiling 5 source files to > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\test-classes > > [INFO] > ------------------------------------------------------------------------ > > [ERROR] BUILD FAILURE > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Compilation failure > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[10,33] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[10,38] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[10,46] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[10,52] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[10,59] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[10,75] ';' expected > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[11,49] ';' expected > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[12,41] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[12,46] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[12,54] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[12,60] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[12,67] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[12,89] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[12,98] ';' expected > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[13,45] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[13,50] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[13,58] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[13,64] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[13,71] illegal escape character > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[13,107] ';' expected > > > > C:\work\Toolbox\Tools\Hudson\StarTeamPlugin\target\inject-tests\Injected > Test.java:[14,81] ';' expected > > > > > > [INFO] > ------------------------------------------------------------------------ > > [INFO] For more information, run Maven with the -e switch > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Total time: 9 seconds > > [INFO] Finished at: Thu Oct 15 09:50:13 EDT 2009 > > [INFO] Final Memory: 27M/49M > > [INFO] > ------------------------------------------------------------------------ > > > > I've checked the InjectedTest.java file, and the URL seems to be "funny" > because of the single backslashes. Take a look: > > > > import java.util.*; > > /** > > * Entry point to auto-generated tests (generated by maven-hpi-plugin). > > * If this fails to compile, you are probably using Hudson < 1.326. > If so, disable > > * this code generation by configuring maven-hpi-plugin to > <disabledTestInjection>false</disabledTestInjection>. > > */ > > public class InjectedTest extends junit.framework.TestCase { > > public static junit.framework.Test suite() throws Exception { > > Map parameters = new HashMap(); > > > parameters.put("basedir","C:\work\Toolbox\Tools\Hudson\StarTeamPlugin") > > parameters.put("artifactId","ztarteamplugin") > > > parameters.put("outputDirectory","C:\work\Toolbox\Tools\Hudson\StarTeamP > lugin\target\classes") > > > parameters.put("testOutputDirectory","C:\work\Toolbox\Tools\Hudson\StarT > eamPlugin\target\test-classes") > > return new > org.jvnet.hudson.test.PluginAutomaticTestBuilder.build(parameters) > > } > > } > > > > It this a known bug? > > > > Jean-Francois Croteau > > > > -- Sent from my mobile device --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: maven hpi plugin version 1.45Hi,
I am having the exact same problem, having just upgraded my plugin to 1.327. However, because the file with the illegal escape characters is being auto generated, I cannot escape them. The (temporary) solution was to add the following configuration to my POM.xml: <build> <plugins> <plugin> <groupId>org.jvnet.hudson.tools</groupId> <artifactId>maven-hpi-plugin</artifactId> <extensions>true</extensions> <configuration> <disabledTestInjection>true</disabledTestInjection> </configuration> </plugin> </plugins> </build> Note: this is the opposite of the advice in the javadoc comment at the top of the generated java file. Regs, Andrew
|
|
|
Re: maven hpi plugin version 1.45Andrew Harmel-Law wrote:
> I am having the exact same problem, having just upgraded my plugin to 1.327. > However, because the file with the illegal escape characters is being auto > generated, I cannot escape them. As far as I understand, the file is generated by the maven-hpi-plugin, so the issue seems outside of the scope of this list and should better be reported to the maintainer of this plugin. Benjamin --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
| Free embeddable forum powered by Nabble | Forum Help |