From caa019a8444674b6032c61feabcd96a159e44bf4 Mon Sep 17 00:00:00 2001 From: Weblate Date: Nov 04 2023 09:32:28 +0000 Subject: Added translation using Weblate (Spanish) Co-authored-by: Weblate --- diff --git a/po/es/master/pages/packaging_maven_project.po b/po/es/master/pages/packaging_maven_project.po new file mode 100644 index 0000000..dcfdc3e --- /dev/null +++ b/po/es/master/pages/packaging_maven_project.po @@ -0,0 +1,347 @@ +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2020-12-15 22:32+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. type: Title === +#: ./pages/packaging_maven_project.adoc:2 +#, no-wrap +msgid "Packaging Maven project" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:6 +msgid "" +"This step by step guide will show you how to package Maven project. Let's " +"start with probably simplest spec file possible." +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:12 +#, no-wrap +msgid "include::example$maven_project/simplemaven.spec[]\n" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:16 +msgid "" +"The spec file above is a real world example how it may look like for simple " +"Maven project. Both `%build` and `%install` sections consist only of one " +"line." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:18 +msgid "Another interesting lines:" +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:21 +#, no-wrap +msgid "10: BuildRequires: maven-local\n" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:26 +msgid "" +"All Maven projects need to have BuildRequires on `maven-local`. They also " +"need to have Requires and BuildRequires on `jpackages-utils`, but build " +"system adds these automatically. Package maintainer doesn't need to list " +"them explicitly." +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:30 +#, no-wrap +msgid "31: %dir %{_javadir}/%{name}\n" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:34 +msgid "" +"By default, resulting JAR files will be installed in `%{_javadir}/%{name}`, " +"therefore package needs to own this directory." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:37 +msgid "" +"The build could fail from many reasons, but one probably most common is " +"build failure due to " +"xref:common_errors.adoc#error_missing_dependency[missing dependencies]" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:42 +msgid "" +"We can try to remove these missing dependencies from pom.xml and make Maven " +"stop complaining about them. However, these removed dependencies may be " +"crucial for building of the project and therefore it may be needed to " +"package them later. Let's remove the dependencies from `pom.xml`." +msgstr "" + +#. type: Block title +#: ./pages/packaging_maven_project.adoc:44 +#, no-wrap +msgid "Remove dependencies from pom.xml" +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:50 +#, no-wrap +msgid "" +"...\n" +"%prep\n" +"%setup -q\n" +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:54 +#, no-wrap +msgid "" +"# Add following lines to %prep section of a spec file\n" +"%pom_remove_dep :commons-io\n" +"%pom_remove_dep :junit\n" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:59 +msgid "" +"Package maintainer can use a wide variety of \"`pom_`\" macros for modifying " +"`pom.xml` files. See xref:pom_macros.adoc#helper_macros[Macros for POM " +"modification] section for more information." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:62 +msgid "" +"Now try to build the project again. The build will fail with " +"xref:common_errors.adoc#error_compilation_failure[compilation failure]." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:65 +msgid "" +"Oops, another problem. This time Maven thought it had all the necessary " +"dependencies, but Java compiler thinks otherwise." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:71 +msgid "" +"Now it's possible to either patch the source code not to depend on missing " +"libraries or to package them. Second approach is usually correct. It's not " +"necessary to package every dependency right away. Maintainer could package " +"compile time dependencies first and keep the rest for later (test " +"dependencies, ...). But Maven needs to know that it shouldn't try to run " +"tests now. This can be achieved by passing `-f` option to `%mvn_build` " +"macro. Maven will stop complaining about missing test scoped dependencies " +"from now on." +msgstr "" + +#. type: delimited block = +#: ./pages/packaging_maven_project.adoc:78 +msgid "" +"Another major reason to disable the test phase is to speed up the local " +"build process. This can also be achieved by specifying an additional switch " +"`--without=tests` to the `fedpkg` or the `mock` tool instead of adding a " +"switch to `%mvn_build`." +msgstr "" + +#. type: delimited block = +#: ./pages/packaging_maven_project.adoc:80 +msgid "" +"Another switch `--without=javadoc` causes the build to skip Javadoc " +"generation." +msgstr "" + +#. type: delimited block = +#: ./pages/packaging_maven_project.adoc:83 +msgid "" +"Note that to actually build the package with tests disabled you have to " +"specify the switch to `%mvn_build`." +msgstr "" + +#. type: delimited block = +#: ./pages/packaging_maven_project.adoc:88 +msgid "" +"It is always recommended to run all available test suites during build. It " +"greatly improves quality of the package." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:91 +msgid "" +"We already have package which provides `commons-io:commons-io` artifact, " +"let's add it to the `BuildRequires`. Also disable tests for now." +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:99 +#, no-wrap +msgid "" +"BuildRequires: maven-local\n" +"BuildRequires: apache-commons-io\n" +"...\n" +"%prep\n" +"%setup -q\n" +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:103 +#, no-wrap +msgid "" +"# Comment out following lines in %prep section\n" +"#%%pom_remove_dep :commons-io\n" +"#%%pom_remove_dep :junit\n" +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:107 +#, no-wrap +msgid "" +"%build\n" +"# Skip tests for now, missing dependency junit:junit:4.11\n" +"%mvn_build -f\n" +msgstr "" + +#. type: delimited block = +#: ./pages/packaging_maven_project.adoc:114 +msgid "" +"One can easily search for package which provides desired artifact. Try `dnf " +"repoquery --whatprovides 'mvn(commons-io:commons-io)'`, or see how to " +"xref:introduction_for_developers.adoc#querying_repositories[query " +"repositories]." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:117 +msgid "" +"Now try to build the project one more time. The build should succeed " +"now. Congrats, you managed to create an RPM from Maven project!" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:120 +msgid "" +"There is plenty of other things maintainer may want to do. For example, he " +"may want to provide symbolic links to the JAR file in `%{_javadir}`." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:122 +msgid "This can be easily achieved with `%mvn_file` macro:" +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:127 +#, no-wrap +msgid "" +"%prep\n" +"%setup -q\n" +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:129 +#, no-wrap +msgid "%mvn_file : %{name}/%{name} %{name}\n" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:132 +msgid "" +"See xref:mvn_macros.adoc#mvn_file[Alternative JAR File Names] section for " +"more information." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:135 +msgid "" +"Another quite common thing to do is adding aliases to Maven artifact. Try to " +"run `rpm -qp --provides` on your locally built RPM package:" +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:141 +#, no-wrap +msgid "" +"$ rpm -qp --provides simplemaven-1.0-1.fc21.noarch.rpm\n" +"mvn(com.example:simplemaven) = 1.0\n" +"simplemaven = 1.0-1.fc21\n" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:152 +msgid "" +"The output above tells us that the RPM package provides Maven artifact " +"\"com.example:simplemaven:1.0\". Upstream may change the groupId:artifactId " +"with any new release. And it happens. For example " +"org.apache.commons:commons-io changed to commons-io:commons-io some time " +"ago. It's not a big deal for package itself, but it is a huge problem for " +"other packages that depends on that particular package. Some packages may " +"still have dependencies on old groupId:artifactId, which is suddenly " +"unavailable. Luckily, there is an easy way how to solve the problems like " +"these. Package maintainer can add aliases to actually provided Maven " +"artifact." +msgstr "" + +#. type: Block title +#: ./pages/packaging_maven_project.adoc:153 +#, no-wrap +msgid "Add alias to Maven artifact" +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:157 +#, no-wrap +msgid "%mvn_alias org.example:simplemaven simplemaven:simplemaven\n" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:160 +msgid "" +"See xref:mvn_macros.adoc#mvn_alias[Additional Mappings] for more information " +"on `%mvn_alias`." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:162 +msgid "Rebuild the pacakge and check `rpm -qp --provides` output again:" +msgstr "" + +#. type: delimited block - +#: ./pages/packaging_maven_project.adoc:169 +#, no-wrap +msgid "" +"$ rpm -qp --provides simplemaven-1.0-2.fc21.noarch.rpm\n" +"mvn(com.example:simplemaven) = 1.0\n" +"mvn(simplemaven:simplemaven) = 1.0\n" +"simplemaven = 1.0-2.fc21\n" +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:173 +msgid "" +"Now it doesn't matter if some other package depends on either of these " +"listed artifact. Both dependencies will always be satisfied with your " +"package." +msgstr "" + +#. type: Plain text +#: ./pages/packaging_maven_project.adoc:176 +msgid "" +"One could try to fix dependencies in all the dependent packages instead of " +"adding an alias to single package. It's almost always wrong thing to do." +msgstr ""