Hi Dan,

Author: dantran
Date: Tue Dec 29 23:33:02 2009
New Revision: 894515

URL: http://svn.apache.org/viewvc?rev=894515&view=rev
Log:
MDEP-179:Add ability to use an alternate repository at copy and unpack mojo's execution time

+    +    /**
+     * @return Returns the local.
+     */
+    protected ArtifactRepository getLocal ()
+    {
+        if ( this.localRepository != null )
+        {
+            return this.localRepository;
+        }
+        +        if ( this.alternateLocalRepository != null )
+        {
+            //create a temporary local repository with unique id
+ this.localRepository = new DefaultArtifactRepository( Long.toHexString( System.currentTimeMillis() ), "file://" + this.alternateLocalRepository.getAbsolutePath(), new DefaultRepositoryLayout() );

Directly using implementation classes instead of interfaces/components is bad with regard to future refactoring of Maven internals. Please use the ArtifactRepositoryFactory instead of new DefaultArtifactRepository().

Ping


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to