Comments (8)
I am having the same problem on a Ubuntu 14.04 machine. ( I suspect it is fairly universal ).
As a workaround, you could set the desired Maven Version in site.pp
- Caution: This will likely effect maven installations in your entire environment! *
in site.pp....
$maven_version = '3.2.5'
from puppet-maven.
Hi there, it turns out this stopped the error but doesn't really work effectively anymore. The variable is used to avoid an additional unnecessary download. Not sure how that would be fixed but
$maven_version = undef
allowed the code to run and execute the download
from puppet-maven.
Argh.. As it turns out, this works Once.
After that you receive an error that it cannot be re-assigned.
I'll do some searching to see where this variable is set (maybe in facter?).
Hopefully, this gets you through this for now.
from puppet-maven.
OK.. Played around for a while.
I've found a fix that seems to work well for now and could be migrated to the module itself...
in site.pp...
`
if !getvar('::maven_version')
$maven_version = undef
}
`
The problem seems to arise from maven_version coming from facts. If the fact exists, the variable is available. If the fact does not yet exist, the variable won't exist.
A likely better alternative might be to adjust maven.pp to check for the fact instead of the global variable (as per the above command) but I'm too new to puppet to know if this is a viable option.
from puppet-maven.
Yes, the strict_variable parameter controls whether use uninitialized variable in puppet, Googled around, there is no elegant solution. I had issue withe getvar also, guess different version of puppet may behave differently, it may also depends on whether you use future_parser.
from puppet-maven.
Are we the only ones have the issues? Look at the puppet forge, this module is the most popular maven one, wondering what others experienced.
from puppet-maven.
I have seen this type of thing with a few modules now.
Although I am relatively new to puppet, from what I can see is that the problem is related to "strict variables" as a new approach and defining the scope of a variable properly when accessed. This seems to become more important when referencing facts.
I often see errors as well as it relates to $schedule when trying new modules. I hope that helps.
I have learned to start being careful about using :: when needed to reference higher level variables when needed. Could it simply be related to variable scope?
Sorry I can't help more.. maybe this weekend I might do a fork and play around a bit to see if I can figure it out.
from puppet-maven.
I have created a pull request that should ensure module's compliance with strict_variables=true. I had same trouble with Puppet 3.5.0 and Puppet 3.6.0, but now the change passes all tests.
from puppet-maven.
Related Issues (20)
- Bug: Re-downloads maven after each restart HOT 2
- Noob Setup: No errors, but settings.xml not created HOT 1
- Use of deprecated function Puppet::Util::SUIDManager.run_and_capture HOT 1
- Tempfile permissions are not the same as the user,group specified HOT 5
- Make maven's conf settings.xml manageable HOT 3
- Add compatibility with PE 2.x HOT 1
- Support Mac HOT 3
- "which: no javac in (/sbin:/bin:/usr/sbin:/usr/bin)" appears in puppet output during apply HOT 5
- Add provider to run mvn commands
- Java class required HOT 3
- Documentation for setting the 'profiles' element via maven::settings class HOT 3
- Fedora support ?
- Request transitive dependencies
- Add support for configure destination directory of Maven
- Support for settings-security.xml file.
- Please release 1.4.1 HOT 1
- Windows compatibility HOT 1
- Error: mvn returned 1: Is Maven installed? HOT 3
- title patterns that use procs are not supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-maven.