我有一个在Windows环境中开发的应用程序.应用程序本身部署到Linux环境.每次部署此应用程序时,我都必须使用dos2unix将可执行文件转换为UNIX格式.我原本以为这是由Windows CP1252编码引起的,所以我更新了Maven将文件编码为UTF-8.这并没有解决我的问题,我很快发现这与回车和换行有关,可以通过搜索这个站点来解决.有没有办法让Maven在构建过程中将所有文件转换为UNIX格式?我正在使用Maven 2.2.1和Java 5.
我正在尝试使用Maven发布一个库并执行一个站点部署到sourceforge(我先创建了一个交互式shell).该版本由Jenkins工作完成(使用Jenkins的Maven Release Plugin).
我试过了:
-X -e -Dresume=false -Dusername=puce release:prepare release:perform -Darguments="-Dusername=puce"
Run Code Online (Sandbox Code Playgroud)
和
-X -e -Dresume=false -Dusername=puce -Darguments=-Dusername=puce release:prepare release:perform
Run Code Online (Sandbox Code Playgroud)
但两次工作都挂在现场:部署第一个模块:
[INFO] --- maven-site-plugin:3.2:deploy (default-deploy) @ myproject-parent ---
[INFO] Parent project loaded from repository: myGroupId:myOtherproject-parent:pom:1.0
[INFO] Parent project loaded from repository: myGroupId:myOtherproject-parent:pom:1.0
Using private key: /opt/jenkins/.ssh/id_dsa
Run Code Online (Sandbox Code Playgroud)
当我停止工作时,最后会打印以下内容:
Password for ${username}@shell.sourceforge.net: channel stopped
Run Code Online (Sandbox Code Playgroud)
这可能意味着$ {username}未得到解决.
如何解析$ {username}?
编辑:
请注意,以下运行正常:
site-deploy -Psonatype-oss-release -Dusername=puce
Run Code Online (Sandbox Code Playgroud)
编辑2: 作为发布的一部分:执行maven执行以下命令:
/usr/share/maven/bin/mvn -s /tmp/release-settings7797889802430474959.xml deploy site-deploy --no-plugin-updates --batch-mode -Psonatype-oss-release -P nexus -f pom.xml
Run Code Online (Sandbox Code Playgroud)
-Dusername=puce 似乎没有传递给这个maven命令......
另请注意help:effective-pom显示以下maven-release-plugin配置:
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.2.2</version> …Run Code Online (Sandbox Code Playgroud)