add an include pattern. Default maven filters out java files.

Martijn

On Sun, Nov 7, 2010 at 11:26 AM, James Ring <s...@jdns.org> wrote:
> (Please CC me on replies, I am not subscribed to this list)
>
> Hi there,
>
> I have a GWT project which programatically starts a DevMode shell. The
> problem I have is that GWT needs access to the Java source code in the
> classpath at runtime. I have tried adding my src/main/java directory
> to the resources list (in the following snippet), but this doesn't
> seem to have the desired effect.
>
> <build>
>  <resources>
>    <resource>
>      <directory>src/main/java</directory>
>    </resource>
>  </resources>
>  ...
> </build>
>
> Basically the following code should not throw an exception when run as
> an Eclipse JUnit test.
>
> classLoader.getResource("com/mycompany/mypackage/client/MainPage.java")
>
> The test passes when running mvn test, but when running it inside an
> Eclipse project generated with "mvn eclipse:eclipse", it fails
> (resource not found). As a workaround I just add the src/main/java
> directory to the runtime classpath and then GWT is happy and I'm
> happy. :)
>
> $ mvn -version
> Apache Maven 2.2.1 (r801777; 2009-08-07 05:16:01+1000)
> Java version: 1.6.0_22
> Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"
>
> Using org.apache.maven.plugins:maven-eclipse-plugin:2.7.
>
> Thanks for your help!
>
> Regards,
> James
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to