Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions tools/maven-bundle-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,35 @@
<version>3.8.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>3.8.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings-builder</artifactId>
<version>3.8.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
<version>3.5.3</version>
<scope>provided</scope>
</dependency>
<!-- Wagon providers for the remote OBR goals, so that file: and http(s): work without the ones bundled in Maven -->
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<version>3.5.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
<version>3.5.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import java.util.regex.Pattern;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
Expand All @@ -40,6 +39,8 @@
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.settings.Settings;
import org.apache.maven.settings.crypto.SettingsDecrypter;
import org.codehaus.plexus.PlexusContainer;


/**
Expand Down Expand Up @@ -123,10 +124,16 @@ public final class ObrDeploy extends AbstractMojo
private Settings settings;

/**
* The Wagon manager.
* The Plexus container, used to look up the Wagon for the repository protocol.
*/
@Component
private WagonManager m_wagonManager;
private PlexusContainer m_container;

/**
* Decrypts the passwords of the server and proxy settings.
*/
@Component
private SettingsDecrypter m_settingsDecrypter;

/**
* Attached source artifact
Expand Down Expand Up @@ -182,7 +189,7 @@ else if ( "javadoc".equals( artifact.getClassifier() ) )
Log log = getLog();
ObrUpdate update;

RemoteFileManager remoteFile = new RemoteFileManager( m_wagonManager, settings, log );
RemoteFileManager remoteFile = new RemoteFileManager( m_container, m_settingsDecrypter, settings, log );
openRepositoryConnection( remoteFile );

// ======== LOCK REMOTE OBR ========
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.Arrays;
import java.util.List;

import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
Expand All @@ -34,6 +33,8 @@
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.settings.Settings;
import org.apache.maven.settings.crypto.SettingsDecrypter;
import org.codehaus.plexus.PlexusContainer;


/**
Expand Down Expand Up @@ -99,10 +100,16 @@ public final class ObrDeployFile extends AbstractFileMojo
private Settings settings;

/**
* The Wagon manager.
* The Plexus container, used to look up the Wagon for the repository protocol.
*/
@Component
private WagonManager m_wagonManager;
private PlexusContainer m_container;

/**
* Decrypts the passwords of the server and proxy settings.
*/
@Component
private SettingsDecrypter m_settingsDecrypter;


public void execute() throws MojoExecutionException
Expand Down Expand Up @@ -135,7 +142,7 @@ else if ( "NONE".equalsIgnoreCase( remoteOBR ) || "false".equalsIgnoreCase( remo
Log log = getLog();
ObrUpdate update;

RemoteFileManager remoteFile = new RemoteFileManager( m_wagonManager, settings, log );
RemoteFileManager remoteFile = new RemoteFileManager( m_container, m_settingsDecrypter, settings, log );
remoteFile.connect( repositoryId, url );

// ======== LOCK REMOTE OBR ========
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
Expand All @@ -59,6 +58,8 @@
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.settings.Settings;
import org.apache.maven.settings.crypto.SettingsDecrypter;
import org.codehaus.plexus.PlexusContainer;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Expand Down Expand Up @@ -136,10 +137,16 @@ public final class ObrRemoteClean extends AbstractMojo
private Settings settings;

/**
* The Wagon manager.
* The Plexus container, used to look up the Wagon for the repository protocol.
*/
@Component
private WagonManager m_wagonManager;
private PlexusContainer m_container;

/**
* Decrypts the passwords of the server and proxy settings.
*/
@Component
private SettingsDecrypter m_settingsDecrypter;


public void execute() throws MojoExecutionException
Expand Down Expand Up @@ -170,7 +177,7 @@ else if ( "NONE".equalsIgnoreCase( remoteOBR ) || "false".equalsIgnoreCase( remo

Log log = getLog();

RemoteFileManager remoteFile = new RemoteFileManager( m_wagonManager, settings, log );
RemoteFileManager remoteFile = new RemoteFileManager( m_container, m_settingsDecrypter, settings, log );
openRepositoryConnection( remoteFile );
if ( null == prefixUrl )
{
Expand Down
Loading
Loading