标签: build

maven-deploy-plugin中多次执行的Maven错误

我找到了这个很好的食谱,并希望用它在我们的存储库中部署一些第三方文件

命令行上的调用是

mvn -P deploy-libs
Run Code Online (Sandbox Code Playgroud)

如果我为一个文件执行此操作,它将完全按预期工作

<profiles>
    <profile>
        <id>deploy-libs</id>
        <build>
            <defaultGoal>deploy:deploy-file</defaultGoal>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.4</version>
                    <goals>
                        <goal>deploy-file</goal>
                    </goals>
                    <configuration>
                        <repositoryId>openscada-external</repositoryId>
                        <url>${openscada.distrib.repository}</url>
                        <file>../openscada_opc_dcom/lib/j-interop.jar</file>
                        <pomFile>../openscada_opc_dcom/lib/j-interop.pom</pomFile>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>
Run Code Online (Sandbox Code Playgroud)

如果我使用具有多个执行的执行块,则它不起作用.这是一个错误,还是这个预期的行为?

<profiles>
    <profile>
        <id>deploy-libs</id>
        <build>
            <defaultGoal>deploy:deploy-file</defaultGoal>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.4</version>
                    <configuration>
                        <repositoryId>openscada-external</repositoryId>
                        <url>${openscada.distrib.repository}</url>
                    </configuration>
                    <executions>
                        <execution>
                            <id>j-interop</id>
                            <goals>
                                <goal>deploy-file</goal>
                            </goals>
                            <configuration>
                                <file>../openscada_opc_dcom/lib/j-interop.jar</file>
                                <pomFile>../openscada_opc_dcom/lib/j-interop.pom</pomFile>
                            </configuration>
                        </execution>
                        <execution>
                            <id>j-interopdeps</id>
                            <goals>
                                <goal>deploy-file</goal>
                            </goals>
                            <configuration>
                                <file>../openscada_opc_dcom/lib/j-interopdeps.jar</file>
                                <pomFile>../openscada_opc_dcom/lib/j-interopdeps.pom</pomFile>
                            </configuration>
                        </execution>
                        <execution>
                            <id>jcifs</id>
                            <goals>
                                <goal>deploy-file</goal>
                            </goals>
                            <configuration>
                                <file>../openscada_opc_dcom/lib/jcifs-1.2.9.jar</file>
                                <pomFile>../openscada_opc_dcom/lib/jcifs-1.2.9.pom</pomFile>
                            </configuration>
                        </execution> …
Run Code Online (Sandbox Code Playgroud)

java maven-2 build maven-plugin

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

Visual Studio发布版本

我正在尝试为我编写的C++应用程序生成一个发布版本.从VS2008中运行应用程序时,应用程序运行正常(调试和释放); 但是当你运行可执行文件时,它几乎每次都会崩溃.

现在,是否有一个黑客,所以我可以作为独立的应用程序运行此应用程序,而无需运行所有代码并找到导致它的错误?

提前致谢.

c++ release build

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

是否有Visual Studio 2005 ASP.NET调试和发布版本

在VS 2005中是否有"调试"和"发布"版本?如果是这样,我该如何在两者之间切换?

asp.net debugging release visual-studio-2005 build

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

有没有办法在ANT构建文件中指定引导程序目标?

在我的Ant构建文件中,我正在使用加密属性,我正在读取文本文件.我需要在构建过程中的某种引导目标中解密它.我该怎么做呢?

例如,以下是文件的内容.

myFile.txt:

ENCRYPTED=encryptedtext
Run Code Online (Sandbox Code Playgroud)

build.xml:

<project name="myProject" default="all">
<property file="myFile.txt">

<!--Specify bootstrap target here to perform the decryption task-->

<target name="myTarget">
<!--Use the decrypted property here-->
Run Code Online (Sandbox Code Playgroud)

我得到一种方法是设置目标来执行解密,并将其添加为depends所有必要目标.我不想那样做.我对使过程尽可能干净的替代品感兴趣.这也意味着我已经考虑过" 你为什么不在其他地方执行解密并从那里读取它? "的解决方案,我对它们不感兴趣.

谢谢.

xml ant bootstrapping build

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

Angular 每个 console.log 都来自 dev 中的 mainjs:1

当启动我的应用程序时ng serve(现在ng serve -- -c deploy,由于测试,每个 console.log 来自 或main.js:1polyfills.js:1独立于我调用 console.log() 的组件。

在另一个 stackoverflow(Angular 控制台仅从 main.js:1 和 polyfills.js:1 记录)中,有人写道,出现这种情况是因为 Angular 不构建开发,而是构建生产。

这是我的 angular.json

{
    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
    "version": 1,
    "newProjectRoot": "projects",
    "projects": {
        "project": {
            "projectType": "application",
            "schematics": {
                "@schematics/angular:component": {
                    "style": "scss"
                }
            },
            "root": "",
            "sourceRoot": "src",
            "prefix": "app",
            "architect": {
                "build": {
                    "builder": "@angular-devkit/build-angular:browser",
                    "options": {
                        "outputPath": "dist/project",
                        "index": "src/index.html",
                        "main": "src/main.ts",
                        "polyfills": "src/polyfills.ts",
                        "tsConfig": "tsconfig.app.json",
                        "aot": true,
                        "assets": …
Run Code Online (Sandbox Code Playgroud)

environment development-environment config build angular

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

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

该问题没有出现在我的“问题”选项卡上,但当我尝试运行它时出现恐慌

我制作了 3 个 go 文件,每个文件都使用相同的包,即 package main。它会看起来像这样......

mydir/
-client.go 
-room.go
-main.go
Run Code Online (Sandbox Code Playgroud)

在我的终端中,没有出现任何问题,但是当我尝试运行/构建 main.go 时,它返回一个恐慌:

undefined: newRoom
Run Code Online (Sandbox Code Playgroud)

这是我的代码片段,其中有恐慌:

//main.go
r := newRoom()

//room.go
func newRoom() *room{
   return &room{}
}
Run Code Online (Sandbox Code Playgroud)

当我尝试删除该函数时,它在可视代码中返回错误“未声明”。再次添加它时,问题消失了,但是当我尝试运行或构建它时,如果我的 newRoom 函数未定义,它会返回错误。有人知道有什么问题吗?

如果能回答一些解释为什么它没有出现在视觉代码问题输出中,那就更好了。

compiler-errors build go

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

Puma gem 无法使用 Ruby 3.1 在 macOS 12 (Monterey) 上构建本机扩展

查看构建日志时,注意到的第一个错误是error: '__declspec' attributes are not enabled。Ruby 现在使用的功能在现代 macOS 版本的编译器中默认关闭。

ruby macos rubygems native build

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

构建python包找不到requirements.txt

这是我第一次必须在我实际工作的仓库中使用旧 git 存储库的内容。我决定尝试创建一个 Python 包,将其作为库导入到新版本中(我使用的是 gitlab)。

\n

我已经搜索了相关信息来做到这一点,但很难找到一致的解决方案。

\n

我首先尝试通过执行以下命令在本地构建包:

\n

python setup.py bdist_wheel

\n

进而:

\n

python3 -m build

\n

该包应该构建wheel的依赖关系,但在尝试查找requirements.txt文件时它崩溃了。

\n

我之前看到该命令写入 Egg-info 文件,创建包,并将文件从本地复制到包:

\n
(venv) acivit@odin:~/projects/mechanized-number-recognition$ python3 -m build \n* Creating venv isolated environment...\n* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)\n* Getting build dependencies for sdist...\nrunning egg_info\nwriting acivit.mechanized_number_recognition.egg-info/PKG-INFO\nwriting dependency_links to acivit.mechanized_number_recognition.egg-info/dependency_links.txt\nwriting requirements to acivit.mechanized_number_recognition.egg-info/requires.txt\nwriting top-level names to acivit.mechanized_number_recognition.egg-info/top_level.txt\nreading manifest file 'acivit.mechanized_number_recognition.egg-info/SOURCES.txt'\nadding license file 'LICENSE.md'\nwriting manifest file 'acivit.mechanized_number_recognition.egg-info/SOURCES.txt'\n* Building sdist...\nrunning sdist\nrunning egg_info\nwriting acivit.mechanized_number_recognition.egg-info/PKG-INFO\nwriting dependency_links to acivit.mechanized_number_recognition.egg-info/dependency_links.txt\nwriting …
Run Code Online (Sandbox Code Playgroud)

python build setuptools package pypi

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

如何修复以下错误:数据路径“/polyfills”必须是我的角度项目中的字符串?

我正在使用 NodeJS 版本 18。我正在尝试将我的 Angular 应用程序部署到 Firebase 和/或在本地成功运行它,但我无法这样做。[package.json 和源代码的链接] -> https://github.com/ans humankmr /jovian-genai-hackathon/blob/master/UI/package.json

我尝试了很多东西,但我无法弄清楚。例如,在我的 angular.json 文件中,我尝试了以下操作:

在此输入图像描述

和这个

在此输入图像描述

然后我尝试运行“npm run build”,但出现以下错误。

错误:找不到模块:错误:无法解析“/home/ans human/Documents/repos/jovian-genai-hackathon”中的“/home/ans human/Documents/repos/jovian-genai-hackathon/UI/zone.js” /用户界面'

我已经看到了这些链接,但他们要求修改此处名为 polyfills.ts 的文件,该文件在我的代码库中不存在。 Angular2 最终版本 - “错误:Angular 需要 Zone.js prolyfill”

这与我当前的问题完全相反:终端错误:架构验证失败,出现以下错误:数据路径“['polyfills']”应该是数组

javascript build npm angular

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