Re: Problem with maven-antrun-plugin task being run with the jre rather than the jdk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/05/2012 05:34 AM, Stanislav Ochotnicky wrote:
Quoting Orion Poplawski (2012-12-04 16:38:00)
On 12/04/2012 01:07 AM, Mikolaj Izdebski wrote:
     seem to be facing a classic issue with a maven-antrun-plugin task being run
with the jre rather than the jdk and not finding the compiler.  Haven't yet
found the proper fix though.  Any ideas?

Java compiler is in tools.jar, you need to add it to classpath of antrun plugin
explicitly, for example:

<plugins>
    <plugin>
      <artifactId>maven-antrun-plugin</artifactId>
      [...]
      <dependencies>
        <dependency>
          <groupId>com.sun</groupId>
          <artifactId>tools</artifactId>
          <version>1.7</version>
          <scope>system</scope>
          <systemPath>${java.home}/../lib/tools.jar</systemPath>
        </dependency>
      </dependencies>
    </plugin>
</plugins>

Mikolaj


That's already there, although perhaps not in the right place?  See attached
pom.xml.  Or maybe because the version is too old?

That mapping is in a profile which only gets activated with Sun JDK. This is
wrong. Moving the dependency into proper build/plugins section should solve the
issue. I am not entirely sure why upstream decided to put it into profile. Maybe
something to do with macs? Maybe some fix could be upstreamed too...


Thanks, I've moved it down into the build/plugins section and it works there. I've pinged upstream about it.

--
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder Office                  FAX: 303-415-9702
3380 Mitchell Lane                       orion@xxxxxxxx
Boulder, CO 80301                   http://www.nwra.com
--
java-devel mailing list
java-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/java-devel



[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux