123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730 |
- package org.apache.archiva.converter.artifact;
-
- /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- import org.apache.archiva.checksum.ChecksumAlgorithm;
- import org.apache.archiva.checksum.ChecksumValidationException;
- import org.apache.archiva.checksum.ChecksummedFile;
- import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
- import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException;
- import org.apache.archiva.transaction.FileTransaction;
- import org.apache.archiva.transaction.TransactionException;
- import org.apache.commons.io.FileUtils;
- import org.apache.maven.artifact.Artifact;
- import org.apache.maven.artifact.factory.ArtifactFactory;
- import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
- import org.apache.maven.artifact.repository.ArtifactRepository;
- import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata;
- import org.apache.maven.artifact.repository.metadata.Metadata;
- import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
- import org.apache.maven.artifact.repository.metadata.Snapshot;
- import org.apache.maven.artifact.repository.metadata.Versioning;
- import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader;
- import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Writer;
- import org.apache.maven.model.DistributionManagement;
- import org.apache.maven.model.Model;
- import org.apache.maven.model.Relocation;
- import org.apache.maven.model.converter.ModelConverter;
- import org.apache.maven.model.converter.PomTranslationException;
- import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
- import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
- import org.springframework.stereotype.Service;
-
- import javax.annotation.PostConstruct;
- import javax.inject.Inject;
- import java.io.IOException;
- import java.io.Reader;
- import java.io.StringReader;
- import java.io.StringWriter;
- import java.nio.charset.Charset;
- import java.nio.file.Files;
- import java.nio.file.Path;
- import java.nio.file.Paths;
- import java.util.ArrayList;
- import java.util.Arrays;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- import java.util.Properties;
- import java.util.regex.Matcher;
-
- /**
- * LegacyToDefaultConverter
- */
- @Service("artifactConverter#legacy-to-default")
- public class LegacyToDefaultConverter
- implements ArtifactConverter
- {
- /**
- *
- */
- private List<ChecksumAlgorithm> digesters;
-
- @Inject
- private PlexusSisuBridge plexusSisuBridge;
-
- private ModelConverter translator;
-
- private ArtifactFactory artifactFactory;
-
- private ArtifactHandlerManager artifactHandlerManager;
-
- private boolean force;
-
- private boolean dryrun;
-
- private Map<Artifact, List<String>> warnings = new HashMap<>();
-
- @PostConstruct
- public void initialize()
- throws PlexusSisuBridgeException
- {
- // TODO: Should be configurable!
- this.digesters = Arrays.asList(ChecksumAlgorithm.SHA256, ChecksumAlgorithm.SHA1, ChecksumAlgorithm.MD5);
- translator = plexusSisuBridge.lookup( ModelConverter.class );
- artifactFactory = plexusSisuBridge.lookup( ArtifactFactory.class );
- artifactHandlerManager = plexusSisuBridge.lookup( ArtifactHandlerManager.class );
- }
-
- @Override
- public void convert( Artifact artifact, ArtifactRepository targetRepository )
- throws ArtifactConversionException
- {
- if ( artifact.getRepository().getUrl().equals( targetRepository.getUrl() ) )
- {
- throw new ArtifactConversionException( Messages.getString( "exception.repositories.match" ) ); //$NON-NLS-1$
- }
-
- if ( !validateMetadata( artifact ) )
- {
- addWarning( artifact, Messages.getString( "unable.to.validate.metadata" ) ); //$NON-NLS-1$
- return;
- }
-
- FileTransaction transaction = new FileTransaction();
-
- if ( !copyPom( artifact, targetRepository, transaction ) )
- {
- addWarning( artifact, Messages.getString( "unable.to.copy.pom" ) ); //$NON-NLS-1$
- return;
- }
-
- if ( !copyArtifact( artifact, targetRepository, transaction ) )
- {
- addWarning( artifact, Messages.getString( "unable.to.copy.artifact" ) ); //$NON-NLS-1$
- return;
- }
-
- Metadata metadata = createBaseMetadata( artifact );
- Versioning versioning = new Versioning();
- versioning.addVersion( artifact.getBaseVersion() );
- metadata.setVersioning( versioning );
- updateMetadata( new ArtifactRepositoryMetadata( artifact ), targetRepository, metadata, transaction );
-
- metadata = createBaseMetadata( artifact );
- metadata.setVersion( artifact.getBaseVersion() );
- versioning = new Versioning();
-
- Matcher matcher = Artifact.VERSION_FILE_PATTERN.matcher( artifact.getVersion() );
- if ( matcher.matches() )
- {
- Snapshot snapshot = new Snapshot();
- snapshot.setBuildNumber( Integer.parseInt( matcher.group( 3 ) ) );
- snapshot.setTimestamp( matcher.group( 2 ) );
- versioning.setSnapshot( snapshot );
- }
-
- // TODO: merge latest/release/snapshot from source instead
- metadata.setVersioning( versioning );
- updateMetadata( new SnapshotArtifactRepositoryMetadata( artifact ), targetRepository, metadata, transaction );
-
- if ( !dryrun )
- {
- try
- {
- transaction.commit();
- }
- catch ( TransactionException e )
- {
- throw new ArtifactConversionException( Messages.getString( "transaction.failure", e.getMessage() ),
- e ); //$NON-NLS-1$
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- private boolean copyPom( Artifact artifact, ArtifactRepository targetRepository, FileTransaction transaction )
- throws ArtifactConversionException
- {
- Artifact pom = artifactFactory.createProjectArtifact( artifact.getGroupId(), artifact.getArtifactId(),
- artifact.getVersion() );
- pom.setBaseVersion( artifact.getBaseVersion() );
- ArtifactRepository repository = artifact.getRepository();
- Path file = Paths.get( repository.getBasedir(), repository.pathOf( pom ) );
-
- boolean result = true;
- if ( Files.exists(file) )
- {
- Path targetFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( pom ) );
-
- String contents = null;
- boolean checksumsValid = false;
- try
- {
- if ( testChecksums( artifact, file ) )
- {
- checksumsValid = true;
- }
-
- // Even if the checksums for the POM are invalid we should still convert the POM
- contents = org.apache.archiva.common.utils.FileUtils.readFileToString( file, Charset.defaultCharset() );
- }
- catch ( IOException e )
- {
- throw new ArtifactConversionException(
- Messages.getString( "unable.to.read.source.pom", e.getMessage() ), e ); //$NON-NLS-1$
- }
-
- if ( checksumsValid && contents.indexOf( "modelVersion" ) >= 0 ) //$NON-NLS-1$
- {
- // v4 POM
- boolean matching = false;
- if ( !force && Files.exists( targetFile ) )
- {
- String targetContents = org.apache.archiva.common.utils.FileUtils.readFileToString( targetFile, Charset.defaultCharset( ) );
- matching = targetContents.equals( contents );
- }
- if ( force || !matching )
- {
- transaction.createFile( contents, targetFile, digesters );
- }
- }
- else
- {
- // v3 POM
- try (StringReader stringReader = new StringReader( contents ))
- {
-
- try (StringWriter writer = new StringWriter())
- {
- org.apache.maven.model.v3_0_0.io.xpp3.MavenXpp3Reader v3Reader =
- new org.apache.maven.model.v3_0_0.io.xpp3.MavenXpp3Reader();
- org.apache.maven.model.v3_0_0.Model v3Model = v3Reader.read( stringReader );
-
- if ( doRelocation( artifact, v3Model, targetRepository, transaction ) )
- {
- Artifact relocatedPom =
- artifactFactory.createProjectArtifact( artifact.getGroupId(), artifact.getArtifactId(),
- artifact.getVersion() );
- targetFile =
- Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( relocatedPom ) );
- }
-
- Model v4Model = translator.translate( v3Model );
-
- translator.validateV4Basics( v4Model, v3Model.getGroupId(), v3Model.getArtifactId(),
- v3Model.getVersion(), v3Model.getPackage() );
-
- MavenXpp3Writer xpp3Writer = new MavenXpp3Writer();
- xpp3Writer.write( writer, v4Model );
-
- transaction.createFile( writer.toString(), targetFile, digesters );
-
- List<String> warnings = translator.getWarnings();
-
- for ( String message : warnings )
- {
- addWarning( artifact, message );
- }
- }
- catch ( XmlPullParserException e )
- {
- addWarning( artifact,
- Messages.getString( "invalid.source.pom", e.getMessage() ) ); //$NON-NLS-1$
- result = false;
- }
- catch ( IOException e )
- {
- throw new ArtifactConversionException( Messages.getString( "unable.to.write.converted.pom" ),
- e ); //$NON-NLS-1$
- }
- catch ( PomTranslationException e )
- {
- addWarning( artifact,
- Messages.getString( "invalid.source.pom", e.getMessage() ) ); //$NON-NLS-1$
- result = false;
- }
- }
- }
- }
- else
- {
- addWarning( artifact, Messages.getString( "warning.missing.pom" ) ); //$NON-NLS-1$
- }
- return result;
- }
-
- private boolean testChecksums( Artifact artifact, Path file )
- throws IOException
- {
- boolean result = true;
- for ( ChecksumAlgorithm digester : digesters )
- {
- result &= verifyChecksum( file, file.getFileName() + "." + getDigesterFileExtension( digester ), digester,
- //$NON-NLS-1$
- artifact,
- "failure.incorrect." + getDigesterFileExtension( digester ) ); //$NON-NLS-1$
- }
- return result;
- }
-
- private boolean verifyChecksum( Path file, String fileName, ChecksumAlgorithm digester, Artifact artifact, String key )
- throws IOException
- {
- boolean result;
- Path checksumFile = file.resolveSibling( fileName );
- // We ignore the check, if the checksum file does not exist
- if (!Files.exists(checksumFile)) {
- return true;
- }
- ChecksummedFile csFile = new ChecksummedFile( file );
- try
- {
- result = csFile.isValidChecksum( digester, true );
- } catch (ChecksumValidationException e ) {
- addWarning( artifact, Messages.getString( key ) );
- result = false;
- }
- return result;
- }
-
- /**
- * File extension for checksums
- * TODO should be moved to plexus-digester ?
- */
- private String getDigesterFileExtension( ChecksumAlgorithm checksumAlgorithm )
- {
- return checksumAlgorithm.getExt().get(0);
- }
-
- private boolean copyArtifact( Artifact artifact, ArtifactRepository targetRepository, FileTransaction transaction )
- throws ArtifactConversionException
- {
- Path sourceFile = artifact.getFile().toPath();
-
- if ( sourceFile.toAbsolutePath().toString().indexOf( "/plugins/" ) > -1 ) //$NON-NLS-1$
- {
- artifact.setArtifactHandler( artifactHandlerManager.getArtifactHandler( "maven-plugin" ) ); //$NON-NLS-1$
- }
-
- Path targetFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) );
-
- boolean result = true;
- try
- {
- boolean matching = false;
- if ( !force && Files.exists(targetFile) )
- {
- matching = FileUtils.contentEquals( sourceFile.toFile(), targetFile.toFile() );
- if ( !matching )
- {
- addWarning( artifact, Messages.getString( "failure.target.already.exists" ) ); //$NON-NLS-1$
- result = false;
- }
- }
- if ( result )
- {
- if ( force || !matching )
- {
- if ( testChecksums( artifact, sourceFile ) )
- {
- transaction.copyFile( sourceFile, targetFile, digesters );
- }
- else
- {
- result = false;
- }
- }
- }
- }
- catch ( IOException e )
- {
- throw new ArtifactConversionException( Messages.getString( "error.copying.artifact" ), e ); //$NON-NLS-1$
- }
- return result;
- }
-
- private Metadata createBaseMetadata( Artifact artifact )
- {
- Metadata metadata = new Metadata();
- metadata.setArtifactId( artifact.getArtifactId() );
- metadata.setGroupId( artifact.getGroupId() );
- return metadata;
- }
-
- private Metadata readMetadata( Path file )
- throws ArtifactConversionException
- {
- MetadataXpp3Reader reader = new MetadataXpp3Reader();
-
- try (Reader fileReader = Files.newBufferedReader( file, Charset.defaultCharset() ))
- {
- return reader.read( fileReader );
- }
- catch ( IOException | XmlPullParserException e )
- {
- throw new ArtifactConversionException( Messages.getString( "error.reading.target.metadata" ),
- e ); //$NON-NLS-1$
- }
- }
-
- private boolean validateMetadata( Artifact artifact )
- throws ArtifactConversionException
- {
- ArtifactRepository repository = artifact.getRepository();
-
- boolean result = true;
-
- RepositoryMetadata repositoryMetadata = new ArtifactRepositoryMetadata( artifact );
- Path file = Paths.get( repository.getBasedir(), repository.pathOfRemoteRepositoryMetadata( repositoryMetadata ) );
- if ( Files.exists(file) )
- {
- Metadata metadata = readMetadata( file );
- result = validateMetadata( metadata, repositoryMetadata, artifact );
- }
-
- repositoryMetadata = new SnapshotArtifactRepositoryMetadata( artifact );
- file = Paths.get( repository.getBasedir(), repository.pathOfRemoteRepositoryMetadata( repositoryMetadata ) );
- if ( Files.exists(file) )
- {
- Metadata metadata = readMetadata( file );
- result = result && validateMetadata( metadata, repositoryMetadata, artifact );
- }
-
- return result;
- }
-
- @SuppressWarnings("unchecked")
- private boolean validateMetadata( Metadata metadata, RepositoryMetadata repositoryMetadata, Artifact artifact )
- {
- String groupIdKey;
- String artifactIdKey = null;
- String snapshotKey = null;
- String versionKey = null;
- String versionsKey = null;
-
- if ( repositoryMetadata.storedInGroupDirectory() )
- {
- groupIdKey = "failure.incorrect.groupMetadata.groupId"; //$NON-NLS-1$
- }
- else if ( repositoryMetadata.storedInArtifactVersionDirectory() )
- {
- groupIdKey = "failure.incorrect.snapshotMetadata.groupId"; //$NON-NLS-1$
- artifactIdKey = "failure.incorrect.snapshotMetadata.artifactId"; //$NON-NLS-1$
- versionKey = "failure.incorrect.snapshotMetadata.version"; //$NON-NLS-1$
- snapshotKey = "failure.incorrect.snapshotMetadata.snapshot"; //$NON-NLS-1$
- }
- else
- {
- groupIdKey = "failure.incorrect.artifactMetadata.groupId"; //$NON-NLS-1$
- artifactIdKey = "failure.incorrect.artifactMetadata.artifactId"; //$NON-NLS-1$
- versionsKey = "failure.incorrect.artifactMetadata.versions"; //$NON-NLS-1$
- }
-
- boolean result = true;
-
- if ( metadata.getGroupId() == null || !metadata.getGroupId().equals( artifact.getGroupId() ) )
- {
- addWarning( artifact, Messages.getString( groupIdKey ) );
- result = false;
- }
- if ( !repositoryMetadata.storedInGroupDirectory() )
- {
- if ( metadata.getGroupId() == null || !metadata.getArtifactId().equals( artifact.getArtifactId() ) )
- {
- addWarning( artifact, Messages.getString( artifactIdKey ) );
- result = false;
- }
- if ( !repositoryMetadata.storedInArtifactVersionDirectory() )
- {
- // artifact metadata
-
- boolean foundVersion = false;
- if ( metadata.getVersioning() != null )
- {
- for ( String version : (List<String>) metadata.getVersioning().getVersions() )
- {
- if ( version.equals( artifact.getBaseVersion() ) )
- {
- foundVersion = true;
- break;
- }
- }
- }
-
- if ( !foundVersion )
- {
- addWarning( artifact, Messages.getString( versionsKey ) );
- result = false;
- }
- }
- else
- {
- // snapshot metadata
- if ( !artifact.getBaseVersion().equals( metadata.getVersion() ) )
- {
- addWarning( artifact, Messages.getString( versionKey ) );
- result = false;
- }
-
- if ( artifact.isSnapshot() )
- {
- Matcher matcher = Artifact.VERSION_FILE_PATTERN.matcher( artifact.getVersion() );
- if ( matcher.matches() )
- {
- boolean correct = false;
- if ( metadata.getVersioning() != null && metadata.getVersioning().getSnapshot() != null )
- {
- Snapshot snapshot = metadata.getVersioning().getSnapshot();
- int build = Integer.parseInt( matcher.group( 3 ) );
- String ts = matcher.group( 2 );
- if ( build == snapshot.getBuildNumber() && ts.equals( snapshot.getTimestamp() ) )
- {
- correct = true;
- }
- }
-
- if ( !correct )
- {
- addWarning( artifact, Messages.getString( snapshotKey ) );
- result = false;
- }
- }
- }
- }
- }
- return result;
- }
-
- private void updateMetadata( RepositoryMetadata artifactMetadata, ArtifactRepository targetRepository,
- Metadata newMetadata, FileTransaction transaction )
- throws ArtifactConversionException
- {
- Path file = Paths.get( targetRepository.getBasedir(),
- targetRepository.pathOfRemoteRepositoryMetadata( artifactMetadata ) );
-
- Metadata metadata;
- boolean changed;
-
- if ( Files.exists(file) )
- {
- metadata = readMetadata( file );
- changed = metadata.merge( newMetadata );
- }
- else
- {
- changed = true;
- metadata = newMetadata;
- }
-
- if ( changed )
- {
-
- try (StringWriter writer = new StringWriter())
- {
- MetadataXpp3Writer mappingWriter = new MetadataXpp3Writer();
-
- mappingWriter.write( writer, metadata );
-
- transaction.createFile( writer.toString(), file, digesters );
- }
- catch ( IOException e )
- {
- throw new ArtifactConversionException( Messages.getString( "error.writing.target.metadata" ),
- e ); //$NON-NLS-1$
- }
- }
- }
-
- private boolean doRelocation( Artifact artifact, org.apache.maven.model.v3_0_0.Model v3Model,
- ArtifactRepository repository, FileTransaction transaction )
- throws IOException
- {
- Properties properties = v3Model.getProperties();
- if ( properties.containsKey( "relocated.groupId" ) || properties.containsKey( "relocated.artifactId" )
- //$NON-NLS-1$ //$NON-NLS-2$
- || properties.containsKey( "relocated.version" ) ) //$NON-NLS-1$
- {
- String newGroupId = properties.getProperty( "relocated.groupId", v3Model.getGroupId() ); //$NON-NLS-1$
- properties.remove( "relocated.groupId" ); //$NON-NLS-1$
-
- String newArtifactId =
- properties.getProperty( "relocated.artifactId", v3Model.getArtifactId() ); //$NON-NLS-1$
- properties.remove( "relocated.artifactId" ); //$NON-NLS-1$
-
- String newVersion = properties.getProperty( "relocated.version", v3Model.getVersion() ); //$NON-NLS-1$
- properties.remove( "relocated.version" ); //$NON-NLS-1$
-
- String message = properties.getProperty( "relocated.message", "" ); //$NON-NLS-1$ //$NON-NLS-2$
- properties.remove( "relocated.message" ); //$NON-NLS-1$
-
- if ( properties.isEmpty() )
- {
- v3Model.setProperties( null );
- }
-
- writeRelocationPom( v3Model.getGroupId(), v3Model.getArtifactId(), v3Model.getVersion(), newGroupId,
- newArtifactId, newVersion, message, repository, transaction );
-
- v3Model.setGroupId( newGroupId );
- v3Model.setArtifactId( newArtifactId );
- v3Model.setVersion( newVersion );
-
- artifact.setGroupId( newGroupId );
- artifact.setArtifactId( newArtifactId );
- artifact.setVersion( newVersion );
-
- return true;
- }
- else
- {
- return false;
- }
- }
-
- private void writeRelocationPom( String groupId, String artifactId, String version, String newGroupId,
- String newArtifactId, String newVersion, String message,
- ArtifactRepository repository, FileTransaction transaction )
- throws IOException
- {
- Model pom = new Model();
- pom.setGroupId( groupId );
- pom.setArtifactId( artifactId );
- pom.setVersion( version );
-
- DistributionManagement dMngt = new DistributionManagement();
-
- Relocation relocation = new Relocation();
- relocation.setGroupId( newGroupId );
- relocation.setArtifactId( newArtifactId );
- relocation.setVersion( newVersion );
- if ( message != null && message.length() > 0 )
- {
- relocation.setMessage( message );
- }
-
- dMngt.setRelocation( relocation );
-
- pom.setDistributionManagement( dMngt );
-
- Artifact artifact = artifactFactory.createBuildArtifact( groupId, artifactId, version, "pom" ); //$NON-NLS-1$
- Path pomFile = Paths.get( repository.getBasedir(), repository.pathOf( artifact ) );
-
- StringWriter strWriter = new StringWriter();
- MavenXpp3Writer pomWriter = new MavenXpp3Writer();
- pomWriter.write( strWriter, pom );
-
- transaction.createFile( strWriter.toString(), pomFile, digesters );
- }
-
- private void addWarning( Artifact artifact, String message )
- {
- List<String> messages = warnings.get( artifact );
- if ( messages == null )
- {
- messages = new ArrayList<>( 1 );
- }
- messages.add( message );
- warnings.put( artifact, messages );
- }
-
- @Override
- public void clearWarnings()
- {
- warnings.clear();
- }
-
- @Override
- public Map<Artifact, List<String>> getWarnings()
- {
- return warnings;
- }
-
-
- public List<ChecksumAlgorithm> getDigesters()
- {
- return digesters;
- }
-
- public void setDigesters( List<ChecksumAlgorithm> digesters )
- {
- this.digesters = digesters;
- }
-
- public ModelConverter getTranslator()
- {
- return translator;
- }
-
- public void setTranslator( ModelConverter translator )
- {
- this.translator = translator;
- }
-
- public ArtifactFactory getArtifactFactory()
- {
- return artifactFactory;
- }
-
- public void setArtifactFactory( ArtifactFactory artifactFactory )
- {
- this.artifactFactory = artifactFactory;
- }
-
- public ArtifactHandlerManager getArtifactHandlerManager()
- {
- return artifactHandlerManager;
- }
-
- public void setArtifactHandlerManager( ArtifactHandlerManager artifactHandlerManager )
- {
- this.artifactHandlerManager = artifactHandlerManager;
- }
-
- public boolean isForce()
- {
- return force;
- }
-
- public void setForce( boolean force )
- {
- this.force = force;
- }
-
- public boolean isDryrun()
- {
- return dryrun;
- }
-
- public void setDryrun( boolean dryrun )
- {
- this.dryrun = dryrun;
- }
- }
|