Skip to content
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 preload sources from directory outside project #248

Closed
misinco opened this issue Jun 24, 2014 · 2 comments
Closed

Cannot preload sources from directory outside project #248

misinco opened this issue Jun 24, 2014 · 2 comments

Comments

@misinco
Copy link

misinco commented Jun 24, 2014

In our configuration, our angular sources are stored in a directory outside the project directory that I'm trying to test.

Example:
/prj1
- pom.xml
- src/main/javascript
- src/test/javascript
/angular
- angular.js
- other angular files

So in the prj1 pom.xml file, I have tried several different maven properties to preload the angular sources:


${basedir}/../angular/angular.js


Pretty much any maven property I try to use in order to get a directory within prj1 and navigate to a relative path, translates in the ManualSpecRunner.html file to:

src="/../angular/angular.js"

Given the path starts with /, the location is incorrect. Is there a way to reference/load sources in directories outside the project that is under test?

@kermit-the-frog
Copy link

The bug still seems to exist
<source>${project.basedir}/../externalresources/src/main/resources/com/jquery/js/jquery-3.4.1.min.js</source>
is converted to
<script type="application/javascript" src="/../externalresources/src/main/resources/com/jquery/js/jquery-3.4.1.min.js"></script>

@kermit-the-frog
Copy link

I've found a solution:

<additionalContexts>
    <context>
        <contextRoot>externalresources</contextRoot>
        <directory>${project.basedir}/../externalresources/src/main/resources/</directory>
    </context>
</additionalContexts>
<preloadSources>
    <source>externalresources/com/jquery/js/jquery-3.4.1.min.js</source>
</preloadSources>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants