[all] Compile-Source-JDK and Compile-Target-JDK

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [all] Compile-Source-JDK and Compile-Target-JDK

Dennis Lundberg-2
Instructions for configuring/installing these can be found here:
http://maven.apache.org/maven-1.x/reference/standard-sun-jar-names.html

--
Dennis Lundberg

1Niall Pemberton wrote:

> On 2/14/06, Dion Gillard <[hidden email]> wrote:
>> Which part of the email build was failing?
>
> Sorry failing was too strong - it was trying to download javamail and
> jaf and couldn't find them - so a config issue on my part (I assume
> theres a repository I could point to to get them or configure it
> locally?). As I was doing 30-40 components I just switly moved on to
> the next :-(
>
> Niall
>
>> It's built fine for me lately
>>
>> On 2/14/06, Niall Pemberton <[hidden email]> wrote:
>>> OK I've done this for active components in "proper" and "sandbox".
>>> Couldn't test email and modler because their builds failed.
>>>
>>> Also exec and openpgp only have maven2 build files. I downloaded
>>> maven2 and got as far as working out how to add manifest entries - but
>>> I couldn't work out how to refernece the compile plugin configuration
>>> - so I've left the JDK bits commented out in the sandbox's pom.xml:
>>>
>>>    http://tinyurl.com/737qc
>>>
>>> Any maven2 experts feel free to jump in :-)
>>>
>>> I also added a bit to the release docs - as per Robert's suggestion.
>>>
>>> Niall
>>>
>>> On 2/10/06, Niall Pemberton <[hidden email]> wrote:
>>>> I just added "Compile-Source-JDK"  and "Compile-Target-JDK" attributes to
>>>> the validator jar's manifest file (the manifest spec says unknown attributes
>>>> are ignored) to show the setting of  maven's "maven.compile.source" and
>>>> "maven.compile.target" attributes which the jar was created with.
>>>>
>>>> http://svn.apache.org/viewcvs?rev=376748&view=rev
>>>>
>>>> I think its a good idea to give people "comfort" over the JDK version used
>>>> to build a release. If no-one objects I will modify the rest of the commons
>>>> components to do the same.
>>>>
>>>> Niall
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>> --
>> http://www.multitask.com.au/people/dion/
>> "If I close my eyes it doesn't seem so dark." - SpongeBob SquarePants
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [all] Compile-Source-JDK and Compile-Target-JDK

Wendy Smoak
In reply to this post by Niall Pemberton
On 2/13/06, Niall Pemberton <[hidden email]> wrote:

> Also exec and openpgp only have maven2 build files. I downloaded
> maven2 and got as far as working out how to add manifest entries - but
> I couldn't work out how to refernece the compile plugin configuration
> - so I've left the JDK bits commented out in the sandbox's pom.xml:
>
>    http://tinyurl.com/737qc
>

I don't know how to get at the compiler config directly, but this
seems to work.  Uncomment your lines in trunks-sandbox/pom.xml, and in
trunks-sandbox/exec/pom.xml:

<build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${maven.compile.source}</source>
          <target>${maven.compile.target}</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <properties>
      <maven.compile.source>1.3</maven.compile.source>
      <maven.compile.target>1.3</maven.compile.target>
  </properties>

This is not foolproof-- it's still possible to compile the project
without that configuration, but someone should eventually notice the
expressions showing up in the manifest and fix it.  Or Brett will
chime in with the right answer. :)

BTW, the tests for exec won't run for me; I used
-Dmaven.test.skip=true to build the jar so I could look at the
manifest.

$ mvn install
...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
java.lang.NoSuchMethodException: org.apache.commons.exec.TestUtil.<init>()
        at java.lang.Class.getConstructor0(Class.java:2647)
        at java.lang.Class.getConstructor(Class.java:1629)
        at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [all] Compile-Source-JDK and Compile-Target-JDK

Brett Porter-2
Hi Wendy,

Wendy Smoak wrote:
> This is not foolproof-- it's still possible to compile the project
> without that configuration, but someone should eventually notice the
> expressions showing up in the manifest and fix it.  Or Brett will
> chime in with the right answer. :)

This is the correct answer. As always, thanks for your help :)

Future versions of Maven plan to provide a better way to share plugin
configuration.

- Brett

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [all] Compile-Source-JDK and Compile-Target-JDK

Niall Pemberton
In reply to this post by Wendy Smoak
On 2/14/06, Wendy Smoak <[hidden email]> wrote:

> On 2/13/06, Niall Pemberton <[hidden email]> wrote:
>
> > Also exec and openpgp only have maven2 build files. I downloaded
> > maven2 and got as far as working out how to add manifest entries - but
> > I couldn't work out how to refernece the compile plugin configuration
> > - so I've left the JDK bits commented out in the sandbox's pom.xml:
> >
> >    http://tinyurl.com/737qc
> >
>
> I don't know how to get at the compiler config directly, but this
> seems to work.  Uncomment your lines in trunks-sandbox/pom.xml, and in
> trunks-sandbox/exec/pom.xml:
>
> <build>
>    <plugins>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-compiler-plugin</artifactId>
>        <configuration>
>          <source>${maven.compile.source}</source>
>          <target>${maven.compile.target}</target>
>        </configuration>
>      </plugin>
>    </plugins>
>  </build>
>  <properties>
>      <maven.compile.source>1.3</maven.compile.source>
>      <maven.compile.target>1.3</maven.compile.target>
>  </properties>
>
> This is not foolproof-- it's still possible to compile the project
> without that configuration, but someone should eventually notice the
> expressions showing up in the manifest and fix it.  Or Brett will
> chime in with the right answer. :)

Thanks Wendy. I guess the trick is not to put the properties with
default values in the parent pom - that way what gets put in the
manifest is either true or not there (unless a component configures
the properties AND overrides the comiler configuration),

> BTW, the tests for exec won't run for me; I used
> -Dmaven.test.skip=true to build the jar so I could look at the
> manifest.

Thats what I did too,

Niall

> $ mvn install
> ...
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> java.lang.NoSuchMethodException: org.apache.commons.exec.TestUtil.<init>()
>        at java.lang.Class.getConstructor0(Class.java:2647)
>        at java.lang.Class.getConstructor(Class.java:1629)
>        at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>
> --
> Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [all] Compile-Source-JDK and Compile-Target-JDK

Niall Pemberton
In reply to this post by Brett Porter-2
On 2/14/06, Brett Porter <[hidden email]> wrote:

> Hi Wendy,
>
> Wendy Smoak wrote:
> > This is not foolproof-- it's still possible to compile the project
> > without that configuration, but someone should eventually notice the
> > expressions showing up in the manifest and fix it.  Or Brett will
> > chime in with the right answer. :)
>
> This is the correct answer. As always, thanks for your help :)
>
> Future versions of Maven plan to provide a better way to share plugin
> configuration.

Thats good its on the cards, thanks for your input,

Niall

> - Brett

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

12