2

i am trying to do POC with dd4t 2.0 latest version and facing build error.

Please help me to resolve this maven dependency, i am getting error while building this project

[INFO] --- maven-gpg-plugin:1.5:sign (sign-artifacts) @ dd4t-spring-mvc-archetype --- 'gpg.exe' is not recognized as an internal or external command,

Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.5:sign (sign-artifacts) on project dd4t-spring-mvc-archetype: Exit code: 1

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
                <execution>
                    <id>sign-artifacts</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>sign</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

1 Answer 1

1

The reason you're getting this error is because you're trying to build with the release-central profile in Maven. You are not allowed to do this, you can remove the profile from your build configuration.

So if you have something like:

mvn clean install -Prelease-central

.. then that won't work.

In general, you should just load the dd4t dependencies as real dependencies and not as source code. This will make things a lot easier and clear. Please see the quickstart guide and the wiki for more information.

Update

From the comments I see that you are loading in the archetype as module. This is also not possible. What you get then is the source to generate an archetype package, which then generates a base project based on parameters. If you want to use the archetype, the only way to do that is by doing:

mvn archetype:generate -DgroupId=[com.example] -DartifactId=[mywebapp] -DarchetypeGroupId=org.dd4t -DarchetypeArtifactId=dd4t-spring-mvc-archetype -DarchetypeVersion=1.5  -DarchetypeCatalog=remote -DarchetypeCatalog=http://repo1.maven.org/maven2

Only if you want to change the archetype's source, you'd need gpg locally. You can follow SonaType's guide on how to do that.

1
  • i am not using any profile like release-central, i am just trying with command mvn clean install -DskipTests , and i am able to access dd4t dependency as normal maven dependency, but i am adding module spring-mvc-archetype provided with dd4t2.0 source, which has plugin configuration maven-gpg-plugin, and it throws error while downloading plugin with given execution atributes. Mar 17, 2016 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.