小编Jus*_*Dev的帖子

maven codehaus.mojo 无法解析

我正在尝试使用 NetBeans 构建一个 JavaFX 项目,但是当我运行它时,我有一个:

Plugin org.codehaus.mojo:exec-maven-plugin:1.2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:exec-maven-plugin:jar:1.2.1: Could not transfer artifact org.codehaus.mojo:exec-maven-plugin:pom:1.2.1 from/to HTTP (http://repo.maven.apache.org/maven2): Access denied to: http://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.2.1/exec-maven-plugin-1.2.1.pom , ReasonPhrase:Forbidden. -> [Help 1]
Run Code Online (Sandbox Code Playgroud)

我在代理后面工作,但我用我的代理配置了 Netbeans,我尝试了“测试连接”,这是可行的。

我还用这个代理配置了“.m2/settings.xml”目录

<?xml  version="1.0" encoding="UTF-8"?> <settings>   <proxies>
    <proxy>
      <active />
      <protocol>http</protocol>
      <username>username</username>
      <password>password</password>
      <port>8080</port>
      <host>proxyhost</host>
      <id/>
    </proxy>   </proxies>
     <mirrors>
    <mirror>
      <id>HTTP</id>
      <name>HTTP Central</name>
      <url>http://repo.maven.apache.org/maven2</url>
      <mirrorOf>central</mirrorOf>
    </mirror>   </mirrors> </settings>
Run Code Online (Sandbox Code Playgroud)

我的 pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion> …
Run Code Online (Sandbox Code Playgroud)

maven-2 netbeans maven-plugin

5
推荐指数
1
解决办法
4万
查看次数

如何使用google-script在Google电子表格中设置对齐范围?

您好我想在谷歌脚本的范围内设置中心对齐,但我不知道我该怎么做.

我已经尝试过了

sheet_destination.getRange(last_row_desti+1,1,1,4).setAlignment(DocumentApp.HorizontalAlignment.CENTER);

但是元素setAlignment在一个范围内不存在

google-sheets google-apps-script

4
推荐指数
1
解决办法
5553
查看次数

C ++构造函数未定义

我从事C ++项目,我使用CMake构建文件。我的构建失败原因

未定义对`Software :: Software()的引用

,但我看不到问题。如果您有想法,请不要犹豫,谢谢

文件架构:

在此处输入图片说明

CMake的:

# cmake_minimum_required(VERSION <specify CMake version here>)
project(untitled)

cmake_minimum_required(VERSION 2.8.9)
set(CMAKE_CXX_STANDARD 11)

include_directories(include)

file(GLOB SOURCES "src/*.cpp")
add_executable(untitled ${SOURCES})
Run Code Online (Sandbox Code Playgroud)

Software.h:

#include <string>
class Software{
    private : 
        std::string name;

    public :
        Software();
}
Run Code Online (Sandbox Code Playgroud)

Software.cpp:

#include "Software.h"

Software::Software() {
    this->name = "defaultName";
}
Run Code Online (Sandbox Code Playgroud)

SoftwaresConfigurations.h(称为软件的构造者):

#include "Software.h"

class SoftwaresConfigurations {
    public:
        SoftwaresConfigurations();
}
Run Code Online (Sandbox Code Playgroud)

SoftwaresConfiguration.cpp:

#include "SoftwaresConfigurations.h"

SoftwaresConfigurations::SoftwaresConfigurations(){
    Software software = Software();
}
Run Code Online (Sandbox Code Playgroud)

c++ cmake

1
推荐指数
1
解决办法
118
查看次数