Author: bentmann
Date: Fri Mar 20 21:33:54 2009
New Revision: 756767
URL: http://svn.apache.org/viewvc?rev=756767&view=rev
Log:
[MINSTALL-61] Remove parameter localRepositoryId
Modified:
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/specific-local-repo.apt
maven/plugins/trunk/maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallFileMojoTest.java
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-layout-test/plugin-config.xml
Modified:
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java?rev=756767&r1=756766&r2=756767&view=diff
==============================================================================
---
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
(original)
+++
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
Fri Mar 20 21:33:54 2009
@@ -35,7 +35,6 @@
import org.apache.maven.project.validation.ModelValidator;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.ReaderFactory;
-import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.WriterFactory;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
@@ -157,23 +156,15 @@
private Map repositoryLayouts;
/**
- * The path for a specific local repository directory. It will wrap into
an <code>ArtifactRepository</code> with
- * <code>localRepoId</code> as <code>id</code> and with a default
<code>repositoryLayout</code>.
- *
+ * The path for a specific local repository directory. If not specified
the local repository path configured in the
+ * Maven settings will be used.
+ *
* @parameter expression="${localRepositoryPath}"
* @since 2.2
*/
private File localRepositoryPath;
/**
- * The <code>id</code> for the <code>localRepo</code>.
- *
- * @parameter expression="${localRepositoryId}"
- * @since 2.2
- */
- private String localRepositoryId;
-
- /**
* The component used to validate the user-supplied artifact coordinates.
*
* @component
@@ -189,7 +180,7 @@
//
----------------------------------------------------------------------
// Override the default localRepository variable
//
----------------------------------------------------------------------
- if ( StringUtils.isNotEmpty( localRepositoryId ) && (
localRepositoryPath != null ) )
+ if ( localRepositoryPath != null )
{
try
{
@@ -197,7 +188,7 @@
getLog().debug( "Layout: " + layout.getClass() );
localRepository =
- new DefaultArtifactRepository( localRepositoryId,
localRepositoryPath.toURL().toString(), layout );
+ new DefaultArtifactRepository( localRepository.getId(),
localRepositoryPath.toURL().toString(), layout );
}
catch ( MalformedURLException e )
{
@@ -443,22 +434,6 @@
}
/**
- * @return the localRepositoryId
- */
- public String getLocalRepositoryId()
- {
- return this.localRepositoryId;
- }
-
- /**
- * @param theLocalRepositoryId the localRepositoryId to set
- */
- public void setLocalRepositoryId( String theLocalRepositoryId )
- {
- this.localRepositoryId = theLocalRepositoryId;
- }
-
- /**
* @return the localRepositoryPath
*/
public File getLocalRepositoryPath()
Modified:
maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/specific-local-repo.apt
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/specific-local-repo.apt?rev=756767&r1=756766&r2=756767&view=diff
==============================================================================
---
maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/specific-local-repo.apt
(original)
+++
maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/specific-local-repo.apt
Fri Mar 20 21:33:54 2009
@@ -30,8 +30,8 @@
By default, Maven Install Plugin uses the local repository defined in the
settings.xml to install an artifact.
- You could install an artifact on a specific local repository by setting the
<<<localRepositoryPath>>> and <<<localRepositoryId>>>
- parameters when installing.
+ You could install an artifact on a specific local repository by setting the
<<<localRepositoryPath>>>
+ parameter when installing.
+---+
mvn install:install-file -Dfile=path-to-your-artifact-jar \
@@ -41,5 +41,4 @@
-Dpackaging=jar \
-DpomFile=path-to-pom \
-DlocalRepositoryPath=path-to-specific-local-repo \
- -DlocalRepositoryId=id-for-specific-local-repo
+---+
Modified:
maven/plugins/trunk/maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallFileMojoTest.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallFileMojoTest.java?rev=756767&r1=756766&r2=756767&view=diff
==============================================================================
---
maven/plugins/trunk/maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallFileMojoTest.java
(original)
+++
maven/plugins/trunk/maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallFileMojoTest.java
Fri Mar 20 21:33:54 2009
@@ -99,9 +99,6 @@
assignValuesForParameter( mojo );
- //test harness doesn't like expressions.
- mojo.setLocalRepositoryId( "id" );
-
mojo.setLocalRepositoryPath( new File( getBasedir(), LOCAL_REPO ) );
mojo.execute();
Modified:
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-layout-test/plugin-config.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-layout-test/plugin-config.xml?rev=756767&r1=756766&r2=756767&view=diff
==============================================================================
---
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-layout-test/plugin-config.xml
(original)
+++
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-layout-test/plugin-config.xml
Fri Mar 20 21:33:54 2009
@@ -26,11 +26,10 @@
<artifactId>maven-install-file-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
- <repositoryLayout>legacy</repositoryLayout>
+ <repositoryLayout>legacy</repositoryLayout>
<file>${basedir}/src/test/resources/unit/install-file-basic-test/target/maven-install-test-1.0-SNAPSHOT.jar
</file>
<localRepository>${localRepository}</localRepository>
- <localRepositoryId>id</localRepositoryId>
</configuration>
</plugin>
</plugins>