This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: file:///opt/svn/repositories/sonatype.org/plugins/trunk/attach-artifact-maven-plugin@113 c2a14038-686d-4adc-8740-a14e5738cb64
- Loading branch information
0 parents
commit 6f6d1ea
Showing
3 changed files
with
488 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,43 @@ | |||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |||
<modelVersion>4.0.0</modelVersion> | |||
<parent> | |||
<artifactId>plugins-parent</artifactId> | |||
<groupId>org.sonatype.plugins</groupId> | |||
<version>3</version> | |||
</parent> | |||
|
|||
<artifactId>attach-artifact-maven-plugin</artifactId> | |||
<version>1.0-SNAPSHOT</version> | |||
<packaging>maven-plugin</packaging> | |||
|
|||
<build> | |||
<plugins> | |||
<plugin> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<configuration> | |||
<source>1.5</source> | |||
<target>1.5</target> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
|
|||
<dependencies> | |||
<dependency> | |||
<groupId>org.apache.maven</groupId> | |||
<artifactId>maven-plugin-api</artifactId> | |||
<version>2.0.9</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.maven</groupId> | |||
<artifactId>maven-project</artifactId> | |||
<version>2.0.9</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.codehaus.plexus</groupId> | |||
<artifactId>plexus-archiver</artifactId> | |||
<version>1.0-alpha-7</version> | |||
</dependency> | |||
</dependencies> | |||
</project> |
160 changes: 160 additions & 0 deletions
160
src/main/java/org/codehaus/mojo/buildhelper/AttachArtifact.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,160 @@ | |||
package org.codehaus.mojo.buildhelper; | |||
|
|||
/* | |||
* The MIT License | |||
* | |||
* Copyright (c) 2004, The Codehaus | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a copy of | |||
* this software and associated documentation files (the "Software"), to deal in | |||
* the Software without restriction, including without limitation the rights to | |||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |||
* of the Software, and to permit persons to whom the Software is furnished to do | |||
* so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in all | |||
* copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||
* SOFTWARE. | |||
*/ | |||
|
|||
import java.io.File; | |||
|
|||
/** | |||
* @author dtran | |||
*/ | |||
public class AttachArtifact | |||
{ | |||
private String artifactId; | |||
|
|||
private String classifier; | |||
|
|||
private File file; | |||
|
|||
private String groupId; | |||
|
|||
private File pomFile; | |||
|
|||
private String type; | |||
|
|||
private Boolean updatePlugin; | |||
|
|||
private Boolean updatePom; | |||
|
|||
private String version; | |||
|
|||
private String goalPrefix; | |||
|
|||
public String getGoalPrefix() | |||
{ | |||
return goalPrefix; | |||
} | |||
|
|||
public void setGoalPrefix( String goalPrefix ) | |||
{ | |||
this.goalPrefix = goalPrefix; | |||
} | |||
|
|||
public String getArtifactId() | |||
{ | |||
return artifactId; | |||
} | |||
|
|||
public String getClassifier() | |||
{ | |||
return this.classifier; | |||
} | |||
|
|||
public File getFile() | |||
{ | |||
return this.file; | |||
} | |||
|
|||
public String getGroupId() | |||
{ | |||
return groupId; | |||
} | |||
|
|||
public File getPomFile() | |||
{ | |||
return pomFile; | |||
} | |||
|
|||
public String getType() | |||
{ | |||
return this.type; | |||
} | |||
|
|||
public String getVersion() | |||
{ | |||
return version; | |||
} | |||
|
|||
public Boolean isUpdatePlugin() | |||
{ | |||
return updatePlugin; | |||
} | |||
|
|||
public Boolean isUpdatePom() | |||
{ | |||
return updatePom; | |||
} | |||
|
|||
public void setArtifactId( String artifactId ) | |||
{ | |||
this.artifactId = artifactId; | |||
} | |||
|
|||
public void setClassifier( String classifier ) | |||
{ | |||
this.classifier = classifier; | |||
} | |||
|
|||
public void setFile( File localFile ) | |||
{ | |||
this.file = localFile; | |||
} | |||
|
|||
public void setGroupId( String groupId ) | |||
{ | |||
this.groupId = groupId; | |||
} | |||
|
|||
public void setPomFile( File pomFile ) | |||
{ | |||
this.pomFile = pomFile; | |||
} | |||
|
|||
public void setType( String type ) | |||
{ | |||
this.type = type; | |||
} | |||
|
|||
public void setUpdatePlugin( Boolean updatePlugin ) | |||
{ | |||
this.updatePlugin = updatePlugin; | |||
} | |||
|
|||
public void setUpdatePom( Boolean updatePom ) | |||
{ | |||
this.updatePom = updatePom; | |||
} | |||
|
|||
public void setVersion( String version ) | |||
{ | |||
this.version = version; | |||
} | |||
|
|||
@Override | |||
public String toString() | |||
{ | |||
return ( groupId != null ? groupId + ":" : "" ) + artifactId + ":" + ( version != null ? version + ":" : "" ) | |||
+ type; | |||
} | |||
} |
Oops, something went wrong.