因为缺少Java_launcher,java.lang.NoClassDefFoundError:运行bash文件构建项目时org / codehaus / plexus / classworlds ...

hi guys

i have maven 2 installed, when i use mvn clean or mvn install in the app root it works fine

but when trying to use maven install inside a bash script i got the above exception:

this is my script:

#!/bin/sh

#dirname='/home/myuser/workspace/myapp'

DIRECTORY=$(cd `dirname $0` && pwd)

cd $DIRECTORY

mvn install -s resources/settings.xml $1

it was working fine with maven 3, but after i installed maven 2 and configured it, it stopped working and gave me above exception, i don't know what is the problem, since the regular build, mvn install works, but building from the script doesn't work, any ideas ?

解决方案

Couple of possibilities...

One, as posted here, you have both M2_REPO and M3_REPO variables defined.

Or you are facing this issue related to maven3 and M2_HOME

The other is that somehow the JRE is getting used instead of JDK when run from the batch file!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值