[prev in list] [next in list] [prev in thread] [next in thread]
List: groovy-dev
Subject: [groovy-dev] Re: [GMaven] Unable to find class at compile
From: Joćo_Paulo_Mafra <jpmneofito () gmail ! com>
Date: 2009-01-22 12:03:25
Message-ID: ca52ed800901220403r32007928pe4189b8ad6c34428 () mail ! gmail ! com
[Download RAW message or body]
Hi,
I was using an incorrect HtmlUnit jar in my project. Sorry.
It was a very embaracing mistake :'(
Joao Paulo
2009/1/21 Joćo Paulo Mafra <jpmneofito@gmail.com>
> Hi all,
>
> First, sorry for sendind to this list, I get an error while trying to
> subscribe to "user@groovy.codehaus.org".
>
> About my problem, I have a gmaven project, only with groovy sources, and
> dependencies with HtmlUnit. HtmlUnit and all its dependencies are in my
> local repo, but when I run "mvn compile" it gives me an error, like below:
>
>
> =============================================================================
>
> =============================================================================
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Example Project
> [INFO]
> [INFO] Id: com.mafra:EasyHtmlUnit:jar:0.1
> [INFO] task-segment: [test]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] No sources to compile
> [INFO] [groovy:compile]
> [ERROR]
>
> The following mojo encountered an error while executing:
> Group-Id: org.codehaus.groovy.maven
> Artifact-Id: gmaven-plugin
> Version: 1.0-rc-4
> Mojo: compile
> brought in via: POM
>
> While building project:
> Group-Id: com.mafra
> Artifact-Id: EasyHtmlUnit
> Version: 0.1
> From file: F:\Projetos\EasyHtmlUnit\pom.xml
> Reason: startup failed,
> /F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy:
> 11: unable to resolve class WebClient
> @ line 11, column 2.
> WebClient client
> ^
> /F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy:
> 11: unable to resolve class WebClient
> @ line 11, column 2.
> WebClient client
> ^
> /F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy:
> 16: unable to resolve class WebClient
> @ line 16, column 10.
> page = client.getPage(endereco)
> ^
> /F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy:
> 19: unable to resolve class WebClient
> @ line 19, column 3.
> client.alertHandler = new CollectingAlertHandler(alerts)
> ^
> /F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy:
> 19: unable to resolve class CollectingAlertHandler
> @ line 19, column 25.
> client.alertHandler = new CollectingAlertHandler(alerts)
> ^
> /F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy:
> 40: unable to resolve class WebClient
> @ line 40, column 3.
> client.closeAllWindows()
> ^
> /F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy:
> 41: unable to resolve class WebClient
> @ line 41, column 3.
> client = null
> ^
>
> 7 errors
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run with the -e flag
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILED
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Wed Jan 21 17:56:06 BRST 2009
> [INFO] Final Memory: 3M/18M
> [INFO]
> ------------------------------------------------------------------------
>
> =============================================================================
>
> =============================================================================
>
>
> Class "WebClient" should be in HtmlUnit's jars, but gmaven doesn't find it.
> I'm using m2eclipse eclipse plugin, and it shows all HtmlUnit required jar's
> in section "Maven Dependencies" of my project. Below is my project's
> pom.xml:
>
>
>
> =============================================================================
>
> =============================================================================
> <?xml version="1.0" encoding="UTF-8"?>
>
> <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.mafra</groupId>
> <artifactId>EasyHtmlUnit</artifactId>
> <name>Example Project</name>
> <version>0.1</version>
>
> <dependencies>
> <dependency>
> <groupId>org.codehaus.groovy.maven.runtime</groupId>
> <artifactId>gmaven-runtime-1.5</artifactId>
> <version>1.0-rc-4</version>
> </dependency>
>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <scope>test</scope>
> </dependency>
>
> <dependency>
> <groupId>net.sourceforge.htmlunit</groupId>
> <artifactId>htmlunit</artifactId>
> <version>2.3</version>
> </dependency>
> </dependencies>
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.groovy.maven</groupId>
> <artifactId>gmaven-plugin</artifactId>
> <version>1.0-rc-4</version>
> <executions>
> <execution>
> <goals>
> <goal>compile</goal>
> <goal>testCompile</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
>
> </project>
>
> =============================================================================
>
> =============================================================================
>
>
> Thanks,
>
>
> Joao Paulo
>
>
[Attachment #3 (text/html)]
Hi,<br><br>I was using an incorrect HtmlUnit jar in my project. Sorry.<br><br>It was \
a very embaracing mistake :'(<br><br><br>Joao Paulo<br><br><br><br><div \
class="gmail_quote">2009/1/21 Joćo Paulo Mafra <span dir="ltr"><<a \
href="mailto:jpmneofito@gmail.com">jpmneofito@gmail.com</a>></span><br> \
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br><br>First, sorry for \
sendind to this list, I get an error while trying to subscribe to "<a \
href="mailto:user@groovy.codehaus.org" \
target="_blank">user@groovy.codehaus.org</a>".<br> <br>About my problem, I have \
a gmaven project, only with groovy sources, and dependencies with HtmlUnit. HtmlUnit \
and all its dependencies are in my local repo, but when I run "mvn compile" \
it gives me an error, like below:<br>
<br>=============================================================================<br>= \
============================================================================<br>[INFO] \
Scanning for projects...<br>[INFO] \
------------------------------------------------------------------------<br>
[INFO] Building Example Project<br>[INFO] <br>[INFO] Id: \
com.mafra:EasyHtmlUnit:jar:0.1<br>[INFO] task-segment: [test]<br>[INFO] \
------------------------------------------------------------------------<br>[INFO] \
[resources:resources]<br>
[INFO] Using default encoding to copy filtered resources.<br>[INFO] \
[compiler:compile]<br>[INFO] No sources to compile<br>[INFO] \
[groovy:compile]<br>[ERROR] <br><br>The following mojo encountered an error while \
executing:<br>
Group-Id: org.codehaus.groovy.maven<br>Artifact-Id: gmaven-plugin<br>Version: \
1.0-rc-4<br>Mojo: compile<br>brought in via: POM<br><br>While building \
project:<br>Group-Id: com.mafra<br>Artifact-Id: EasyHtmlUnit<br>Version: 0.1<br>
From file: F:\Projetos\EasyHtmlUnit\pom.xml<br>Reason: startup failed, \
/F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy: 11: \
unable to resolve class WebClient <br> @ line 11, column 2.<br> \
WebClient client<br>
^<br>/F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy: \
11: unable to resolve class WebClient <br> @ line 11, column 2.<br> \
WebClient client<br> \
^<br>/F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy: \
16: unable to resolve class WebClient <br>
@ line 16, column 10.<br> \
page = client.getPage(endereco)<br> \
^<br>/F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy: \
19: unable to resolve class WebClient <br> @ line 19, column 3.<br>
client.alertHandler = new \
CollectingAlertHandler(alerts)<br> \
^<br>/F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy: \
19: unable to resolve class CollectingAlertHandler <br> @ line 19, column \
25.<br>
client.alertHandler = new \
CollectingAlertHandler(alerts)<br> &nbs \
p; \
^<br>/F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy: \
40: unable to resolve class WebClient <br>
@ line 40, column 3.<br> \
client.closeAllWindows()<br> \
^<br>/F:/Projetos/EasyHtmlUnit/src/main/groovy/com/mafra/easyHtmlUnit/Browser.groovy: \
41: unable to resolve class WebClient <br> @ line 41, column 3.<br>
client = \
null<br> ^<br><br>7 errors<br><br>[INFO] \
------------------------------------------------------------------------<br>[INFO] \
For more information, run with the -e flag<br>[INFO] \
------------------------------------------------------------------------<br>
[INFO] BUILD FAILED<br>[INFO] \
------------------------------------------------------------------------<br>[INFO] \
Total time: 2 seconds<br>[INFO] Finished at: Wed Jan 21 17:56:06 BRST 2009<br>[INFO] \
Final Memory: 3M/18M<br>
[INFO] ------------------------------------------------------------------------<br>=============================================================================<br>
=============================================================================<br><br><br>Class \
"WebClient" should be in HtmlUnit's jars, but gmaven doesn't find \
it. I'm using m2eclipse eclipse plugin, and it shows all HtmlUnit required \
jar's in section "Maven Dependencies" of my project. Below is my \
project's pom.xml:<br>
<br><br>=============================================================================<br>
=============================================================================<br><?xml \
version="1.0" encoding="UTF-8"?><br><br><project \
xmlns="<a href="http://maven.apache.org/POM/4.0.0" \
target="_blank">http://maven.apache.org/POM/4.0.0</a>"<br>
xmlns:xsi="<a \
href="http://www.w3.org/2001/XMLSchema-instance" \
target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"<br> \
xsi:schemaLocation="<a href="http://maven.apache.org/POM/4.0.0" \
target="_blank">http://maven.apache.org/POM/4.0.0</a> <a \
href="http://maven.apache.org/maven-v4_0_0.xsd" \
target="_blank">http://maven.apache.org/maven-v4_0_0.xsd</a>"><br>
<br> \
<modelVersion>4.0.0</modelVersion><br> \
<br> <groupId>com.mafra</groupId><br> \
<artifactId>EasyHtmlUnit</artifactId><br> \
<name>Example Project</name><br>
<version>0.1</version><br> \
<br> <dependencies><br> \
<dependency><br> \
<groupId>org.codehaus.groovy.maven.runtime</groupId><br> \
\
<artifactId>gmaven-runtime-1.5</artifactId><br>
\
<version>1.0-rc-4</version><br> \
</dependency><br> <br> \
<dependency><br> \
<groupId>junit</groupId><br> \
<artifactId>junit</artifactId><br>
\
<version>3.8.1</version><br> \
<scope>test</scope><br> \
</dependency><br> \
<br> <dependency><br> \
\
<groupId>net.sourceforge.htmlunit</groupId><br>
\
<artifactId>htmlunit</artifactId><br> \
\
<version>2.3</version><br> \
</dependency><br> </dependencies><br> \
<br> <build><br> \
<plugins><br>
\
<plugin><br> \
<groupId>org.codehaus.groovy.maven</groupId><br> \
\
<artifactId>gmaven-plugin</artifactId><br> \
\
<version>1.0-rc-4</version><br>
\
<executions><br> \
<execution><br> \
\
<goals><br> \
\
<goal>compile</goal><br> \
\
<goal>testCompile</goal><br>
\
</goals><br> \
\
</execution><br> \
</executions><br> \
</plugin><br> \
</plugins><br> </build><br><br></project><br>
=============================================================================<br>
=============================================================================<br><br><br>Thanks,<br><br><br>Joao \
Paulo<br><br> </blockquote></div><br>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic