Skip to content

Commit

Permalink
Moved packages from hudson.* to jenkins.*, the sooner the better
Browse files Browse the repository at this point in the history
  • Loading branch information
fcamblor committed Aug 24, 2013
1 parent 53d5787 commit c4dcc59
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 30 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<version>1.509</version>
</parent>

<groupId>org.jvnet.hudson.plugins</groupId>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>nodejs</artifactId>
<version>0.2-SNAPSHOT</version>
<name>NodeJS Plugin</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package hudson.plugins.nodejs;
package jenkins.plugins.nodejs;

import hudson.Plugin;
import hudson.model.Hudson;
import hudson.plugins.nodejs.tools.NodeJSInstallation;
import jenkins.plugins.nodejs.tools.NodeJSInstallation;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package hudson.plugins.nodejs;
package jenkins.plugins.nodejs;

import hudson.*;
import hudson.model.*;
import hudson.model.Messages;
import hudson.plugins.nodejs.tools.NodeJSInstallation;
import jenkins.plugins.nodejs.tools.NodeJSInstallation;
import hudson.tasks.*;
import hudson.util.ArgumentListBuilder;
import net.sf.json.JSONObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package hudson.plugins.nodejs.tools;
package jenkins.plugins.nodejs.tools;

import hudson.FilePath;
import hudson.Launcher;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package hudson.plugins.nodejs.tools;
package jenkins.plugins.nodejs.tools;

import hudson.plugins.nodejs.tools.pathresolvers.LatestInstallerPathResolver;
import jenkins.plugins.nodejs.tools.pathresolvers.LatestInstallerPathResolver;
import hudson.tools.DownloadFromUrlInstaller;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
package hudson.plugins.nodejs.tools;
package jenkins.plugins.nodejs.tools;

import hudson.*;
import hudson.model.EnvironmentSpecific;
import hudson.model.Node;
import hudson.model.TaskListener;
import hudson.plugins.nodejs.NodeJSPlugin;
import jenkins.plugins.nodejs.NodeJSPlugin;
import hudson.remoting.Callable;
import hudson.slaves.NodeSpecific;
import hudson.tools.ToolDescriptor;
import hudson.tools.ToolInstallation;
import hudson.tools.ToolInstaller;
import hudson.tools.ToolProperty;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.Collections;
import java.util.List;

/**
Expand Down Expand Up @@ -88,7 +86,7 @@ public DescriptorImpl() {

@Override
public String getDisplayName() {
return Messages.installer_displayName();
return jenkins.plugins.nodejs.tools.Messages.installer_displayName();
}

// Persistence is done by NodeJSPlugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package hudson.plugins.nodejs.tools;
package jenkins.plugins.nodejs.tools;

import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
Expand All @@ -32,7 +32,7 @@
import hudson.model.Node;
import hudson.model.TaskListener;
import hudson.os.PosixAPI;
import hudson.plugins.tools.Installables;
import jenkins.plugins.tools.Installables;
import hudson.remoting.Callable;
import hudson.remoting.VirtualChannel;
import hudson.tools.DownloadFromUrlInstaller;
Expand All @@ -50,7 +50,7 @@
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;

import static hudson.plugins.nodejs.tools.NodeJSInstaller.Preference.*;
import static jenkins.plugins.nodejs.tools.NodeJSInstaller.Preference.*;

/**
* Install NodeJS from nodejs.org
Expand Down Expand Up @@ -379,6 +379,12 @@ public int compare(Installable o1, Installable o2) {
return new ArrayList<Installable>(sortedInstallables);
}

@Override
public String getId() {
// For backward compatibility
return "hudson.plugins.nodejs.tools.NodeJSInstaller";
}

@Override
public boolean isApplicable(Class<? extends ToolInstallation> toolType) {
return toolType == NodeJSInstallation.class;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hudson.plugins.nodejs.tools;
package jenkins.plugins.nodejs.tools;

/**
* @author fcamblor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package hudson.plugins.nodejs.tools;
package jenkins.plugins.nodejs.tools;

import com.google.common.base.Throwables;
import hudson.*;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.BuildListener;
import hudson.model.Run;
import hudson.plugins.nodejs.NodeJSPlugin;
import jenkins.plugins.nodejs.NodeJSPlugin;
import hudson.tasks.BuildWrapper;
import hudson.tasks.BuildWrapperDescriptor;
import org.kohsuke.stapler.DataBoundConstructor;
Expand Down Expand Up @@ -105,7 +105,7 @@ public NodeJSInstallation[] getInstallations() {
}

public String getDisplayName() {
return Messages.NpmPackagesBuildWrapper_displayName();
return jenkins.plugins.nodejs.tools.Messages.NpmPackagesBuildWrapper_displayName();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package hudson.plugins.nodejs.tools.pathresolvers;
package jenkins.plugins.nodejs.tools.pathresolvers;

import hudson.plugins.nodejs.tools.InstallerPathResolver;
import hudson.plugins.nodejs.tools.NodeJSInstaller;
import jenkins.plugins.nodejs.tools.InstallerPathResolver;
import jenkins.plugins.nodejs.tools.NodeJSInstaller;

/**
* @author fcamblor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hudson.plugins.tools;
package jenkins.plugins.tools;

import hudson.tools.DownloadFromUrlInstaller;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package hudson.plugins.nodejs;
package jenkins.plugins.nodejs;

import hudson.FilePath;
import hudson.model.Descriptor;
import hudson.plugins.nodejs.NodeJsCommandInterpreter;
import hudson.plugins.nodejs.tools.NodeJSInstallation;
import jenkins.plugins.nodejs.tools.NodeJSInstallation;
import hudson.tasks.Builder;
import junit.framework.TestCase;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hudson.plugins.nodejs.tools;
package jenkins.plugins.nodejs.tools;

import com.google.common.base.Charsets;
import com.google.common.io.Resources;
Expand Down Expand Up @@ -41,7 +41,7 @@ public InstallerPathResolversTest(DownloadFromUrlInstaller.Installable installab
public static Collection<Object[]> data() throws IOException {
Collection<Object[]> testPossibleParams = new ArrayList<Object[]>();

String installablesJSONStr = Resources.toString(Resources.getResource("updates/hudson.plugins.nodejs.tools.NodeJSInstaller.json"), Charsets.UTF_8);
String installablesJSONStr = Resources.toString(Resources.getResource("updates/jenkins.plugins.nodejs.tools.NodeJSInstaller.json"), Charsets.UTF_8);
JSONArray installables = JSONObject.fromObject(installablesJSONStr).getJSONArray("list");
for(int i=0; i<installables.size(); i++){
DownloadFromUrlInstaller.Installable installable = (DownloadFromUrlInstaller.Installable)installables.getJSONObject(i).toBean(DownloadFromUrlInstaller.Installable.class);
Expand Down

0 comments on commit c4dcc59

Please sign in to comment.