Maven Path Variable Issue - maven

I am having issues running mvn --version anywhere outside of C:\Program Files\Apache Software Foundation\apache-maven-3.2.1\bin. If I run mvn --version inside the apache-maven/bin folder I get the version number, however if I run it anywhere outside it says will not recognize mvn.
Am I missing something in my path variables?
My System Variables:
M2 = %M2_HOME%\bin
M2_HOME = C:\Program Files\Apache Software Foundation\apache-maven-3.2.1
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_51
I appended
Path = ; %M2%
My User Variables:
M2 = %M2_HOME%\bin
M2_HOME = C:\Program Files\Apache Software Foundation\apache-maven-3.2.1
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_51
Thanks

You have to define variables before you use them. Change the order of the first two lines in your first example, and set PATH, not Path.

Related

Automake/Autoconf scripts custom directory

My project's root folder is PROJECT, and there is only one script in PROJECT/scripts/abc.sh, which I want to install it into the directory /usr/share/xxx/abc.sh.
Because it is not install into /usr/bin/abc.sh, so bin_SCRIPTS = abc.sh is incorrect.
Could you please tell me how to write the Makefile.am?
You'll need to define the install directory:
xxxdir = $(datarootdir)/xxx
xxx_SCRIPTS = scripts/abc.sh
More typically as something like:
pkgdata_SCRIPTS = scripts/abc.sh
where automake has already setup pkgdatadir.

Error when Installing pentaho data integration

I'm trying to install pentaho data integration and I have a problem with the configuration of spoon.bat. I updated the file with adding PENTAHO_JAVA= javaw.exe, also edited the environment variables (Computer > Properties > Advanced > Environment Variables by adding ";C:\Program Files\Java\jre7\bin" on the end of the variable PATH.
but when I start the file, it doesn't work.
I have this error
DEBUG: Using JAVA_HOME
and Windows can't find the path
JAVA_HOME should be pointed to a jdk. JRE_HOME should point to jre.
JAVA_HOME = C:\Program Files\Java\jdk\bin
JRE_HOME = C:\Program Files\Java\jre7\bin
PENTAHO_JAVA = 'C:\Pentaho\Java'
Change the paths accordingly and try.

mvn' is not recognized as an internal or external command

I have created these variables with their respective values, but even after doing this, command prompt is not recognizing mvn command
System Variables:
name: M2_HOME
value: C:\Program Files\apache-maven-3.2.1
name: M2
value: %M2_HOME%/bin;
name: path
value: %JAVA_HOME%\bin; %M2_HOME%\bin;
From Maven documentation page:
Maven, like many cross-platform tools, can encounter problems when
there are space characters in important pathnames. The instructions
below will remind you of this for several particular items.
You have Maven installed in C:\Program Files\apache-maven-3.2.1
Try to reinstall it to, for example, C:\maven, or change your current variable M2_HOME to C:\PROGRA~1\apache-maven-3.2.1
I had the same issue.
What I did to resolve this is creating M2_HOME & MAVEN_HOME.
Also, edit Path variable value.
New ->C:\Program Files\Apache Software Foundation\apache-maven-3.6.0\bin
where Apache Software Foundation is a folder I created to extract the apache-maven-3.6.0-bin.zip file.
Also, make sure Java is working fine and JAVA_HOME is properly set.
try :
to restart the command prompt
to start the command prompt with run/cmd instead of shift+right-click -"open command window here"
to put the system path between double quote to manage espace character
to replace C:\Program Files\ per C:\PROGRA~1\
edit
this is my own config :
MAVEN_HOME="C:\Program Files\apache-maven-3.2.1"
PATH=XXX;%MAVEN_HOME%\bin;XXX
Hello I had the same problem and I figured it out that I was including some space characters on the "path" next to the ; just by removing the space character I was able to have everything working properly"
this is the settings for my maven.
name: MVN_HOME
value: C:\Program Files\apache-maven-3.2.1
name: path -> add the following value(just the maven part)
value: %JAVA_HOME%\bin;%MVN_HOME%\bin; -> this should have no spaces
I have a very difficult time to solve this problem. It did not work no matter how I set up the environment variables in the control panel of Win7.
My final solution is to set the variables via the cmd.
set M2_HOME "D:\Program Files\Maven\apache-maven-3.3.3"
set M2=%M2_HOME%\bin
set path=%path%;%M2%
I think you have a typo:
change
name: M2
value: %M2_HOME%/bin;
to
name: M2
value: %M2_HOME%\bin;
if it doesn't work change %M2_HOME%\bin with the path.
in this case:
C:\Program Files\apache-maven-3.2.1\bin
Make sure to set the path under the System Variables and not User Variables.
In my case, for reasons I cannot explain, it made a difference to windows 7 if the MAVEN_HOME environment variable was defined in "System Variables" vs "User Variables".
I originally had both JAVA_HOME and MAVEN_HOME as "User Variables" and "Java -version" worked but windows could not find mvn (My path variable looked like this in both cases "Path=C:\Program Files\Java\jre1.8.0_144\bin;E:\Clif\Java\apache-maven-3.6.0\bin;")
Once I changed both Environment variables from "User Variables" to "System Variables" windows was able to find mvn.
I was using %MAVEN_HOME% in the variable path and it was giving problem, even though echo %MAVEN_HOME% command was showing the right path.
I changed it to C:\Program Files\apache-maven-3.6.1\bin in the path (Depends on your version of-course) and it worked like a charm.

Why am I getting this error in my Primer3/eprimer3 Mac OSX build?

I'm getting this error on my mac osx build.
Primer3/eprimer3 issue:
Error: thermodynamic approach chosen, but path to thermodynamic parameters not specified
From:
http://www.mcardle.wisc.edu/mprime/help/primer3/primer3_manual.htm#globalTags
PRIMER_THERMODYNAMIC_PARAMETERS_PATH (string; default ./primer3_config)
This tag specifies the path to the directory that contains all the parameter files used by the thermodynamic approach. In Linux, there are two default locations that are tested if this tag is not defined: ./primer3_config/ and /opt/primer3_config/. For Windows, there is only one default location: .\primer3_config\.
I put the primer3_config in my PATH in bin and still cannot solve this issue. I even did:
export PRIMER_THERMODYNAMIC_PARAMETERS_PATH=/Users/jared/Downloads/primer3-2.3.2/src
and
export PRIMER_THERMODYNAMIC_PARAMETERS_PATH=/Users/jared/Downloads/primer3-2.3.2/src/primer3_config
to no avail.
According to the primer3 manual:
1.5. IMPORTANT: because PRIMER_THERMODYNAMIC_ALIGNMENT=1
PRIMER_THERMODYNAMIC_PARAMETERS_PATH must point to the right location.
This tag specifies the path to the directory that contains all the
parameter files used by the thermodynamic approach. In Linux, there
are two default locations that are tested if this tag is not
defined: ./primer3_config/ and /opt/primer3_config/. For Windows,
there is only one default location: .\primer3_config. If the the
parameter files are not in one these locations, be sure to set
PRIMER_THERMODYNAMIC_PARAMETERS_PATH.
So if you download and compile primer3 form source using the Make command, to get primer3 to run globally you need to copy the executueable, primer3_core, to your path and place the configuration directory, primer3_config in that same directory or at /opt/primer3_config
cd src
sudo cp primer3_core /usr/local/bin # or /usr/bin
sudo cp -r primer3_config /opt/
I has the same issue. I had installed Primer 3 using homebrew-science which was pretty painless. https://github.com/Homebrew/homebrew-science
I did try copying the primer3_config directory into the homebrew primer3 directory, ie:
/usr/local/Cellar/primer3/2.3.4/bin/primer3_config but this also did not work.
In the end I added the PRIMER_THERMODYNAMIC_PARAMETERS_PATH configuration to the primer 3 input file, and this worked. Note that the directory name must have a trailing slash. It is the last entry in the file below which is copied from the example file in the primer3 sources.
SEQUENCE_ID=example
SEQUENCE_TEMPLATE=GTAGTCAGTAGACNATGACNACTGACGATGCAGACNACACACACACACACAGCACACAGGTATTAGTGGGCCATTCGATCCCGACCCAAATCGATAGCTACGATGACG
SEQUENCE_TARGET=37,21
PRIMER_TASK=pick_detection_primers
PRIMER_PICK_LEFT_PRIMER=1
PRIMER_PICK_INTERNAL_OLIGO=1
PRIMER_PICK_RIGHT_PRIMER=1
PRIMER_OPT_SIZE=18
PRIMER_MIN_SIZE=15
PRIMER_MAX_SIZE=21
PRIMER_MAX_NS_ACCEPTED=1
PRIMER_PRODUCT_SIZE_RANGE=75-100
P3_FILE_FLAG=1
SEQUENCE_INTERNAL_EXCLUDED_REGION=37,21
PRIMER_EXPLAIN_FLAG=1
PRIMER_THERMODYNAMIC_PARAMETERS_PATH=/usr/local/Cellar/primer3/2.3.4/bin/primer3_config/
=
Then run it like this:
$ primer3_core < example2

Which Visual Studio $variable is the .exe?

Which Visual Studio (2010 (Professional (64-bit (on Windows 7 (Professional (64-bit)))))) points to the .exe name?
Some examples of variables are:
Variable Sample value
=================== =============================
$(TargetPath) C:\...\obj\Debug\Project1.exe
$(ItemPath) C:\...\Project1.csproj
$(SolutionFileName) Solution1.sln`
$(ProjectFileName) Project1.csproj
i need the executable, e.g.:
$(ExePath) C:\...\Bin\Debug\Project1.exe
Except $(ExePath) is something i just made up.
Note:
$(TargetPath) references the obj path. i need the target bin path
$(TargetPath) is the application to run eg. in the debugger
You can list all variable by go to project Properties/Build Events/ Edit Pre- or Post-build... and click on Macros >> button.
Specially for builded .exe you need $(TargetPath)
According to MSDN, it's $(TargetPath).
There is no official variable for the path to .exe in bin directory, but you can use
$(BinDir)$(TargetName)$(TargetExt)
to achieve the same effect.

Resources