1

I'm trying to use Retrotranslator Maven Plugin to facilitate development on a pre-JDK1.4 environment. I have a maven module called xyz-core where there is the package br.com.company.xyz.core.backport that I want to use as a universal backport package.

The problem is: the plugin does not find the package. If I copy that package to this project, it works. But I need the backport package on a separate artifact because it will be used in many other projects.

Here are the pom:

<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>

    <parent>
        <groupId>br.com.company.xyz</groupId>
        <artifactId>xyz-parent</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>

    <artifactId>xyz-test</artifactId>

    <dependencies>

        <dependency>
            <groupId>br.com.company.xyz</groupId>
            <artifactId>xyz-core</artifactId>
            <version>${project.version}</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>retrotranslator-maven-plugin</artifactId>
                <version>1.0-alpha-4</version>
                <configuration>
                    <classifier>ME</classifier>
                    <target>1.1</target>
                    <verbose>true</verbose>
                    <verify>true</verify>
                    <verifyClasspath>
                        <element>${basedir}/lib/rt.jar</element>
                    </verifyClasspath>
                    <backport>br.com.company.xyz.core.backport</backport>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>translate-project</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

</project>
Alex Oliveira
  • 843
  • 8
  • 23
  • FIY, please take a look at [using retrotranslator with maven-antrun-plugin](http://jinahya.wordpress.com/2013/08/30/using-retrotranslator-with-maven-antrun-plugin/) if you think `retrotranslator-maven-plugin` isn't enough. – Jin Kwon Jun 27 '14 at 07:42
  • possible duplicate of [Maven and eclipse: a reliable way to add non-Maven or external jars to a project?](http://stackoverflow.com/questions/15305679/maven-and-eclipse-a-reliable-way-to-add-non-maven-or-external-jars-to-a-project) – Paul Sweatte Nov 05 '14 at 17:21
  • @PaulSweatte I don't think that answer my question. That question is about non-Maven dependencies, which is not my case. Mine **is** a maven artifact correctly installed in the Maven repository. I just want to make the `retrotranslator-maven-plugin` understand that the packport package is in a dependecy artifact and not in the current artifact. – Alex Oliveira Dec 10 '14 at 13:01
  • @AlexOliveira In that case, would registering the artifact within the [dependencyManagement](http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies) node work? – Paul Sweatte Dec 11 '14 at 16:57

0 Answers0