자바 7과 파이프라인으로 애플리케이션 컴파일
Ello no impide automatizar la construcción, mediante un Pipeline de Azure.
Los aspectos a tener en cuenta:
추천할 만한 것은 전체 소스 코드에 이진법을 포함하지 않는 것입니다. Por esa razón (y facilidad al usar GIT) se creo un repositorio que contiene los archivos necesarios.
https://gitlab.com/edgar.gs/posunificado-build-java7.git
azure-pipeline.yml 문서 형식:
# Ant
# Build your Java projects and run tests with Apache Ant.
# Add steps that save build artifacts and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
trigger:
- master
pool:
vmImage: windows-latest
steps:
- script: |
git clone https://gitlab.com/edgar.gs/posunificado-build-java7.git
- task: CopyFiles@2
inputs:
SourceFolder: 'posunificado-build-java7/build/jre7/lib/'
Contents: '*.jar'
TargetFolder: 'C:\jre7\lib'
- task: JavaToolInstaller@0
inputs:
versionSpec: '7'
jdkArchitectureOption: 'x86'
jdkSourceOption: LocalStorage
jdkFile: 'posunificado-build-java7/build/jdk1.7.0_65.7z'
jdkDestinationDirectory: '$(agent.toolsDirectory)/jdk7'
cleanDestinationDirectory: false
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'posunificado-build-java7\build\apache-ant-1.9.16-bin.zip'
#destinationFolder:
cleanDestinationFolder: false
overwriteExistingFiles: false
- task: Ant@1
inputs:
antHomeDirectory: 'apache-ant-1.9.16'
workingDirectory: ''
buildFile: 'fps-app-ws-posunificado/build-azure.xml'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.7'
jdkArchitectureOption: 'x86'
publishJUnitResults: false
#testResultsFiles: '**/TEST-*.xml'
- task: CopyFiles@2
inputs:
contents: 'fps-app-ws-posunificado/deploy/**'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: MyBuildOutputs
Se puede observar la ejecución en el siguiente video:
문서화
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/java-tool-installer?view=azure-devops
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/ant?view=azure-devops
Reference
이 문제에 관하여(자바 7과 파이프라인으로 애플리케이션 컴파일), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/e240683/compilar-una-aplicacion-java-7-en-un-pipeline-5h0j텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)