You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2006/05/06 07:20:03 UTC
svn commit: r400240 [2/2] - in /maven/plugins/trunk/maven-deploy-plugin: ./
src/main/java/org/apache/maven/plugin/deploy/
src/test/java/org/apache/maven/plugin/deploy/
src/test/java/org/apache/maven/plugin/deploy/stubs/
src/test/resources/unit/basic-de...
Modified: maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub.java?rev=400240&r1=400239&r2=400240&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub.java Fri May 5 22:20:01 2006
@@ -1,118 +1,118 @@
-package org.apache.maven.plugin.deploy.stubs;
-
-/*
- * Copyright 2001-2006 The Apache Software Foundation.
- *
- * Licensed 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.maven.artifact.Artifact;
-import org.apache.maven.artifact.metadata.ArtifactMetadata;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
-import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-
-public class ArtifactRepositoryStub
- implements ArtifactRepository
-{
- private boolean blacklisted;
-
- private ArtifactRepositoryLayout layout;
-
- private String url;
-
- public String pathOf( Artifact artifact )
- {
- return getLayout().pathOf( artifact );
- }
-
- public String pathOfRemoteRepositoryMetadata( ArtifactMetadata artifactMetadata )
- {
- return getLayout().pathOfRemoteRepositoryMetadata( artifactMetadata );
- }
-
- public String pathOfLocalRepositoryMetadata( ArtifactMetadata metadata, ArtifactRepository repository )
- {
- return getLayout().pathOfLocalRepositoryMetadata( metadata, repository );
- }
-
- public String getUrl()
- {
- return url;
- }
-
- public void setAppendToUrl( String dir )
- {
- this.url = "file://" + System.getProperty( "basedir" ) + "/target/remote-repo/" + dir;
- }
-
- public String getBasedir()
- {
- return System.getProperty( "basedir" );
- }
-
- public String getProtocol()
- {
- return "file";
- }
-
- public String getId()
- {
- return "deploy-test";
- }
-
- public ArtifactRepositoryPolicy getSnapshots()
- {
- return new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
- ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE );
- }
-
- public ArtifactRepositoryPolicy getReleases()
- {
- return new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
- ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE );
- }
-
- public ArtifactRepositoryLayout getLayout()
- {
- if( layout != null )
- {
- return layout;
- }
- else
- {
- return new DefaultRepositoryLayout();
- }
- }
-
- public String getKey()
- {
- return getId();
- }
-
- public boolean isUniqueVersion()
- {
- return false;
- }
-
- public void setBlacklisted( boolean blackListed )
- {
- this.blacklisted = blackListed;
- }
-
- public boolean isBlacklisted()
- {
- return blacklisted;
- }
-}
+package org.apache.maven.plugin.deploy.stubs;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.maven.artifact.Artifact;
+import org.apache.maven.artifact.metadata.ArtifactMetadata;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
+import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+
+public class ArtifactRepositoryStub
+ implements ArtifactRepository
+{
+ private boolean blacklisted;
+
+ private ArtifactRepositoryLayout layout;
+
+ private String url;
+
+ public String pathOf( Artifact artifact )
+ {
+ return getLayout().pathOf( artifact );
+ }
+
+ public String pathOfRemoteRepositoryMetadata( ArtifactMetadata artifactMetadata )
+ {
+ return getLayout().pathOfRemoteRepositoryMetadata( artifactMetadata );
+ }
+
+ public String pathOfLocalRepositoryMetadata( ArtifactMetadata metadata, ArtifactRepository repository )
+ {
+ return getLayout().pathOfLocalRepositoryMetadata( metadata, repository );
+ }
+
+ public String getUrl()
+ {
+ return url;
+ }
+
+ public void setAppendToUrl( String dir )
+ {
+ this.url = "file://" + System.getProperty( "basedir" ) + "/target/remote-repo/" + dir;
+ }
+
+ public String getBasedir()
+ {
+ return System.getProperty( "basedir" );
+ }
+
+ public String getProtocol()
+ {
+ return "file";
+ }
+
+ public String getId()
+ {
+ return "deploy-test";
+ }
+
+ public ArtifactRepositoryPolicy getSnapshots()
+ {
+ return new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
+ ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE );
+ }
+
+ public ArtifactRepositoryPolicy getReleases()
+ {
+ return new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
+ ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE );
+ }
+
+ public ArtifactRepositoryLayout getLayout()
+ {
+ if( layout != null )
+ {
+ return layout;
+ }
+ else
+ {
+ return new DefaultRepositoryLayout();
+ }
+ }
+
+ public String getKey()
+ {
+ return getId();
+ }
+
+ public boolean isUniqueVersion()
+ {
+ return false;
+ }
+
+ public void setBlacklisted( boolean blackListed )
+ {
+ this.blacklisted = blackListed;
+ }
+
+ public boolean isBlacklisted()
+ {
+ return blacklisted;
+ }
+}
Propchange: maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub2.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub2.java?rev=400240&r1=400239&r2=400240&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub2.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub2.java Fri May 5 22:20:01 2006
@@ -1,47 +1,47 @@
-package org.apache.maven.plugin.deploy.stubs;
-
-/*
- * Copyright 2001-2006 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-
-public class ArtifactRepositoryStub2
- extends ArtifactRepositoryStub
-{
- private String protocol;
-
- public String getUrl()
- {
- return "file://" + System.getProperty( "basedir" ) + "/target/remote-repo/basic-deploy-scp";
- }
-
- public String getBasedir()
- {
- return System.getProperty( "basedir" );
- }
-
- public String getProtocol()
- {
- if( this.protocol == null || this.protocol.equals("") )
- {
- this.protocol = "scp";
- }
- return this.protocol;
- }
-
- public void setProtocol( String protocol )
- {
- this.protocol = protocol;
- }
-}
+package org.apache.maven.plugin.deploy.stubs;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class ArtifactRepositoryStub2
+ extends ArtifactRepositoryStub
+{
+ private String protocol;
+
+ public String getUrl()
+ {
+ return "file://" + System.getProperty( "basedir" ) + "/target/remote-repo/basic-deploy-scp";
+ }
+
+ public String getBasedir()
+ {
+ return System.getProperty( "basedir" );
+ }
+
+ public String getProtocol()
+ {
+ if( this.protocol == null || this.protocol.equals("") )
+ {
+ this.protocol = "scp";
+ }
+ return this.protocol;
+ }
+
+ public void setProtocol( String protocol )
+ {
+ this.protocol = protocol;
+ }
+}
Propchange: maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub2.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/AttachedArtifactStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/AttachedArtifactStub.java?rev=400240&r1=400239&r2=400240&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/AttachedArtifactStub.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/AttachedArtifactStub.java Fri May 5 22:20:01 2006
@@ -1,35 +1,35 @@
-package org.apache.maven.plugin.deploy.stubs;
-
-/*
- * Copyright 2001-2006 The Apache Software Foundation.
- *
- * Licensed 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 java.io.File;
-
-public class AttachedArtifactStub
- extends DeployArtifactStub
-{
- public String getArtifactId()
- {
- return "attached-artifact-test-0";
- }
-
- public File getFile()
- {
- return new File( System.getProperty( "basedir" ),
- "target/test-classes/unit/basic-deploy-with-attached-artifacts/" +
- "target/deploy-test-file-1.0-SNAPSHOT.jar" );
- }
-}
+package org.apache.maven.plugin.deploy.stubs;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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 java.io.File;
+
+public class AttachedArtifactStub
+ extends DeployArtifactStub
+{
+ public String getArtifactId()
+ {
+ return "attached-artifact-test-0";
+ }
+
+ public File getFile()
+ {
+ return new File( System.getProperty( "basedir" ),
+ "target/test-classes/unit/basic-deploy-with-attached-artifacts/" +
+ "target/deploy-test-file-1.0-SNAPSHOT.jar" );
+ }
+}
Propchange: maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/AttachedArtifactStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/DeployArtifactStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/DeployArtifactStub.java?rev=400240&r1=400239&r2=400240&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/DeployArtifactStub.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/DeployArtifactStub.java Fri May 5 22:20:01 2006
@@ -1,123 +1,123 @@
-package org.apache.maven.plugin.deploy.stubs;
-
-/*
- * Copyright 2001-2006 The Apache Software Foundation.
- *
- * Licensed 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 java.io.File;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.maven.artifact.handler.ArtifactHandler;
-import org.apache.maven.artifact.handler.DefaultArtifactHandler;
-import org.apache.maven.artifact.metadata.ArtifactMetadata;
-import org.apache.maven.plugin.testing.stubs.ArtifactStub;
-
-public class DeployArtifactStub
- extends ArtifactStub
-{
- private Map metadataMap;
-
- private File file;
-
- private boolean release;
-
- private String extension;
-
- public String getArtifactId()
- {
- return "maven-deploy-test";
- }
-
- public String getGroupId()
- {
- return "org.apache.maven.test";
- }
-
- public String getVersion()
- {
- return "1.0-SNAPSHOT";
- }
-
- public String getBaseVersion()
- {
- return getVersion();
- }
-
- public void setFile( File file )
- {
- this.file = file;
- }
-
- public File getFile()
- {
- return file;
- }
-
- public ArtifactHandler getArtifactHandler()
- {
- return new DefaultArtifactHandler()
- {
- public String getExtension()
- {
- if( extension == null )
- {
- extension = "jar";
- }
- return extension;
- }
- };
- }
-
- public void setArtifactHandlerExtension( String extension )
- {
- this.extension = extension;
- }
-
- public void addMetadata( ArtifactMetadata metadata )
- {
- if ( metadataMap == null )
- {
- metadataMap = new HashMap();
- }
-
- ArtifactMetadata m = (ArtifactMetadata) metadataMap.get( metadata.getKey() );
- if ( m != null )
- {
- m.merge( metadata );
- }
- else
- {
- metadataMap.put( metadata.getKey(), metadata );
- }
- }
-
- public Collection getMetadataList()
- {
- return metadataMap == null ? Collections.EMPTY_LIST : metadataMap.values();
- }
-
- public boolean isRelease()
- {
- return release;
- }
-
- public void setRelease( boolean release )
- {
- this.release = release;
- }
-}
+package org.apache.maven.plugin.deploy.stubs;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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 java.io.File;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.maven.artifact.handler.ArtifactHandler;
+import org.apache.maven.artifact.handler.DefaultArtifactHandler;
+import org.apache.maven.artifact.metadata.ArtifactMetadata;
+import org.apache.maven.plugin.testing.stubs.ArtifactStub;
+
+public class DeployArtifactStub
+ extends ArtifactStub
+{
+ private Map metadataMap;
+
+ private File file;
+
+ private boolean release;
+
+ private String extension;
+
+ public String getArtifactId()
+ {
+ return "maven-deploy-test";
+ }
+
+ public String getGroupId()
+ {
+ return "org.apache.maven.test";
+ }
+
+ public String getVersion()
+ {
+ return "1.0-SNAPSHOT";
+ }
+
+ public String getBaseVersion()
+ {
+ return getVersion();
+ }
+
+ public void setFile( File file )
+ {
+ this.file = file;
+ }
+
+ public File getFile()
+ {
+ return file;
+ }
+
+ public ArtifactHandler getArtifactHandler()
+ {
+ return new DefaultArtifactHandler()
+ {
+ public String getExtension()
+ {
+ if( extension == null )
+ {
+ extension = "jar";
+ }
+ return extension;
+ }
+ };
+ }
+
+ public void setArtifactHandlerExtension( String extension )
+ {
+ this.extension = extension;
+ }
+
+ public void addMetadata( ArtifactMetadata metadata )
+ {
+ if ( metadataMap == null )
+ {
+ metadataMap = new HashMap();
+ }
+
+ ArtifactMetadata m = (ArtifactMetadata) metadataMap.get( metadata.getKey() );
+ if ( m != null )
+ {
+ m.merge( metadata );
+ }
+ else
+ {
+ metadataMap.put( metadata.getKey(), metadata );
+ }
+ }
+
+ public Collection getMetadataList()
+ {
+ return metadataMap == null ? Collections.EMPTY_LIST : metadataMap.values();
+ }
+
+ public boolean isRelease()
+ {
+ return release;
+ }
+
+ public void setRelease( boolean release )
+ {
+ this.release = release;
+ }
+}
Propchange: maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/DeployArtifactStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/basic-deploy-test/plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/basic-deploy-test/plugin-config.xml?rev=400240&r1=400239&r2=400240&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/basic-deploy-test/plugin-config.xml (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/basic-deploy-test/plugin-config.xml Fri May 5 22:20:01 2006
@@ -1,18 +1,18 @@
-<project>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <pomFile>${basedir}/src/test/resources/unit/basic-deploy-test/plugin-config.xml</pomFile>
- <packaging>jar</packaging>
- <artifact implementation="org.apache.maven.plugin.deploy.stubs.DeployArtifactStub" />
- <attachedArtifacts />
- <localRepository>${localRepository}</localRepository>
- <deploymentRepository implementation="org.apache.maven.plugin.deploy.stubs.ArtifactRepositoryStub" />
- <updateReleaseInfo>false</updateReleaseInfo>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<project>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <pomFile>${basedir}/src/test/resources/unit/basic-deploy-test/plugin-config.xml</pomFile>
+ <packaging>jar</packaging>
+ <artifact implementation="org.apache.maven.plugin.deploy.stubs.DeployArtifactStub" />
+ <attachedArtifacts />
+ <localRepository>${localRepository}</localRepository>
+ <deploymentRepository implementation="org.apache.maven.plugin.deploy.stubs.ArtifactRepositoryStub" />
+ <updateReleaseInfo>false</updateReleaseInfo>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/basic-deploy-test/plugin-config.xml
------------------------------------------------------------------------------
svn:eol-style = native