0

I would like to add an altered maven plugin to my project. It contains a feature not yet available in the central repository. I've tried adding it with system scope and installing it in a local repo, but it doesn't work. Is this feasible or do I have to install the plugin on every machine I want to build this project on?

The git repo can be found here:
https://github.com/Crydust/DukesShoppingList

update
According to "Maven 3 - Distribute custom plugin in a .jar?" This requires a maven repo outside of my project. Which would make me sad if true.

update I ended up getting it to work.

svn co http://svn.apache.org/repos/asf/tomee/tomee/tags/tomee-1.5.2 tomee
cd ~/Projects/tomee/maven

patch tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java < ~/Downloads/add_classpaths_config.diff
# fix rejected parts of patch
vim tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java
# change version
vim tomee-maven-plugin/pom.xml

mvn deploy -DaltDeploymentRepository=repositoryId::default::file:///home/kristof/Projects/tomee/maven/repo/

Now I copied the repo folder to my other project and added the pluginRepositories (not the repositories tag) to my pom.

<pluginRepositories>
    <pluginRepository>
        <id>repo</id>
        <url>file://${project.basedir}/repo</url>
    </pluginRepository>
</pluginRepositories>

It still works after removing the installed plugin from the local repo.

rm -rf ~/.m2/repository/org/apache/openejb

1 Answer 1

1

Try use your github repository as maven repository.

I found a small manula about it - http://blog.rueedlinger.ch/2012/09/use-github-as-maven-remote-repository/

With small difference, you need to specify the repository plugins:

<pluginRepositories>
    <pluginRepository>
        <id>Dukes Shopping List Github Repo</id>
        <url>http://your-repository</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.