New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start up fitnesse using maven exec plugin #880

Closed
haroon-sheikh opened this Issue Feb 25, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@haroon-sheikh

haroon-sheikh commented Feb 25, 2016

Below is the error I get when I attempt to run fitnesse using maven exec plugin instead of ant exec plugin described here http://blog.xebia.com/fitnesse-and-dependency-management-with-maven/#comment-1094331

[INFO] --- exec-maven-plugin:1.4.0:java (default) @ fitnesse ---
Feb 25, 2016 7:40:44 PM fitnesse.plugins.PropertyBasedPluginFeatureFactory$2 register
INFO: Loaded SymbolType fitnesse.wikitext.widgets.MavenClasspathSymbolType
Bootstrapping FitNesse, the fully integrated standalone wiki and acceptance testing framework.
Feb 25, 2016 7:40:44 PM fitnesseMain.FitNesseMain logStartupInfo
INFO: root page: fitnesse.wiki.fs.FileSystemPage at ./FitNesse/DevelopmentTestRoot#latest
Feb 25, 2016 7:40:44 PM fitnesseMain.FitNesseMain logStartupInfo
INFO: logger: none
Feb 25, 2016 7:40:44 PM fitnesseMain.FitNesseMain logStartupInfo
INFO: authenticator: fitnesse.authentication.PromiscuousAuthenticator
Feb 25, 2016 7:40:44 PM fitnesseMain.FitNesseMain logStartupInfo
INFO: page factory: fitnesse.html.template.PageFactory
Feb 25, 2016 7:40:44 PM fitnesseMain.FitNesseMain logStartupInfo
INFO: page theme: bootstrap
Feb 25, 2016 7:40:44 PM fitnesseMain.FitNesseMain logStartupInfo
INFO: Starting FitNesse on port: 8082
java.io.FileNotFoundException: Could not load resource: Resources/updateList
    at fitnesse.updates.FileUpdate.copyResource(FileUpdate.java:54)
    at fitnesse.updates.FileUpdate.doUpdate(FileUpdate.java:28)
    at fitnesse.updates.UpdaterImplementation.getUpdateFilesFromJarFile(UpdaterImplementation.java:74)
    at fitnesse.updates.UpdaterImplementation.createUpdateAndDoNotCopyOverLists(UpdaterImplementation.java:65)
    at fitnesse.updates.UpdaterImplementation.<init>(UpdaterImplementation.java:22)
    at fitnesseMain.FitNesseMain.update(FitNesseMain.java:80)
    at fitnesseMain.FitNesseMain.launchFitNesse(FitNesseMain.java:69)
    at fitnesseMain.FitNesseMain.launchFitNesse(FitNesseMain.java:54)
    at fitnesseMain.FitNesseMain.main(FitNesseMain.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:745)

And that's how my maven configuration looks like

<plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.4.0</version>
          <executions>
          <execution>
            <phase>test</phase>  
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
          <configuration>
            <mainClass>fitnesseMain.FitNesseMain</mainClass>
            <arguments>
              <argument>-r</argument>
              <argument>${fitnesse.root}</argument>
              <argument>-p</argument>
              <argument>${port}</argument>
            </arguments>
          </configuration>
        </plugin>
      </plugins>

Can someone please advise?

@amolenaar amolenaar added this to the Next release milestone Mar 7, 2016

@amolenaar amolenaar closed this in 058c486 Mar 7, 2016

@amolenaar

This comment has been minimized.

Show comment
Hide comment
@amolenaar

amolenaar Mar 7, 2016

Collaborator

Thanks for reporting!

Found it: The files are looked up by calling ClassLoader.getSystemResource(resource). Maven is probably loading it in another class loader (and rightly so).

I'll change that line to use the same class loader that's used to load the FileUpdate class.

You can obtain an edge build or use the -o flag until the next release.

Collaborator

amolenaar commented Mar 7, 2016

Thanks for reporting!

Found it: The files are looked up by calling ClassLoader.getSystemResource(resource). Maven is probably loading it in another class loader (and rightly so).

I'll change that line to use the same class loader that's used to load the FileUpdate class.

You can obtain an edge build or use the -o flag until the next release.

@haroon-sheikh

This comment has been minimized.

Show comment
Hide comment
@haroon-sheikh

haroon-sheikh Mar 9, 2016

Thanks @amolenaar for looking into this. I'll use the -o for now as suggested.

haroon-sheikh commented Mar 9, 2016

Thanks @amolenaar for looking into this. I'll use the -o for now as suggested.

@micw

This comment has been minimized.

Show comment
Hide comment
@micw

micw Sep 10, 2018

Same issue still exists in fitnesse.updates.WikiContentUpdater.parseResource(String)

micw commented Sep 10, 2018

Same issue still exists in fitnesse.updates.WikiContentUpdater.parseResource(String)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment