You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ge...@free.fr on 2008/03/04 12:04:31 UTC

Add .classes to compilation classpath

Hi everybody,

I'm new to maven. I have a simple question that I can't find an answer anywhere:
I want to include additional classes in the classpath while compiling my project
but I can't find any
obvious solution for this.

- The classes I want to include can not be installed in a maven repository
- I tried the compiler plugin by adding
           <fork>true</fork>
                <compilerArguments>
                        <classpath>myDic/classes</classpath>
                </compilerArguments>
but this doesn't seem to work.

Any suggestions?
Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Add .classes to compilation classpath

Posted by amit kumar <am...@gmail.com>.
Okay. Then you can jar up the classes as told by Simon and
install/deploy(look for command mvn install:install-file... or mvn
deploy:deploy-file...) them to your repository. There are few jar files
which are not outcome of maven projects but yet we are using at out place.
This seems to be the simplest of the options.

On Tue, Mar 4, 2008 at 4:58 PM, <ge...@free.fr> wrote:

> Oh sorry,
>
> I meant to include some .class files from some other projects
> which are not maven projects and they can not be easily installed
> as maven packages. I think it would be possible to use ant plugin but it
> should
> be something much simpler I guess?
>
> Thanks
>
>
> Quoting amit kumar <am...@gmail.com>:
>
> > I had concept/misconception that target/classes gets added to the
> classpath
> > by maven as default?
> >
> > Are you dealing with generated sources?
> >
> > Regards,
> > Amit
> >
> > On Tue, Mar 4, 2008 at 4:34 PM, <ge...@free.fr> wrote:
> >
> > >
> > > Hi everybody,
> > >
> > > I'm new to maven. I have a simple question that I can't find an answer
> > > anywhere:
> > > I want to include additional classes in the classpath while compiling
> my
> > > project
> > > but I can't find any
> > > obvious solution for this.
> > >
> > > - The classes I want to include can not be installed in a maven
> repository
> > > - I tried the compiler plugin by adding
> > >           <fork>true</fork>
> > >                <compilerArguments>
> > >                        <classpath>myDic/classes</classpath>
> > >                </compilerArguments>
> > > but this doesn't seem to work.
> > >
> > > Any suggestions?
> > > Thanks
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Add .classes to compilation classpath

Posted by ge...@free.fr.
Oh sorry,

I meant to include some .class files from some other projects
which are not maven projects and they can not be easily installed
as maven packages. I think it would be possible to use ant plugin but it should
be something much simpler I guess?

Thanks


Quoting amit kumar <am...@gmail.com>:

> I had concept/misconception that target/classes gets added to the classpath
> by maven as default?
>
> Are you dealing with generated sources?
>
> Regards,
> Amit
>
> On Tue, Mar 4, 2008 at 4:34 PM, <ge...@free.fr> wrote:
>
> >
> > Hi everybody,
> >
> > I'm new to maven. I have a simple question that I can't find an answer
> > anywhere:
> > I want to include additional classes in the classpath while compiling my
> > project
> > but I can't find any
> > obvious solution for this.
> >
> > - The classes I want to include can not be installed in a maven repository
> > - I tried the compiler plugin by adding
> >           <fork>true</fork>
> >                <compilerArguments>
> >                        <classpath>myDic/classes</classpath>
> >                </compilerArguments>
> > but this doesn't seem to work.
> >
> > Any suggestions?
> > Thanks
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Add .classes to compilation classpath

Posted by amit kumar <am...@gmail.com>.
I had concept/misconception that target/classes gets added to the classpath
by maven as default?

Are you dealing with generated sources?

Regards,
Amit

On Tue, Mar 4, 2008 at 4:34 PM, <ge...@free.fr> wrote:

>
> Hi everybody,
>
> I'm new to maven. I have a simple question that I can't find an answer
> anywhere:
> I want to include additional classes in the classpath while compiling my
> project
> but I can't find any
> obvious solution for this.
>
> - The classes I want to include can not be installed in a maven repository
> - I tried the compiler plugin by adding
>           <fork>true</fork>
>                <compilerArguments>
>                        <classpath>myDic/classes</classpath>
>                </compilerArguments>
> but this doesn't seem to work.
>
> Any suggestions?
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Add .classes to compilation classpath

Posted by German Rodriguez <ge...@gmail.com>.
For me it worked adding the classes as resources. I hope it helps you



dynnamitt wrote:
> 
> Hi 
> 
> I managed alter the classpath like this:
> 
> 
> <classpath>./src/main/webapp/WEB-INF/lib/cocoon-2.1.11.jar${path.separator}./src/main/webapp/WEB-INF/lib/avalon-framework-api-4.3.jar</classpath>
> 						
> BIG ISSUE: Now maven cannot find the test-scope jars added as "normal"
> dependencies.
> 
> Regards,
> Dynnamitt
> 
> 
> Georges Ravel wrote:
>> 
>> 
>> Hi everybody,
>> 
>> I'm new to maven. I have a simple question that I can't find an answer
>> anywhere:
>> I want to include additional classes in the classpath while compiling my
>> project
>> but I can't find any
>> obvious solution for this.
>> 
>> - The classes I want to include can not be installed in a maven
>> repository
>> - I tried the compiler plugin by adding
>>            <fork>true</fork>
>>                 <compilerArguments>
>>                         <classpath>myDic/classes</classpath>
>>                 </compilerArguments>
>> but this doesn't seem to work.
>> 
>> Any suggestions?
>> Thanks
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Add-.classes-to-compilation-classpath-tp15824912p28474050.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Add .classes to compilation classpath

Posted by dynnamitt <kj...@gmail.com>.
Hi 

I managed alter the classpath like this:


<classpath>./src/main/webapp/WEB-INF/lib/cocoon-2.1.11.jar${path.separator}./src/main/webapp/WEB-INF/lib/avalon-framework-api-4.3.jar</classpath>
						
BIG ISSUE: Now maven cannot find the test-scope jars added as "normal"
dependencies.

Regards,
Dynnamitt


Georges Ravel wrote:
> 
> 
> Hi everybody,
> 
> I'm new to maven. I have a simple question that I can't find an answer
> anywhere:
> I want to include additional classes in the classpath while compiling my
> project
> but I can't find any
> obvious solution for this.
> 
> - The classes I want to include can not be installed in a maven repository
> - I tried the compiler plugin by adding
>            <fork>true</fork>
>                 <compilerArguments>
>                         <classpath>myDic/classes</classpath>
>                 </compilerArguments>
> but this doesn't seem to work.
> 
> Any suggestions?
> Thanks
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Add-.classes-to-compilation-classpath-tp15824912s177p16090932.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Add .classes to compilation classpath

Posted by "simon.kitching@chello.at" <si...@chello.at>.
georges.ravel@free.fr schrieb:
> Hi everybody,
>
> I'm new to maven. I have a simple question that I can't find an answer anywhere:
> I want to include additional classes in the classpath while compiling my project
> but I can't find any
> obvious solution for this.
>
> - The classes I want to include can not be installed in a maven repository
> - I tried the compiler plugin by adding
>            <fork>true</fork>
>                 <compilerArguments>
>                         <classpath>myDic/classes</classpath>
>                 </compilerArguments>
> but this doesn't seem to work.
>   
Normally, you put classes into a jarfile, install it in a repository
with a suitable groupId and artifactId, then declare that jar as a
dependency in your pom. Why can't the classes be put into a maven
repository in your case?

Regards, Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org