Solved Stuck

Discussion in 'Plugin Help/Development/Requests' started by suitinacow, Jun 28, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    suitinacow

    Hey guys, this is my first plugin and I'm having trouble exporting my maven project as a .jar file. when i export the file it says this: [​IMG]

    This might be an effect of my pom.xml which has an error saying:
    Code:
    Failure to transfer net.md-5:bungeecord-chat:jar:1.8-20150606.084332-80 from https://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates are forced. Original error: Could not transfer artifact net.md-5:bungeecord-chat:jar:1.8-20150606.084332-80 from/to sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots): The operation was cancelled.
    
    org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer net.md-5:bungeecord-chat:jar:1.8-20150606.084332-80 from https://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates are forced. Original error: Could not transfer artifact net.md-5:bungeecord-chat:jar:1.8-20150606.084332-80 from/to sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots): The operation was cancelled.
        at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:238)
        at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
        at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:205)
        at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:215)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:188)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:119)
        at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProject(MavenImpl.java:636)
        at org.eclipse.m2e.core.internal.project.registry.DefaultMavenDependencyResolver.resolveProjectDependencies(DefaultMavenDependencyResolver.java:63)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refreshPhase2(ProjectRegistryManager.java:529)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:491)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:1)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:495)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:350)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:297)
        at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:154)
        at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:89)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
        at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
        at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)
        at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:262)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:402)
        at org.eclipse.core.internal.resources.Project$1.run(Project.java:556)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
        at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:534)
        at org.eclipse.core.internal.resources.Project.build(Project.java:111)
        at org.eclipse.jdt.internal.ui.jarpackager.JarFileExportOperation.buildProjects(JarFileExportOperation.java:1159)
        at org.eclipse.jdt.internal.ui.jarpackager.JarFileExportOperation.singleRun(JarFileExportOperation.java:1006)
        at org.eclipse.jdt.internal.ui.jarpackager.JarFileExportOperation.execute(JarFileExportOperation.java:987)
        at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:108)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
        at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:130)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
    
    My two classes look like this :
    Code:
    package io.github.suitinacow.TestPlugin;
    
    import java.awt.List;
    import java.lang.reflect.Array;
    import java.util.ArrayList;
    
    import org.apache.commons.lang.StringUtils;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Commands extends JavaPlugin implements Listener {
      
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
            Player player = (Player) sender;
            if(cmd.getName().equalsIgnoreCase("addLine"))
            {
                if(sender instanceof Player)
                {
                    String sentence = StringUtils.join(args);
                    ArrayList<String> sentences = new ArrayList<String>();
                    sentences.add(sentence);
                    player.sendMessage(player.getName() + ", " + sentence);
                    this.getConfig().set("path.to.sentences", sentences);
                    this.saveConfig();
                }
            }
          
            if(cmd.getName().equalsIgnoreCase("testRl")){
                this.saveConfig();
                this.reloadConfig();
                if(!(sender instanceof Player))
                {
                    sender.sendMessage("Must be a player.");
                }
                else
                {
                    player.sendMessage(player.getName() + ", plugin is reloaded.");
                }
                return true;
            }
            return false;
        }
      
    
    }
    
    And

    Code:
    package io.github.suitinacow.TestPlugin;
    
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public final class TestPlugin extends JavaPlugin implements Listener {      
         
        @Override
        public void onEnable(){
            this.saveDefaultConfig();
        }
    
        @Override
        public void onDisable() {
            this.saveConfig();
        }
    
    }
    
     
  2. Offline

    AwesomeSpider8

    Show us your pom.xml.
     
    suitinacow likes this.
  3. Online

    timtower Moderator Moderator

    Locked.
    Bungeecord is not supported.
     
    suitinacow likes this.
Thread Status:
Not open for further replies.

Share This Page